Commit Graph
48381 Commits
Author SHA1 Message Date
Donghoon Kang 01efbc68b0 lib: avoid unsafe array iteration in cli table
Avoid unsafe array iteration because for...of relies on the
user-mutable Symbol.iterator. Use an index-based loop instead.

Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/65838
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2026-09-09 22:54:13 +00:00
Filip Skokan e026733cd0 crypto: optimize and benchmark key preparation
Optimize asymmetric key preparation with benchmark and regression
coverage for the supported input paths.

Assisted-by: GitHub Copilot
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65892
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-09 21:45:48 +00:00
Christopher BussandCodex fb4f759569 doc: document windowsHide for child_process.fork
Describe the existing windowsHide option and its false default alongside
the other fork options, using the wording already documented for spawn.

Refs: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/75525
Signed-off-by: christopher-buss <christopher.buss+github@protonmail.com>
Assisted-by: Codex
Co-authored-by: Codex <noreply@openai.com>
PR-URL: https://github.com/nodejs/node/pull/65887
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-09 20:24:46 +00:00
Antoine du Hamel 7ac314f06c 2026-09-09, Version 26.8.2 (Current)
Notable changes:

doc:
  * deprecate `Server.prototype._listen2` in `node:net` (Antoine du Hamel) https://github.com/nodejs/node/pull/65593
deps:
  * update Undici to 8.10.2 https://github.com/nodejs/node/pull/65788
  * update OpenSSL to 3.5.8 https://github.com/nodejs/node/pull/65542
meta:
  * refine the security vuln posture for experimental features (James M Snell) https://github.com/nodejs/node/pull/65438

PR-URL: https://github.com/nodejs/node/pull/65917
2026-09-09 18:04:31 +02:00
Filip Skokan fd6682c871 lib: fix shared buffer growability validation
Use the intrinsic growable getter instead of buffer.growable so
shadowed properties cannot bypass validation or reject fixed buffers.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: GitHub Copilot
PR-URL: https://github.com/nodejs/node/pull/65845
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-09-09 13:57:36 +00:00
Filip Skokan ee51d13446 tools: lint PR commit messages without approval
Use pull_request_target to run commit message linting without fork
workflow approval. Fetch the first commit through the API and pass
its message to a pinned validator as JSON on stdin.

Capture validator output and report failures through escaped
annotations, using only read access to pull requests.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65875
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-09 10:19:49 +00:00
Wiyeong Seo b3fb3440ae path: remove StringPrototypeCharCodeAt from some methods of posix
Remove `StringPrototypeCharCodeAt` from `posix.resolve`,
`posix.normalize`, `posix.parse`.

PR-URL: https://github.com/nodejs/node/pull/54668
Refs: https://github.com/nodejs/node/pull/54546
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-09 10:04:41 +02:00
Antoine du Hamel a28496591e Revert "inspector: defer JS execution from V8 interrupts"
This reverts commit 30f4990224.

PR-URL: https://github.com/nodejs/node/pull/65907
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-09 09:47:37 +02:00
Antoine du Hamel 8b52f14ae5 Revert "deps: enable V8 API interrupt JS check"
This reverts commit 49e2608492.

PR-URL: https://github.com/nodejs/node/pull/65907
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-09 09:47:36 +02:00
Antoine du Hamel 875d905390 Revert "deps: V8: backport b36cf9f6ccd2"
This reverts commit ccd648eb0c.

PR-URL: https://github.com/nodejs/node/pull/65907
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-09 09:47:35 +02:00
Tim Perry b12688c6e6 http2: add new connectionWindowSize option
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65619
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2026-09-09 07:46:46 +00:00
Filip Skokan 8c9d14118b tools: unlabel author ready on base branch conflicts
Add a daily workflow that removes the `[author ready]` label from open
pull requests conflicting with their base branch and comments with
rebase guidance.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65872
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
2026-09-09 07:34:30 +00:00
Trivikram Kamat 1dd48de141 vfs: reject statfs for missing paths
Validate mounted VFS paths before returning synthetic statfs data
so fs.statfsSync() and fs.promises.statfs() report ENOENT for missing
paths. Forward validation errors asynchronously to fs.statfs()
callbacks.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/65693
Fixes: https://github.com/nodejs/node/issues/65692
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-09-09 05:27:35 +00:00
Richard Lau cb9b8708c9 build: sync cargo/rustc version warnings
The version checks in `configure.py` were not updated when the minimum
rustc requirement was bumped to 1.86 for temporal_rs 0.2.3.

