-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
[v12.x backport] util: use a global symbol for util.promisify.custom
#32349
[v12.x backport] util: use a global symbol for util.promisify.custom
#32349
Conversation
a01fb4a
to
e5dc2fb
Compare
63a03d2
to
d577190
Compare
I got a rebase of this working but was unable to push to the branch. You can find it at https://github.com/MylesBorins/node/tree/backport/v12.x/lib/util/use-global-util-promisify-custom-symbol |
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. Fixes: nodejs#31647 PR-URL: nodejs#31672 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
e874d47
to
0a8c5c1
Compare
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. Fixes: #31647 Backport-PR-URL: #32349 PR-URL: #31672 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
landed in 32c0449 |
@MylesBorins it's a very small addition but the original PR was semver-minor. This just landed on the v12.16.2 patch release though. |
@targos oof Do you think we should revert? |
We can talk about it in 5 minutes, but no I don't think we should. |
This backports #31672 to Node v12.
It has already been backported to Node v13 as 975d6b0.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes