The Wire · Showcase
UNDICI PATCHES FAKE TIMER BYPASS BREAKING TEST ISOLATION
By RepoJournal · Filed · About Node.js
Undici restored socket validation to respect global timers instead of sneaking around fake timer mocks, fixing a footgun that silently broke test suites relying on clock control.
The fix [1] restores idle socket validation to use standard Node timer APIs, reversing a bypass that let validation run even when tests faked timers. This matters because cache interceptor tests were forced to fake the entire Date object just to control one clock behavior, and the workaround left poisoned sockets undetected in isolation. Node-gyp tightened its release machinery in parallel: commit-lint now gates changelog generation [2], LTO is disabled for Windows addon builds to prevent linker issues [3], and the CI pipeline updated to immutable GitHub action versions [4]. These changes ensure native modules build reproducibly across platforms without surprises in release automation.
Action items
- → Review test suite for undici cache interceptor mocks - may simplify after this lands nodejs/undici [plan]
- → Upgrade node-gyp to pick up commit-lint and LTO fixes if you maintain native bindings nodejs/node-gyp [plan]
References
- [1] fix: keep idle validation on global timers ↗ nodejs/undici
- [2] chore: add commit-lint ↗ nodejs/node-gyp
- [3] fix: disable LTO for addon builds on Windows ↗ nodejs/node-gyp
- [4] fix(ci): update ruff-action version to v4.0.0 (#3324) nodejs/node-gyp
FAQ
- What changed in Node.js on June 11, 2026?
- Undici restored socket validation to respect global timers instead of sneaking around fake timer mocks, fixing a footgun that silently broke test suites relying on clock control.
- What should Node.js teams do about it?
- Review test suite for undici cache interceptor mocks - may simplify after this lands • Upgrade node-gyp to pick up commit-lint and LTO fixes if you maintain native bindings
- Which Node.js repositories shipped on June 11, 2026?
- nodejs/undici, nodejs/node-gyp