Skip to content

util: use a global symbol for `util.promisify.custom`

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 and for non‑Node promisify implementations to be interoperable.

Fixes: https://github.com/nodejs/node/issues/31647

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading