Commit Graph
49627 Commits
Author SHA1 Message Date
Yagiz Nizipli 94734c72ee test: update WPT for url to 2fa965b55c
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
Assisted-by: Grok
2026-11-19 15:27:19 -05:00
Node.js GitHub Bot 0d5029070a deps: update ada to 4.1.1 2026-11-19 20:22:12 +00:00
Guilherme Araújo f0eb690cf1 sqlite: avoid resetting a finalized statement
run() and get() reset a cached statement pointer on exit. Throwing an
error can run an Error.prototype setter that closes the database and
frees it. Reset through the Statement, which Finalize() clears.

Assisted-by: Claude Code
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67557
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
2026-11-19 19:24:27 +00:00
Chengzhong Wu 7bfa50aa94 doc: add verification steps of V8 major upgrades
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/67559
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-11-19 19:24:13 +00:00
Marten Richter 3521a6e311 quic: add option waitUntilAvailable to creating streams
We add an option to createBidirectionalStream and
createUnidirectionalStream to fail immediately,
if the flow control's stream budget does not
allow stream creation.
The behavior matches W3C webtransport's behavior.

Fixes #65321

Signed-off-by: Marten Richter <marten.richter@freenet.de>
PR-URL: https://github.com/nodejs/node/pull/65331
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-19 19:14:32 +00:00
Tim Perry eda8de765b http2: don't fail response reads after clean RST_STREAM
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67558
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-19 19:14:15 +00:00
Faris Basha TM 108cbef0df doc: fix SEA implementation link in maintaining guide
lib/internal/main/single_executable_application.js no longer exists;
single executable applications now run their main script through
lib/internal/main/embedding.js. Point the guide at that file.

Signed-off-by: farisbasha <farisbashatm@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67555
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-11-19 18:01:01 +00:00
Vlad Frangu 42800b60d3 os: expose guessFileDescriptorType
Exposes the internal `guessHandleType` function as
`guessFileDescriptorType`, which can be used to see if a handle has a
specific type, regardless of the OS it is on.

This helps out with detecting, for example, if standard input is piped
into the process, instead of relying on file system calls.

Refs: https://github.com/nodejs/node/issues/57603
Signed-off-by: Vlad Frangu <me@vladfrangu.dev>
PR-URL: https://github.com/nodejs/node/pull/58060
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-11-19 10:46:13 -07:00
Tim Perry db671bb416 http2: fix eos() for HTTP/2 streams after clean end & close
Previously this could fail - not having read 'end' when the close
arrived was treated as a premature close error for finished() and
related APIs, even though the body data was cleanly ended and complete.
We now check whether there is a clean end buffered. If so, we wait
until it's read before evaluating whether the stream ended cleanly.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67553
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-19 17:41:27 +00:00
Matteo Collina f4fab9770b module: avoid dictionary-mode objects on hot paths
V8 keeps objects created from `{ __proto__: null }` literals, and from
v8::Object::New() with names and values, in dictionary mode for their
whole life. The module loader created such objects on every require()
of a builtin and every import(), and kEmptyObject, the cached ESM
resolve results and the requests from getModuleRequests() were all
in dictionary mode as well.

Use classes with a null-prototype prototype for the per-call objects,
null the prototype of plain literals for the long-lived ones, and
build module requests from a DictionaryTemplate.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/67552
Refs: https://adventures.nodeland.dev/archive/optimizing-objects-with-null-prototypes/
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-11-19 17:31:56 +00:00
Ethan Arrowood 88b034fa75 quic: fix h3 session close on early stream destroy
If the stream is destroyed right after sendHeaders(), nghttp3 still has
the response headers queued. On the next write it asks for the removed
stream's body, the read callback fails, and the whole session closes
without notifying the peer.

In an HTTP/3 session, before clearing nghttp3's pointer to a stream when
the stream is destroyed, shut down nghttp3's writes for that stream so
that other requests can continue to complete.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ethan Arrowood <ethan@arrowood.dev>
PR-URL: https://github.com/nodejs/node/pull/67446
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-19 17:13:16 +00:00
Gürgün Dayıoğlu 41918c1d44 buffer: use typed arrays for 64-bit BigInt accessors
readBig(U)Int64{LE,BE}() and writeBig(U)Int64{LE,BE}() assembled and
split values with BigInt arithmetic, allocating intermediate BigInts on
every call. Copy the bytes through BigInt64Array and BigUint64Array
views over the existing 8-byte scratch buffer instead, as the double
accessors already do.

