Skip to content

[7.x] fix: support Node 26 and legacy global dispatcher#5319

Draft
mcollina wants to merge 1 commit into
v7.xfrom
feat/node-26-global-dispatcher-compat
Draft

[7.x] fix: support Node 26 and legacy global dispatcher#5319
mcollina wants to merge 1 commit into
v7.xfrom
feat/node-26-global-dispatcher-compat

Conversation

@mcollina
Copy link
Copy Markdown
Member

Summary

Backport Node 26 support and the legacy global dispatcher mirroring added in undici 8.

Changes

  • add Node 26 to the CI matrices
  • run test/node-test through a dedicated diagnostic runner on Node 26
  • tolerate the retried POST ordering seen on Node 26 in test/node-test/client-errors.js
  • isolate the current global dispatcher on undici.globalDispatcher.2
  • mirror a legacy-compatible dispatcher on undici.globalDispatcher.1
  • export Dispatcher1Wrapper and add typings/tests for it
  • force allowH2: false for legacy v1 dispatcher consumers
  • add node tests covering the global dispatcher compatibility behavior

Testing

  • node --test test/node-test/global-dispatcher-version.js
  • node --test test/node-test/client-errors.js
  • npm run test:typescript
  • npx eslint index.js lib/global.js lib/dispatcher/dispatcher1-wrapper.js test/node-test/global-dispatcher-version.js test/node-test/client-errors.js scripts/run-node-test-ci.mjs
  • node scripts/run-node-test-ci.mjs

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@mcollina mcollina marked this pull request as draft May 23, 2026 08:00
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.29197% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.84%. Comparing base (2b3cd22) to head (35020f2).

Files with missing lines Patch % Lines
lib/dispatcher/dispatcher1-wrapper.js 77.86% 27 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             v7.x    #5319      +/-   ##
==========================================
- Coverage   92.89%   92.84%   -0.06%     
==========================================
  Files         112      113       +1     
  Lines       35828    35964     +136     
==========================================
+ Hits        33283    33391     +108     
- Misses       2545     2573      +28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@aduh95 aduh95 changed the title fix: support Node 26 and legacy global dispatcher [7.x] fix: support Node 26 and legacy global dispatcher May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants