v22.17.0
Breaking Changes📦 node-jsView on GitHub →
⚠ 2 breaking✨ 9 features🐛 6 fixes⚡ 3 deprecations🔧 15 symbols
Summary
This release stabilizes several utility and file system APIs, introduces explicit resource management for directory handles, and deprecates legacy behaviors in the HTTP and child_process modules.
⚠️ Breaking Changes
- Instantiating node:http classes like IncomingMessage or ServerResponse without the 'new' keyword is now discouraged and may throw errors in future versions. Use 'new IncomingMessage()' instead.
- Using an empty string for options.shell in node:child_process is now discouraged as it previously had undefined behavior. Use 'shell: true' or an explicit shell path.
Migration Steps
- Update node:http class instantiations to always use the 'new' keyword.
- Replace options.shell = "" in child_process calls with 'shell: true' or a specific shell path.
- Remove dependencies on HTTP/2 stream.priority as the API is deprecated.
- Update tests to use the now-stable assert.partialDeepStrictEqual() where partial object matching is required.
✨ New Features
- Stabilized assert.partialDeepStrictEqual() for comparing subsets of object properties.
- Added autoClose option to fs.FileHandle.readableWebStream to control file descriptor lifetime.
- Added support for explicit resource management (Symbol.asyncDispose) in fs.Dir.
- Added http2.server.stream.finish diagnostics channel for observability.
- Permissions: Added implicit read access to the entrypoint file in the permission model.
- Added 'none' style to util.styleText() to allow removing terminal styling.
- Added support for OpenHarmony operating system.
- Exposed crypto.constants.OPENSSL_IS_BORINGSSL.
- Stabilized various APIs including fs.glob(), URL.createObjectURL(), and v8.setHeapSnapshotNearHeapLimit().
🐛 Bug Fixes
- Ensured AsyncLocalStore instances work in isolation.
- Fixed broken fs.cpSync benchmark.
- Fixed uvwasi package name in build system.
- Fixed pointer compression builds.
- Fixed search paths for libnode.so.
- Ensured FILE_OFFSET_BITS=64 is used on 32-bit architectures.
Affected Symbols
http.IncomingMessagehttp.ServerResponsechild_processhttp2.Http2Stream.priorityassert.partialDeepStrictEqualfs.FileHandle.readableWebStreamfs.Dirhttp2.server.stream.finishutil.styleTextfs.globfs.openAsBlobURL.createObjectURLv8.setHeapSnapshotNearHeapLimitAsyncLocalStoragecrypto.constants.OPENSSL_IS_BORINGSSL
⚡ Deprecations
- Instantiating node:http classes (e.g., IncomingMessage, ServerResponse) without the 'new' keyword.
- Setting options.shell to an empty string ("") in node:child_process.
- HTTP/2 prioritization API, including stream.priority and related signaling.