Range and bounds checks are unchanged, and the value is masked with
`& -1n` before the store so non-BigInt values still throw the same
TypeError instead of being coerced by the typed array.

benchmark/buffers/buffer-read.js now uses the value it reads. The
loop discarded it, which let V8 remove side-effect-free reads
altogether.

Assisted-by: claude:opus-5.5
Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day>
PR-URL: https://github.com/nodejs/node/pull/67549
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-19 17:13:01 +00:00
Ethan Arrowood 86b9e3544c http,http2: copy header arrays in setHeader
setHeader() stored the caller's array and that led to mutation
issues with appendHeader() pushing new values into it. The caller
would see values added to that array, and if the array was frozen
appendHeader() would throw a TypeError.

This fix copies the array value instead so the response instance
owns it completely. getHeader() still return the stored array.

It also applies the same change to HTTP2 compat api.

Fixes: https://github.com/nodejs/node/issues/67526
Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ethan Arrowood <ethan@arrowood.dev>
PR-URL: https://github.com/nodejs/node/pull/67528
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-11-19 16:50:31 +00:00
Yuya Inoue f442b5a232 http2: add callback to informational header methods
In the HTTP/1 server, writeContinue(), writeEarlyHints() and
writeInformation() accept a callback that is called once the response
has been written to the socket. The HTTP/2 compat versions did not, so
code moving to the compat API had its callback ignored.

Accept an optional callback in http2stream.additionalHeaders() and in
the three compat methods. The request for the HEADERS frame is tracked
until nghttp2 serializes the frame, and completed together with the
write to the underlying stream that carries it.

Signed-off-by: inoway46 <inoueyuya416@gmail.com>
Assisted-by: claude:opus-5.5
PR-URL: https://github.com/nodejs/node/pull/67470
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-19 16:39:21 +00:00
Antoine du Hamel e25c991759 tools: avoid swallowing errors in GHA
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67548
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-19 16:29:10 +00:00
Jacky Zhao 0c8797b2a6 module: don't map a trailing generated-only segment
The mappings parser detects a segment that has only a generated column
by peeking at the next character. At the end of the mappings string the
peek returns an empty string, which is not a separator, so a final
generated-only segment is decoded with phantom zero deltas and inherits
the source, line, and column of the segment before it. With
--enable-source-maps, stack frames in code after the last mapped
segment are then attributed to the last mapped source.

Check for the end of the string before reading source fields.

Signed-off-by: Jacky Zhao <j.zhao2k19@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66264
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-19 15:50:19 +00:00
Joyee Cheung ab55d75c43 test: make test-v8-collect-gc-profile-minor-ms more robust
There can be more than one garbage collection triggered by
one gc() call and it's not controllable by Node.js.
Update the assertion to check that at least one expected
GC is there, but don't check that there aren't more.

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67547
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-19 15:40:46 +00:00
Chengzhong Wu 709bd4f74a tools: link Rust backtrace crates in make-v8.sh
Chromium's build no longer lists the Rust std backtrace crates in
`stdlib_files`, because its own std is built without backtrace support.
The system Rust toolchain used by `make-v8.sh` ships a std built with
it, so linking mksnapshot fails with undefined `gimli` and `addr2line`
symbols. Pass the crates through `added_rust_stdlib_libs`, which
replaces the libadler patch of `build/rust/std/BUILD.gn`.

Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:36:16 -05:00
Chengzhong Wu 1325a65834 build: fix v8_internal_headers sources scraping
V8 now starts the `v8_internal_headers` source list with `sources = []`.
The GN scraper skips the empty list and matches
`v8_compiler_sources = [` instead, so every dependent of
`v8_internal_headers` compiled all of the compiler sources again. That
breaks the shared library link with duplicate symbols. Match the
`sources += [` list that holds the headers.

Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:36:14 -05:00
Chengzhong Wu 585e39e648 deps,v8: patch V8 to fix build with libstdc++ older than 12.3
libstdc++ before 12.3 passes the predicate of `std::erase_if` on a
`std::map` a const reference, so `KnaMap::EraseIf`, whose predicate
mutates the mapped value, fails to compile. Replace it with an explicit
erase loop.

Refs: https://gcc.gnu.org/PR107850
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:34:55 -05:00
Michaël ZassoandJoyee Cheung 697c575af4 src,test: use non-deprecated v8::FunctionCallbackInfo::DataV2 API
Co-Authored-By: Joyee Cheung <joyeec9h3@gmail.com>
Signed-Off-By: Michaël Zasso <targos@protonmail.com>
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:34:49 -05:00
Chengzhong Wu 5cefeb1dc8 test: remove test on --harmony-struct
V8 deprecated --harmony-struct.

