-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix!: keyToLegacyUrlsafe is now an async method #496
fix!: keyToLegacyUrlsafe is now an async method #496
Conversation
Codecov Report
@@ Coverage Diff @@
## master #496 +/- ##
==========================================
+ Coverage 94% 94.07% +0.06%
==========================================
Files 12 12
Lines 918 928 +10
Branches 189 192 +3
==========================================
+ Hits 863 873 +10
Misses 44 44
Partials 11 11
Continue to review full report at Codecov.
|
Besides the extra test |
* All async methods (except for streams) will return a Promise in the event | ||
* that a callback is omitted. | ||
*/ | ||
promisifyAll(Datastore, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we use util.promisify
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we use
util.promisify
?
@bcoe for consistency promisifyAll
is used as currently in all the library we are using the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 works for me, might be worth doing some work on the util
module to make sure promisfyAll
takes advantage of util.promisify
.
@stephenplusplus Can you please re-review this after the recent updates? |
This looks good to me, we should call out what is specifically breaking in the message body of what is landed:
|
…jikanjareeya/nodejs-datastore into keyToLegacyUrlsafe-projectId
4f2e991
to
b218883
Compare
looks like this is ready to land, but let's hold off on landing for a tiny bit, and see if we can batch it up with some breaking changes @AVaksman is working on. |
@bcoe should we still hold off? Feels iffy to keep this floating around 🤷♂ |
Fixes #473
While calling
keyToLegacyUrlsafe
function it's not binding{{projectId}}
to actual one as it does not have any external/api call.Added
auth.getProjectId
to get projectId and change it to callback and promise support asauth.getProjectId
function's behavior is same.BREAKING CHANGE:
keyToLegacyUrlsafe is rename to keyToLegacyUrlSafe
keyToLegacyUrlSafe is now an async method