Change8

v25.0.0

Breaking Changes
📦 node-jsView on GitHub →
10 breaking6 features🐛 2 fixes4 deprecations🔧 15 symbols

Summary

Node.js 25 updates the V8 engine to 14.1, enables Web Storage by default, and introduces the --allow-net permission flag. This release also removes several long-deprecated APIs including SlowBuffer and legacy fs constants.

⚠️ Breaking Changes

  • The 'SlowBuffer' API has been moved to end-of-life (EOL) and removed.
  • The 'fs.F_OK', 'fs.R_OK', 'fs.W_OK', and 'fs.X_OK' constants have been removed. Use 'fs.constants' instead.
  • The 'rmdir' recursive option has been moved to EOL; use 'fs.rm' for recursive directory removal.
  • The 'CallTracker' in the assert module has been moved to EOL.
  • The 'multipleResolves' process event has been moved to EOL.
  • Corepack is no longer distributed with Node.js.
  • FileHandle objects no longer automatically close on garbage collection (GC).
  • Deep equal checks in 'assert' and 'util' now fail promise comparisons and treat invalid dates as equal.
  • The 'asyncResource' property on bound functions has been moved to EOL.
  • Legacy URL bad port deprecation and IP-address servername in TLS have been moved to EOL.

Migration Steps

  1. Replace 'SlowBuffer' usage with 'Buffer.allocUnsafeSlow()'.
  2. Update file access checks to use 'fs.constants.F_OK' etc., instead of 'fs.F_OK'.
  3. Replace 'fs.rmdir(path, { recursive: true })' with 'fs.rm(path, { recursive: true })'.
  4. Manually install Corepack if your workflow depends on it, as it is no longer bundled.
  5. Ensure 'FileHandle' instances are explicitly closed using 'fileHandle.close()' to avoid resource leaks.
  6. Update crypto calls to specify explicit output lengths for shake128/256.

✨ New Features

  • Upgraded V8 engine to 14.1, improving JSON.stringify performance and adding Uint8Array base64/hex conversion.
  • Web Storage API (localStorage/sessionStorage) is now enabled by default.
  • Added '--allow-net' to the permission model for granular network access control.
  • Exposed 'ErrorEvent' as a global object.
  • Added support for JSPI (JavaScript Promise Integration) for WebAssembly.
  • Introduced a portable compile cache for improved startup performance.

🐛 Bug Fixes

  • Patched V8 to avoid duplicated zlib symbols.
  • Patched V8 for illumos compatibility.

Affected Symbols

⚡ Deprecations

  • Runtime-deprecate default shake128/256 output lengths in crypto.
  • Runtime-deprecate 'ECDH.setPublicKey()'.
  • Deprecate 'http.writeHeader()'.
  • The 'hash' and 'mgf1Hash' options in crypto have been moved to EOL.