Refs: https://chromium-review.googlesource.com/c/v8/v8/+/8610686
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:34:43 -05:00
Joyee Cheung 0402a6f317 build: use v8_use_metagen in build flags
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/8524366
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:34:37 -05:00
Joyee Cheung 16a3a6aa25 build: add simdutf dependency to torque_base
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/8459484
Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:34:21 -05:00
Manish Goregaokar 92ca838621 deps: V8: cherry-pick a05177279022
Original commit message:

    [temporal] Compute zoneinfo64.res length from ResB index table

    ICU4C's offsetTOCLookupFn sets UDataMemory::length = -1 for the last
    entry in a .dat archive (which occurs for zoneinfo64.res in small-icu
    builds where zu.res is excluded), and pointerTOCLookupFn sets length = -1
    for all entries in pointer TOC builds.

    When UDataMemory::length is -1, compute the bundle byte length from the
    ResB header offset (udata_getMemory(memory) - data) and the
    self-describing URES_INDEX_BUNDLE_TOP word in the ResB index table,
    matching ICU4C's res_init() in uresdata.cpp. Also check USING_SYSTEM_ICU
    in addition to V8_ENABLE_TEMPORAL_SYSTEMICU when deciding whether
    internal udatamem.h is available.

    Bug: 576986967
    Change-Id: I7a2c881eb3891a97eafb244f71aa405ff2434b51
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8642579
    Commit-Queue: Manish Goregaokar <manishearth@google.com>
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#111181}

Refs: https://github.com/v8/v8/commit/a0517727902272117b79281998dc0d5d4da0fa49
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:34:16 -05:00
Joyee Cheung 57e6b3cf40 deps: V8: cherry-pick c38986131c02
Original commit message:

    Add V8_DISABLE_PRESERVE_MOST for embedders to opt out of preserve_most

    preserve_most changes the calling convention, which clang
    encodes in the mangled name (e.g. "U" instead of "A" for cdecl in the
    Microsoft C++ ABI). A consumer whose toolchain does not support
    the attribute would reference a differently mangled symbol.
    This patch adds a V8_DISABLE_PRESERVE_MOST to disable it, so that
    it's possible to link to V8 using different toolchains, as long
    as the value of it is set consistently.

    Refs: https://github.com/nodejs/node/pull/55784

    Change-Id: I67b49e739942d4026ac060be35bb39ec22256cbd
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8532546
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#111381}

Refs: https://github.com/v8/v8/commit/c38986131c02b6f24eb31d99d76ebf312a2b99aa
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:34:05 -05:00
Joyee CheungandDan McDonald cb5e7a8fd7 deps: V8: cherry-pick 011b2de3051a
Original commit message:

    [sandbox] fix dispatch table access on illumos

    illumos pointers are VA48, can allocate from the top of the 64-bit range
    as well.

    Co-Authored-By: Dan McDonald <danmcd@mnx.io>
    Refs: https://github.com/nodejs/node/pull/65161
    Change-Id: I7d803ca0da2ab6c7cc206cb964d63683523a13da

Refs: https://github.com/v8/v8/commit/011b2de3051afad5f0adb7b9dfedffa888c0a07b
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:33:56 -05:00
Chengzhong Wu 441a758ced src: update NODE_MODULE_VERSION to 155
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 15.8.

Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:33:39 -05:00
Chengzhong Wu 8a0a9da54a build: reset embedder string to "-node.0"
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:33:28 -05:00
Chengzhong Wu c3db6d5951 deps: update Rust crates for V8 15.8.62.44
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:33:17 -05:00
Chengzhong Wu ecb98ee45b deps: update V8 to 15.8.62.44
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/67070
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-19 10:33:09 -05:00
René c91d8aa1a5 fs: use try...finally for abort race
Signed-off-by: Renegade334 <rene@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/67545
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-19 14:57:12 +00:00
Robert Nagy 029acbfbd7 lib: stop refreshing composite AbortSignals
AbortSignal.any() follows its sources as soon as it creates a
composite, so aborting a source synchronously aborts every composite
that follows it. The aborted and reason getters and throwIfAborted()
still walked the composite's sources on every call and dereferenced
the WeakRef of each one, which is expensive because
WeakRef.prototype.deref() adds its target to the kept objects of the
current job.