Signed-off-by: Richard Lau <richard.lau@ibm.com>
PR-URL: https://github.com/nodejs/node/pull/65912
Refs: https://github.com/nodejs/node/pull/64543
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-09 02:51:23 +00:00
Trivikram Kamat dfcfe251f8 vfs: return FileHandle from fs.promises.open
Wrap mounted virtual file descriptors in the public FileHandle
interface while delegating operations to the underlying provider
handle.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/65730
Fixes: https://github.com/nodejs/node/issues/65729
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-09 01:34:40 +00:00
Trivikram Kamat 36f16e7eba doc: qualify directory read ordering for native fs
Clarify that the documented operating system directory ordering applies
to reads handled by the native file system.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/65868
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-09 01:34:28 +00:00
Trivikram Kamat f9072f37ed sqlite: always copy changeset before applying
SQLite can invoke JavaScript through user-defined SQL functions while
applying a changeset, even when no filter or conflict callback is set.
Copy non-empty changesets unconditionally so JavaScript cannot detach
or modify the input while SQLite is still reading it.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex
PR-URL: https://github.com/nodejs/node/pull/65870
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-09 01:34:15 +00:00
Antoine du Hamel dab3a73673 doc: fix YAML errors due to bad conflict resolutions
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65921
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-09 00:58:39 +00:00
James M Snell 7055c484ff zlib: improve zstd decoding across chunk boundaries
Discovered when testing some other changes that zstd was not
handling certain chunk boundaries very well. This fixes it.

- Decodes concatenated and skippable zstd frames across all
  chunk boundaries.
- Preserves rejectGarbageAfterEnd semantics.
- Reports corruption in subsequent frames.
- Handles trailing partial frame identifiers consistently.
- Covers classic sync/async and iterable APIs.
- Updated documentation and internal typings.

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/65865
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-09-08 23:49:10 +00:00
Antoine du Hamel 9afe7dc6ad 2026-09-08, Version 24.21.0 'Krypton' (LTS)
Notable changes:

crypto:
  * update root certificates to NSS 3.126 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/65495
  * (SEMVER-MINOR) support loading private keys through STORE loaders (Filip Skokan) https://github.com/nodejs/node/pull/63949
deps:
  * update OpenSSL to 3.5.8 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/65542
  * update Undici to 7.29.1 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/65789
lib,src:
  * (SEMVER-MINOR) improve histogram implementation (James M Snell) https://github.com/nodejs/node/pull/65024
net:
  * (SEMVER-MINOR) improve performance of `net.BlockList` (James M Snell) https://github.com/nodejs/node/pull/64974
perf_hooks:
  * (SEMVER-MINOR) add statistical hypothesis testing to histogram (James M Snell) https://github.com/nodejs/node/pull/65416
util:
  * (SEMVER-MINOR) add non-throwing `MIMEType.parse` (James M Snell) https://github.com/nodejs/node/pull/64965

PR-URL: https://github.com/nodejs/node/pull/65873
2026-09-08 23:47:03 +02:00
James M Snell 60e363046f stream: improve handling of falsy errors in stream/iter
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/65864
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2026-09-08 20:56:03 +00:00
Matteo Collina 23a05a6e98 test: fix flaky test-bench-stream
testDeliveryDoesNotConsumeTimeout gave the benchmark a 20ms timeout
while stalling the consumer for 50ms. Only delivery time is credited
back to the deadline, so the 32 samples still had to run within 20ms,
which is about a 10x margin on an idle machine and not enough on a
loaded CI runner.

Scale the timeout and the stall together so the benchmark's own work
gets 500ms of headroom while the consumer still stalls for longer than
the timeout.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/65874
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-08 20:13:32 +00:00
Philipp Dunkel 3202f6376f vfs: give ZipProvider option bags a null prototype
The options passed to `createFileStats()` and to the archive's `add()`
and `addSync()` are plain literals, so a property added to
`Object.prototype` would reach those callees as if it had been passed
on purpose. Create them with a null prototype so only the fields set
here are visible.

Refs: https://github.com/nodejs/node/pull/65853
Signed-off-by: Philipp Dunkel <pip@pipobscure.com>
PR-URL: https://github.com/nodejs/node/pull/65853
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-09-08 21:31:56 +02:00
Philipp Dunkel 36d8fce817 vfs: commit ZipProvider handles the way open(2) does
A ZipProvider handle adds its entry to the archive when it is closed.
Give that model the effects a real open(2) has up front, and keep the
metadata an entry already carries:

