feat: use a global symbol for util.promisify.custom#44
Open
ExE-Boss wants to merge 1 commit intobrowserify:masterfrom
Open
feat: use a global symbol for util.promisify.custom#44ExE-Boss wants to merge 1 commit intobrowserify:masterfrom
util.promisify.custom#44ExE-Boss wants to merge 1 commit intobrowserify:masterfrom
Conversation
Define `util.promisify.custom`
as `Symbol.for("nodejs.util.inspect.custom")`, rather than
as `Symbol("util.inspect.custom")`.
This allows custom `promisify` wrappers to easily/safely be defined
in non‑Node.js environments.
Refs: nodejs/node#31647
Refs: nodejs/node#31672
ec9c70f to
f89af7d
Compare
Member
|
This shouldn’t land until the node one has landed. |
goto-bus-stop
approved these changes
Feb 9, 2020
Member
goto-bus-stop
left a comment
There was a problem hiding this comment.
Yes, we'll want to wait until a Node.js version with this symbol has been released. Thanks for the PR!
Author
|
@goto-bus-stop Refs: https://nodejs.org/api/util.html#util_util_promisify_custom |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Define
util.promisify.customas:rather than as:
This allows custom
promisifywrappers to easily/safely be defined in non‑Node.js environments.See also:
util.promisify.customas a global symbol nodejs/node#31647util.promisify.customnodejs/node#31672