That walk can no longer find an aborted source of a composite that
isn't aborted itself, so remove it. throwIfAborted() on a composite
with two sources becomes about 17 times faster, the same as on a
plain signal.

Add a benchmark for throwIfAborted() on plain, timeout, composite and
mixed signals.

Assisted-by: claude:opus-5.5
Signed-off-by: Robert Nagy <ronagy@icloud.com>
PR-URL: https://github.com/nodejs/node/pull/67543
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-19 14:16:59 +00:00
Mike McCready 4f37a6a8aa build,win: update WinGet configurations to Python 3.15
Signed-off-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/67431
Refs: https://github.com/nodejs/node/pull/65750
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2026-11-19 08:51:19 +00:00
Trivikram Kamat d9e18d51d5 vfs: normalize RealFSProvider mkdir return paths
RealFSProvider.mkdirSync()/mkdir() forwarded the raw fs.mkdirSync()
result, which for { recursive: true } is the absolute backing-directory
path of the first created directory. VirtualFileSystem#toMountedPath()
then joined the mount point with it, producing <mount>/<root>/a instead
of <mount>/a, so the returned path failed fs.existsSync().

Reuse the existing #resolvedToVfsPath() helper (as realpath does) to
translate the result back to a provider-relative VFS path, matching
MemoryProvider.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: opencode
PR-URL: https://github.com/nodejs/node/pull/66221
Fixes: https://github.com/nodejs/node/issues/66220
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-19 08:20:45 +00:00
Matteo Collina c47b8d8781 url: restrict option copying in urlToHttpOptions to URL instances
Only spread own enumerable properties for URL instances created by this
realm's URL constructor. Duck-typed objects accepted by isURL() can no
longer smuggle connection options (socketPath, method, headers, agent)
into a request.

This fixes a footgun where a hostname-validated http.request() could be
redirected to a Unix socket (e.g. the Docker daemon) via a URL-shaped
object, bypassing hostname-based SSRF checks. Extending a genuine URL
object with extra options is preserved.

Refs: https://github.com/nodejs/node/pull/46989
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/67454
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-11-19 08:20:21 +00:00
Ved Chaudhari cdd06876da fs: restore stack traces of fs/promises stat permission errors
Since stat() started going through raceWithSignal(), permission
errors from fsPromises.stat() have had no stack frames. The binding
rejects them right away, and raceWithSignal() returned that promise
from an async function without awaiting it, so nothing was awaiting
it yet when the stack was captured.

Return the promise as is when there is no signal, so stat() awaits
it directly again.

Refs: https://github.com/nodejs/node/pull/63143
Signed-off-by: vedchaudhari <vedc2853@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67525
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
2026-11-19 03:40:55 +00:00
inoway46 371ac095ac tls: destroy sockets after fatal errors
Destroy established TLS sockets on fatal errors so pending writes
cannot prevent HTTP/2 session cleanup from completing. Defer closing
until after error handling to preserve connection details for listeners.

Add regression coverage for standalone TLS socket closure and HTTP/2
cleanup with default and custom TLS connections.

Fixes: https://github.com/nodejs/node/issues/67213
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/67215
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-19 02:21:25 +00:00
inoway46 3f61461631 net: clear closed handles before emitting close
Clear a deferred socket handle before invoking close listeners. TLS has
already freed its SSL state at this point, so retaining the handle lets
getProtocol() access a null SSL pointer and crash the process.

Keep connection details available during tlsClientError and add coverage
for querying the protocol after a failed handshake closes the socket.

Signed-off-by: inoway46 <inoueyuya416@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/67215
Fixes: https://github.com/nodejs/node/issues/67213
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-19 02:21:24 +00:00
Tim Perry b7df44bf9c tls: docs-deprecate TLS renegotiation, add allowRenegotiation opt-in
For now this changes very little, but offers an option to directly
control whether this is supported. In future, this will default to
'false' (disabling by default) and eventually be mostly removed,
except opt-in client support for accepting renegotiation requests
from servers.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67532
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-18 22:39:56 +00:00
René c84f6149f2 tools: fix incorrect environment variable in coverage-windows
Signed-off-by: René <rene@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/67591
Refs: https://github.com/nodejs/node/issues/67589
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-11-18 22:27:35 +00:00
Christian Aurich Zanettini Martins d15ad82c29 quic: validate maxPayloadSize range
The maxPayloadSize option was copied into ngtcp2's
max_tx_udp_payload_size unchecked. ngtcp2 requires 1200 to 65527 and
only asserts it, so in a release build 0 gave the congestion controller
an empty initial window and the process died with SIGFPE in
ngtcp2_cc_cubic_init() when the connection was created. Values from 1
to 1199 were accepted and the session was destroyed before it opened.