* A handle whose flags create or truncate the file starts out dirty,
  so closing it without a write still creates the missing entry or
  truncates the existing one.
* The handle remembers the entry's own mode and modification time.
  The re-added entry keeps that mode instead of taking the `mode`
  argument `open()` was given (fs's default 0o666), so a 0o755 script
  survives an append or an in-place write; only a newly created file
  takes the mode from `open()`.
* `fstat` reports that mode and, until the handle has changed the
  file, that modification time.
* `rename` refuses to move a file onto an existing directory with
  EISDIR before touching the archive.

Signed-off-by: Philipp Dunkel <pip@pipobscure.com>
PR-URL: https://github.com/nodejs/node/pull/65853
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-09-08 21:31:51 +02:00
Philipp Dunkel 407a9ec743 vfs: apply open(2) effects to ZipProvider handles
A ZipProvider handle keeps its content in memory and adds the entry to
the archive when it is closed, and only if something was written. The
effects a real `open(2)` has at open time are therefore lost, and so is
the metadata the entry already carried:

* `open(path, 'w')` followed by `close()` neither truncates an existing
  entry nor creates a missing one; the same holds for "a" on a missing
  file. Tools that touch or truncate by open-then-close do nothing.
* Rewriting an entry (append, or an in-place write through "r+") re-adds
  it with the `mode` argument `open()` received (fs's default 0o666),
  not the mode the entry had, so a 0o755 script silently loses its
  executable bit.
* `fstat` on a handle reports that same `open()` mode and the current
  time instead of the entry's mode and modification time.
* Renaming a file onto an existing directory succeeds and leaves a name
  that is both a file and a directory; real file systems refuse with
  EISDIR.

This adds a test for each of these against a mounted ZipBuffer, stating
the real-fs outcome as the expectation.

Proposed solution: mark the handle dirty at open time when the flags
imply creation or truncation, so close always commits; carry the
existing entry's mode and modification time on the handle, use them
for `fstat` and for the re-added entry, and only fall back to the
`open()` mode for a newly created entry; and reject `rename` onto an
existing directory with EISDIR before touching the archive.

Signed-off-by: Philipp Dunkel <pip@pipobscure.com>
PR-URL: https://github.com/nodejs/node/pull/65853
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-09-08 21:31:49 +02:00
James M Snell 450450c15a quic: split headers out from src/quic/stream.{h/cc}
As part of the effort to get better separation between
the generalized QUIC streams and HTTP/3 streams, separate
out header handling from the C++ class.

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/65863
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-09-08 18:01:43 +00:00
Marten Richter ee354929da quic: fix crash in onStreamClose
onStreamClose could crash, if this[kOwner]
was not set.

Signed-off-by: Marten Richter <marten.richter@freenet.de>
PR-URL: https://github.com/nodejs/node/pull/65861
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
2026-09-08 17:43:27 +00:00
Avocado e4186d6942 doc: add DOMException section to errors API reference
Document DOMException on the Errors page (with a Globals cross-link)
and clarify AbortError vs DOMException for AbortSignal users.
Builds on #64236 review feedback. Fixes #40789.

Signed-off-by: Avocado <ujubongbong@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65206
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-09-08 17:34:05 +00:00
Trevor Burnham 523ac2c43d test: move sqlite length validation out of the reentry test
The "non-integer callback length" suite in
test-sqlite-options-getter-reentry.js checks that function() and
aggregate() reject a callback whose length property is not an integer.
That is plain argument validation: no property getter runs, and nothing
changes mid-call, so the tests do not belong in a file about option
getters re-entering the database.

Move them into the "input validation" suites that already cover the
other argument type checks for each method. Drop "a normal function
length is still accepted", which duplicates "uses function.length when
false" in test-sqlite-custom-functions.js.

The two tests that put the getter on length itself stay where they are,
since closing the database from that getter is what they exercise.

Refs: https://github.com/nodejs/node/pull/65595
Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65769
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-08 17:33:51 +00:00
Gürgün Dayıoğlu 244f86c556 stream: amortize writable buffer compaction
Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/65847
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-08 17:33:28 +00:00
Filip Skokan 7c5115d001 tools: improve benchmark build cache reuse
Match Linux x64 benchmark builds to the Perfetto-enabled V8
configuration already cached by shared-library CI.

Enable the GHA sccache backend in read-only mode for base builds.
Retain the compiler wrapper for incremental PR builds, but stop the
remote-backed server and use a read-only local cache for PR code.

Assisted-by: GitHub Copilot
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65859
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-08 16:13:56 +00:00
Filip Skokan d2e49c83a5 tools: apply feedback to and simplify contributor guidance workflow
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65785
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-09-08 15:58:10 +00:00
Trevor Burnhamandmike-git374 41cb09f8a5 sqlite: bind undefined to NULL
Omitting a named parameter binds NULL, but passing `undefined` for that
same parameter threw ERR_INVALID_ARG_TYPE. Bind `undefined` to NULL so
the two forms agree. This matches the conversion already applied to a
user-defined function's `undefined` return value, as well as SQLite's
own WASM oo1 API.

Fixes: https://github.com/nodejs/node/issues/61824
Refs: https://github.com/nodejs/node/pull/61472
Refs: https://github.com/nodejs/node/pull/62008
Co-authored-by: mike-git374 <217764531+mike-git374@users.noreply.github.com>
Assisted-by: claude:opus-5
Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65709
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-09-08 15:50:32 +00:00
Filip Skokan 345074e360 meta: add web-standards as webidl owners
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65856
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-09-08 15:20:27 +00:00
Filip Skokan 39ba3b5ae6 lib: optimize internal Web IDL dictionaries
Flatten dictionary members at construction while preserving inheritance
order. Skip member scans for nullish inputs without defaults or required
members, and define own descriptor properties to avoid inherited
setters.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65857
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-08 15:20:15 +00:00
Seongeun Lee 286bc85053 typings: add task_queue internal binding types
Add a TaskQueueBinding declaration for internalBinding('task_queue')
and wire it into InternalBindingMap.

Signed-off-by: leah-1ee <selee3196@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65662
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-09-08 14:39:39 +00:00
Guy Bedford f955c20dd1 net: support sending net.BoundSocket to threads and child processes
This adds support for transferring net.BoundSocket instances to other
threads via the worker_threads postMessage() transfer list, and for
sending them to child processes as the sendHandle argument of
subprocess.send(), following on from the BoundSocket introduction.

A BoundSocket reserves a port synchronously at construction time.
Making it transferable means a port can be reserved on one thread or
process and the bound (but not yet listening or connected) TCP handle
handed off to another to listen or connect on, without racing on the
bind.

For threads, BoundSocket implements kTransfer/kTransferList/
kDeserialize, moving the underlying TCP handle with the same mechanism
used for net.Socket and net.Server transfer. For child processes, the
handleConversion entry reuses the same transfer protocol on the
sending side and the same _TransferredBoundSocket deserialization path
on the receiving side; the underlying transport is that of cluster's
shared-handle scheduling: SCM_RIGHTS on Unix and WSADuplicateSocket on
Windows, both of which carry bind state.

In both cases the source instance is left in the adopted state:
address(), fd() and close() throw ERR_SOCKET_HANDLE_ADOPTED. Transfer
requires an un-adopted, open TCP handle, otherwise
ERR_WORKER_HANDLE_NOT_TRANSFERABLE is thrown; pipe (path) binds are
not transferable and throw ERR_INVALID_HANDLE_TYPE when sent over IPC.
On the receiving side the local address is re-derived from the handle
rather than trusted from serialized state.

Signed-off-by: Guy Bedford <guybedford@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64725
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-08 16:05:22 +02:00
Filip Skokan 51cb9f46a5 crypto: validate the limit of PBKDF2 iterations
Reject iteration counts outside of OpenSSL supported range

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65704
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-09-08 12:54:46 +00:00
Filip Skokan 271833006c crypto: use primordials in HKDF info validation
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65704
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-09-08 12:54:45 +00:00
Mike McCready 51c992f99b doc: expand revert commit collaborator instructions
Advise to add dont-land labels to commit and revert commit pairs
to prevent redundant backporting.

Signed-off-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/65848
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-09-08 12:04:56 +00:00
Philipp Dunkel 2d9c861a15 vfs: align virtual file handles with open(2)
A file descriptor obtained on a mounted path answers several `node:fs`
calls differently from one on a real file, in both providers:

* `writeFileSync(path, data, { flag: 'r+' })` replaces the whole file
  instead of overwriting bytes from offset 0 and keeping the tail.
* Numeric open flags are mapped by treating any write-ish bit as "w":
  `O_WRONLY` alone truncates, and `O_RDONLY | O_CREAT` opens the file
  write-only and truncates it.
* A handle opened with "a+" starts its read offset at the end of the
  file, so the first read returns nothing; O_APPEND only affects writes.

The ZipProvider handle additionally:

* throws EISDIR instead of EBADF when reading a write-only handle or
  writing a read-only one;
* leaves stale bytes in place when `ftruncate` grows a file that was
  previously shrunk, where real files read back as zeros;
* rejects a BigInt `position` with a TypeError from mixing number and
  BigInt arithmetic.

This adds a test that runs the same sequence of calls against a memory
mount and a ZIP mount and expects the real-fs result, so every
divergence shows up as its own failing case.

Proposed solution: decode numeric flags bit by bit (O_TRUNC decides
truncation, O_CREAT decides creation, O_WRONLY/O_RDWR decide access)
instead of collapsing them to a flag string; keep the read offset at 0
for append handles and only force writes to the end; make the handle
`writeFile` for non-truncating flags write at offset 0 without
shrinking; in the ZIP handle use EBADF for access-mode violations,
zero-fill on growth in `#doTruncate`, and coerce `position` with
`Number()` as the memory handle does.

Signed-off-by: Philipp Dunkel <pip@pipobscure.com>
PR-URL: https://github.com/nodejs/node/pull/65854
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-09-08 11:35:41 +00:00
Mike McCready aea5aadcd6 doc: clarify supported Python releases
Exclude Python pre-release versions

Signed-off-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/65850
Fixes: https://github.com/nodejs/node/issues/65599
Refs: https://github.com/nodejs/node/pull/65750
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-09-08 11:24:14 +00:00
Filip Skokan 70458d593d lib: validate sequence iterator objects
Reject primitive iterator factory results before accessing next, as
required by GetIteratorFromMethod.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65844
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2026-09-08 08:50:33 +00:00
Filip Skokan 0a9225dd16 lib: use Web IDL interface brand checks
Use explicit brand predicates for interface conversion instead of
prototype ancestry. Update CryptoKey and AbortSignal together with the
shared converter contract.

Read internal AbortSignal state during composition. Preserve genuine
signals after prototype changes without invoking shadowed getters.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: GitHub Copilot
PR-URL: https://github.com/nodejs/node/pull/65846
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-09-08 08:50:21 +00:00
Sparsh :) 2987a5965f fs: support removing read-only files in rmSync on Windows
On Windows, libc++ std::filesystem::remove and remove_all do not
automatically clear the read-only attribute before deleting a file
(unlike MSVC STL). This causes fs.rmSync to fail with EPERM when
trying to remove read-only files in environments where Node.js is
built using clang libc++ (such as Electron).

This commit introduces a Windows-specific helper
ClearReadOnlyAttributeW which clears the FILE_ATTRIBUTE_READONLY
attribute recursively (or for a single file) when
operation_not_permitted is returned, allowing rmSync to
successfully delete read-only files/folders.

Fixes: https://github.com/nodejs/node/issues/64374

Signed-off-by: SparshGarg999 <sparshgarg999@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64453
Fixes: https://github.com/nodejs/node/issues/64374
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2026-09-08 04:53:09 +00:00
greenhead be41ec7917 typings: add timeoutInfo to TimersBinding
Signed-off-by: greenhead <greenheadhq@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65811
Refs: https://github.com/nodejs/node/pull/46014
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-08 02:34:41 +00:00
이혜미 2f0892aaa7 typings: add missing sea binding properties
Signed-off-by: hyemimi <hyemi7375@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65815
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-08 02:34:31 +00:00
Shelley Vohr b949c28b79 doc: note that FreeEnvironment() runs a shared event loop
The embedder docs say each Environment has exactly one `uv_loop_t` and
that an `IsolateData` can be shared between Environments, and
`CreateIsolateData()` takes the loop, so several same-thread
Environments naturally end up on one loop. Nothing mentions that
`FreeEnvironment()` then runs that loop, with JavaScript disallowed on
the isolate, until the freed Environment's handles are gone, so the
other Environments' callbacks can fire inside it. Document that, and
point at it from `FreeEnvironment()` in node.h.

Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65691
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-09-08 01:33:06 +00:00
Node.js GitHub Bot ad2d452574 deps: update googletest to 283c17563fe7a1111cd7f581aa5d541e8baeff2f
PR-URL: https://github.com/nodejs/node/pull/65833
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-08 01:32:56 +00:00
Node.js GitHub Bot 2452a0c876 deps: update simdjson to 4.6.11
PR-URL: https://github.com/nodejs/node/pull/65834
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-08 01:32:47 +00:00