Skip to content

process: add multipleResolves event

This adds the resolveSwallowed multipleResolves event to track promises that resolve more than once or that reject after resolving.

It is important to expose this to the user to make sure the application runs as expected. Without such warnings it would be very hard to debug these situations.

A single warning is triggered when such an error is triggered for the first time during runtime without any active listeners.

This is an alternative to #21857.

Fixes: https://github.com/nodejs/promises-debugging/issues/8

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