Reject values outside that range when the session options are parsed,
for both connect() and listen().

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67531
Refs: https://github.com/nodejs/node/pull/65827
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-18 21:16:54 +00:00
Ethan Arrowood 0f2c06155d tools: apply http lint rule to lib/internal/http
The `lib/_http_*.js` files moved to `lib/internal/http/` recently.
But the ESLint config still only listed the old paths. The moved
files lost the "Do not use prototype primordials in this file"
check that other HTTP hot paths have.

This change adds `lib/internal/http/*.js` to that rule list. The
files already comply so no other changes are needed.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ethan Arrowood <ethan@arrowood.dev>
PR-URL: https://github.com/nodejs/node/pull/67529
Refs: https://github.com/nodejs/node/pull/58535
Reviewed-By: Efe Karasakal <hi@efe.dev>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-11-18 20:00:13 +00:00
Lazizbek Ergashev 5a823400b2 lib: end --eval crypto wrapper code with a newline
Assisted-by: Claude Code
Signed-off-by: lazerg <lazerg2@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67162
Fixes: https://github.com/nodejs/node/issues/67159
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-11-18 17:55:41 +00:00
Ethan Arrowood 8e494d4b1b build: trigger devcontainer build from daily
Sends a node-daily event to the nodejs/devcontainer repo to trigger
a new devcontainer build upon a successful daily build. It shares
the specific associated commit so the exact devcontainer is built.

Requires: https://github.com/nodejs/devcontainer/pull/31

Signed-off-by: Ethan Arrowood <ethan@arrowood.dev>
PR-URL: https://github.com/nodejs/node/pull/67153
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Tierney Cyren <hello@bnb.im>
2026-11-18 17:37:18 +00:00
Ravi Arnan Irianto dd425b79bf test: fix zipinfo non-ascii check in test-zlib-zip-interop
Keep UNICODE_SUPPORT guard so macOS skips checking non-ASCII names
in zipinfo output, and accept '?' / U+FFFD placeholders on builds
with UNICODE_SUPPORT that filter non-ASCII bytes in fnfilter()
without wide-character printing support (such as NixOS or Gentoo).

Fixes: https://github.com/nodejs/node/issues/66975
Signed-off-by: Ravi Arnan <raviarnankeren@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66978
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Philipp Dunkel <pip@pipobscure.com>
2026-11-18 13:18:53 +00:00
Matteo Collina 273f2176a3 sea: add source maps for SEA with VFS
SEA binaries built with "useVfs" can now load source maps from the
bundled assets (or the "vfsArchive" archive) and apply them to stack
traces and error output, because fs reads are routed through the virtual
file system mounted by the SEA.

Add two tests covering the inline-assets and zip-archive VFS paths, each
asserting that findSourceMap() resolves against the mount point and that
a thrown error's frame and source line are remapped to the original
source. Also document how to enable and bundle source maps in a SEA.

Signed-off-by: Matteo Collina <matteo.collina@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67503
Reviewed-By: Philipp Dunkel <pip@pipobscure.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-18 13:18:32 +00:00
Stewart X Addison ab5fac79ac build: fix AIX shared library exports generation
Signed-off-by: Stewart X Addison <sxa@ibm.com>
Assisted-by: Cursor
PR-URL: https://github.com/nodejs/node/pull/67359
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-11-18 12:50:56 +00:00
James M Snell d77ed7854e fs: move DEP0187 to End-of-Life
Passing an invalid argument type to fs.existsSync() now throws
ERR_INVALID_ARG_TYPE instead of returning false. Other invalid paths,
such as strings containing null bytes or non-file: URLs, continue to
return false.

This has been a runtime deprecation since v24.0.0.

Refs: https://github.com/nodejs/node/pull/55753
Refs: https://github.com/nodejs/node/pull/55892
Assisted-by: Claude
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67494
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-11-18 12:02:29 +00:00
Marcel f8dd0aae2f test: fix on zfs build host
Signed-off-by: Marcel <me@m4rc3l.de>
PR-URL: https://github.com/nodejs/node/pull/67517
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-11-18 11:43:12 +00:00