Skip to content

worker: move terminate callback to end-of-life#58528

Closed
jasnell wants to merge 3 commits into
nodejs:mainfrom
jasnell:jasnell/worker-terminate-callback-eof
Closed

worker: move terminate callback to end-of-life#58528
jasnell wants to merge 3 commits into
nodejs:mainfrom
jasnell:jasnell/worker-terminate-callback-eof

Conversation

@jasnell
Copy link
Copy Markdown
Member

@jasnell jasnell commented May 31, 2025

Passing a callback to worker.terminate() has been deprecated for about six years now. It's time to remove it.

Passing a callback to worker.terminate() has been deprecated
for about six years now. It's time to remove it.
@jasnell jasnell requested review from addaleax, anonrig and mcollina May 31, 2025 16:27
@jasnell jasnell added semver-major PRs that contain breaking changes and should be released in the next major version. worker Issues and PRs related to Worker support. labels May 31, 2025
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label May 31, 2025
Comment thread doc/api/deprecations.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.22%. Comparing base (968e2f4) to head (ced82c8).
Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #58528   +/-   ##
=======================================
  Coverage   90.21%   90.22%           
=======================================
  Files         635      635           
  Lines      187580   187580           
  Branches    36853    36851    -2     
=======================================
+ Hits       169231   169248   +17     
+ Misses      11108    11107    -1     
+ Partials     7241     7225   -16     
Files with missing lines Coverage Δ
lib/internal/worker.js 99.82% <100.00%> (-0.01%) ⬇️

... 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.

@nodejs-github-bot

This comment was marked as outdated.

@jasnell jasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 31, 2025
@nodejs-github-bot

This comment was marked as outdated.

Comment thread test/parallel/test-worker-nexttick-terminate.js Outdated
Comment thread test/parallel/test-worker-nexttick-terminate.js Outdated
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

nodejs-github-bot commented Jun 1, 2025

@jasnell jasnell added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jun 2, 2025
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jun 2, 2025
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/58528
✔  Done loading data for nodejs/node/pull/58528
----------------------------------- PR info ------------------------------------
Title      worker: move terminate callback to end-of-life (#58528)
Author     James M Snell <jasnell@gmail.com> (@jasnell)
Branch     jasnell:jasnell/worker-terminate-callback-eof -> nodejs:main
Labels     semver-major, author ready, worker, needs-ci, commit-queue-squash
Commits    3
 - worker: move terminate callback to end-of-life
 - Update doc/api/deprecations.md
 - Update test/parallel/test-worker-nexttick-terminate.js
Committers 2
 - James M Snell <jasnell@gmail.com>
 - GitHub <noreply@github.com>
PR-URL: https://github.com/nodejs/node/pull/58528
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/58528
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last approving review:
   ⚠  - worker: move terminate callback to end-of-life
   ⚠  - Update doc/api/deprecations.md
   ⚠  - Update test/parallel/test-worker-nexttick-terminate.js
   ℹ  This PR was created on Sat, 31 May 2025 16:27:51 GMT
   ✔  Approvals: 3
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/58528#pullrequestreview-2884377109
   ✔  - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/58528#pullrequestreview-2884429441
   ✔  - Michaël Zasso (@targos) (TSC): https://github.com/nodejs/node/pull/58528#pullrequestreview-2885251569
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2025-06-01T15:57:47Z: https://ci.nodejs.org/job/node-test-pull-request/67231/
- Querying data for job/node-test-pull-request/67231/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/15397791041

jasnell added a commit that referenced this pull request Jun 2, 2025
Passing a callback to worker.terminate() has been deprecated
for about six years now. It's time to remove it.

PR-URL: #58528
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@jasnell
Copy link
Copy Markdown
Member Author

jasnell commented Jun 2, 2025

Landed in 411cc42

@jasnell jasnell closed this Jun 2, 2025
RafaelGSS added a commit that referenced this pull request Sep 15, 2025