The Wire · Showcase
UNDICI FIXES SILENT INTERCEPTOR FAILURE; NODE ADDS ZIP SUPPORT AND HTTP DEPRECATION
By RepoJournal · Filed · About Node.js
Undici's cache() and deduplicate() interceptors were silently breaking on direct Client/Pool use, now fixed with fallback origin detection.
The fix lands in undici as a critical correction: when cache() or deduplicate() interceptors compose onto a Client or Pool without opts.origin, both were collapsing to an empty string key, effectively disabling the entire interceptor [1]. A new getEffectiveOrigin() helper now reconstructs the origin when needed [2]. Across Node core, three substantial changes ship: stream.Writer.end() now honors AbortSignal properly, rejecting gracefully when passed a pre-aborted signal [3]. The http module promotes DEP0195 from documentation-only to runtime, emitting a DeprecationWarning when constructors like Agent, Server, and ClientRequest are called without new [4]. In a larger addition, zlib gains native ZIP archive support through three new classes: ZipEntry for individual members with buffered and streaming reads, ZipFile for random-access file-backed archives, and ZipBuffer for in-memory operations [5]. Build dependencies also bump: setup-node moves to 7.0.0 with new cache output keys [6], codeql-action reaches 4.37.3 [7], and scorecard-action updates to 2.4.4 [8].
One email a day. Unsubscribe in one click.
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. Read a past issue →
Action items
- → If using undici interceptors directly on Client/Pool, upgrade immediately for cache/deduplicate to function nodejs/undici [immediate]
- → Audit http module code calling Agent/Server/ClientRequest without new; DEP0195 warnings will appear at runtime nodejs/node [plan]
- → Evaluate ZIP archive support in zlib for native compression workflows nodejs/node [monitor]
References
- [1] fix(interceptors): cache() and deduplicate() silently inert on Client/Pool without opts.origin ↗ nodejs/undici
- [2] fix(interceptors): allow interceptors without opts.origin (#5628) nodejs/undici
- [3] stream: honor AbortSignal in Writer.end() ↗ nodejs/node
- [4] http: runtime deprecate instantiating without new ↗ nodejs/node
- [5] zlib: add ZIP archive support to zlib (ZipFile,ZipBuffer,ZipEntry) ↗ nodejs/node
- [6] build(deps): bump actions/setup-node from 6.4.0 to 7.0.0 ↗ nodejs/undici
- [7] build(deps): bump github/codeql-action/init from 4.36.2 to 4.37.3 ↗ nodejs/undici
- [8] build(deps): bump ossf/scorecard-action from 2.4.3 to 2.4.4 ↗ nodejs/undici