Changelog

nodejs/node · · 13 commits

Stream, fs, and glob fixes land

Node.js adds a stream write optimization, fixes fs retry and ReadStream behavior, and tightens glob, URL, and node --run edge cases.

Stream writes avoid flattening concatenated strings (araujoguie18f106)

Node now writes one-byte strings to streams without forcing an intermediate flatten, which reduces extra heap copying for common cases like concatenated HTTP headers. The change also preserves existing UTF-8 handling and adds coverage for concatenated-string writes and writev paths.

ReadStream now honors setDefaultHighWaterMark() (hamzakargin537a20c)

fs.createReadStream() now uses a user-configured default byte highWaterMark when one has been set, instead of always sticking to 64 KiB. This makes the stream API behave consistently with stream.setDefaultHighWaterMark() and updates the docs and tests accordingly.

fs.writev retries resume from the correct offset (christianaurichzm2e59a6d)

A retry after a partial writev() or EAGAIN now uses the tracked local position instead of the stream’s advanced batch position. That fixes holes and misplaced data on retry, with regression tests covering partial writes and transient failures.

node --run no longer aborts on filesystem errors (jazellyc07db8c)

node --run now uses non-throwing filesystem checks so unreadable node_modules/.bin directories are skipped and a missing working directory becomes a normal user-facing error. This removes an abort-on-exception path and makes command discovery more robust.

Glob matching fixes globstar section bounds (gurgunday47d6da0)

path.matchesGlob() and fs.glob() now compute globstar section bounds correctly when sections have different lengths. That fixes false negatives for patterns such as **/a/b/c/**/d/** and adds regression coverage.

URL href setter validates the receiver first (Dansatch1347527)

The href setter now checks the URL receiver before converting the assigned value, so a bad receiver no longer triggers user-defined toString() side effects first. This tightens behavior around Web-compatible URL setters.

Other misc changes

  • Enable PIE in Linux builds (legendecas2a854a8)
  • Notarize bin/node in Darwin tarballs (UlisesGascon55da353)
  • Use indexed appends for dependent signals (rozzillad0d82d9)
  • Improve circular reference formatting with Map.prototype.getOrInsert() (LiviaMedeirosb0aa887)
  • Deflake TLS resume SNI test (christianaurichzm80fc1ef)
  • Deflake fs stat cancel-inflight test under FIPS (christianaurichzm2e0029f)
  • Minor test path cleanup in watch mode (LiviaMedeirosd105ef7)