Skip to content

process: move multipleResolves event to EOL #58707

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Jun 14, 2025

The multipleResolves event has been deprecated for several years now. It's time.

The `multipleResolves` event has been deprecated for several
years now. It's time.
@jasnell jasnell added semver-major PRs that contain breaking changes and should be released in the next major version. process Issues and PRs related to the process subsystem. deprecations Issues and PRs related to deprecations. labels Jun 14, 2025
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Jun 14, 2025
Copy link

codecov bot commented Jun 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.13%. Comparing base (3f6ad56) to head (1e3da65).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58707      +/-   ##
==========================================
- Coverage   90.15%   90.13%   -0.03%     
==========================================
  Files         637      637              
  Lines      188122   188062      -60     
  Branches    36886    36892       +6     
==========================================
- Hits       169595   169502      -93     
- Misses      11271    11317      +46     
+ Partials     7256     7243      -13     
Files with missing lines Coverage Δ
lib/internal/process/promises.js 100.00% <100.00%> (ø)

... and 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@LiviaMedeiros LiviaMedeiros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking but IMHO this event should get Legacy status rather than being removed. Or we can keep it forever runtime deprecated (similar to how DEP0174 works) and make the warning message more descriptive.
Despite the false positives with Promise.race and Promise.all, it still can be useful for locating problems where code unintentionally keeps flowing after calling resolve() or reject().

If keeping this causes noticeable runtime overhead even when there's no listener (judging from this PR, it's just one boolean check per fired event?), +0 solely for performance reasons.

Copy link
Contributor

@Ethan-Arrowood Ethan-Arrowood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -3327,6 +3327,9 @@ the errors used for value type validation.

<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/00000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pr-url: https://github.com/nodejs/node/pull/00000
pr-url: https://github.com/nodejs/node/pull/58707


This event was deprecated because it did not work with V8 promise combinators
which diminished its usefulness.
This event was deprecated and remove because it did not work with V8 promise
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This event was deprecated and remove because it did not work with V8 promise
This event was deprecated and removed because it did not work with V8 promise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecations Issues and PRs related to deprecations. needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants