RepoJournal
Node.js

@nodejs

The Node.js runtime - every backend team's CVE source of truth

Keep up with Node.js in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

One email a day. Unsubscribe in one click.

Pick a date

Topics: JavaScript Full archive →

The Wire · Showcase

UNDICI FIXES FLAKY WEBSOCKET TESTS AND DEAD ASSERTIONS

By RepoJournal · Filed · About Node.js

Undici shipped three critical stability fixes overnight that eliminate unreachable code paths and deterministic test failures across websockets and HTTP dispatching.

The HTTP dispatcher had a dead assertion checking contentLength equality [1] — a condition that could never fail because writeH1 and writeH2 already normalize the value before invoking writeBlob. Killing dead code matters because it reduces cognitive load on maintainers and prevents future bugs hiding in unreachable branches. Meanwhile, the websocket test suite was leaking race conditions [2] that made send tests flaky; the fix refactors to async/await with proper cleanup registration, ensuring deterministic teardown before assertions run. A third patch [3] relaxes Content-Range parsing to accept unknown-size values, fixing a real-world interop issue. Core also landed a SubtleCrypto.supports() accuracy fix [4] that validates ECDH shared-secret output matches requested lengths — this closes a gap where algorithm support claims could be misleading. The crypto desk also optimized normalizeAlgorithm dispatch [5] by replacing O(n) case-insensitive scans with O(1) SafeMap lookups, a hot-path win for workloads calling crypto methods repeatedly.

One email a day. Unsubscribe in one click.

Action items

References

  1. [1] fix(dispatcher): remove unreachable assert in writeBlob (#5231) nodejs/undici
  2. [2] test(websocket): fix flaky send test ↗ nodejs/undici
  3. [3] fix: accept unknown-size Content-Range values ↗ nodejs/undici
  4. [4] crypto: improve accuracy of SubtleCrypto.supports ↗ nodejs/node
  5. [5] crypto: optimize normalizeAlgorithm dispatch hot path nodejs/node

Quick answers

What shipped in Node.js on May 7, 2026?
Undici shipped three critical stability fixes overnight that eliminate unreachable code paths and deterministic test failures across websockets and HTTP dispatching. In total, 26 commits and 20 pull requests landed.
Who contributed to Node.js on May 7, 2026?
3 developers shipped this update, including mcollina, trivikr, and panva.
What were the notable Node.js updates?
fix(dispatcher): remove unreachable assert in writeBlob (#5231), test(websocket): fix flaky send test, and fix: accept unknown-size Content-Range values.

More from @nodejs

Daily updates, in your inbox

Follow Node.js

Keep up with Node.js in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

One email a day. Unsubscribe in one click. Read a past issue →

Elsewhere on the wire

Want every project, not just this one?