-
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
Support util.promisify.custom
as a global symbol
#31647
Comments
ExE-Boss
added a commit
to ExE-Boss/node
that referenced
this issue
Feb 7, 2020
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
4 tasks
ExE-Boss
added a commit
to ExE-Boss/util.promisify
that referenced
this issue
Feb 8, 2020
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
ExE-Boss
added a commit
to EB-Forks/node-util
that referenced
this issue
Feb 8, 2020
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
ExE-Boss
added a commit
to ExE-Boss/util.promisify
that referenced
this issue
Feb 8, 2020
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
ExE-Boss
added a commit
to EB-Forks/node-util
that referenced
this issue
Feb 8, 2020
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
BridgeAR
pushed a commit
that referenced
this issue
Mar 17, 2020
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 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]>
MylesBorins
pushed a commit
that referenced
this issue
Mar 24, 2020
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 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]>
MylesBorins
pushed a commit
to MylesBorins/node
that referenced
this issue
Apr 1, 2020
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]>
ExE-Boss
added a commit
to ExE-Boss/node
that referenced
this issue
Apr 1, 2020
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]>
MylesBorins
pushed a commit
that referenced
this issue
Apr 2, 2020
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]>
ExE-Boss
added a commit
to ExE-Boss/util.promisify
that referenced
this issue
Jan 6, 2021
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
ExE-Boss
added a commit
to ExE-Boss/util.promisify
that referenced
this issue
Jan 6, 2021
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
ljharb
pushed a commit
to ExE-Boss/util.promisify
that referenced
this issue
Jan 6, 2021
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Currently,
util.promisify
supports theutil.promisify.custom
symbol to provide a custom promisified version of the callback-taking function, this however doesn’t work cross‑realm and doesn’t work for packages that intend to support browsers.There are currently several packages that provide
util.promisify
, but aren’t interoperable because of this (ex.: @nodejs’s built‑inutil.promisify
, @browserify’sutil.promisify
and @ljharb’sutil.promisify
)Describe the solution you'd like
The best solution would be to expose this as a shared symbol using
Symbol.for
, like how #20821 (#20857) was done forutil.inspect.custom
.The shared symbol would preferably be obtained using
Symbol.for("nodejs.util.promisify.custom")
.Describe alternatives you've considered
Keep the status quo and use a package like @mafintosh’s
inspect‑custom‑symbol
.The text was updated successfully, but these errors were encountered: