Change8

v22.17.0

Breaking Changes
📦 node-jsView on GitHub →
2 breaking9 features🐛 6 fixes3 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

  1. Update node:http class instantiations to always use the 'new' keyword.
  2. Replace options.shell = "" in child_process calls with 'shell: true' or a specific shell path.
  3. Remove dependencies on HTTP/2 stream.priority as the API is deprecated.
  4. 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

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