Commit Graph
49515 Commits
Author SHA1 Message Date
LiviaMedeiros ab476eccd0 test: remove unnecessary imports for TextDecoder and TextEncoder
Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/67461
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-11-16 08:51:58 +08:00
LiviaMedeiros 329497afb5 doc: swap util.TextDecoder and util.TextEncoder with globals
Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/67461
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-11-16 08:51:58 +08:00
LiviaMedeiros 1260eeea40 doc: use global TextDecoder and TextEncoder instead of util
Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/67461
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-11-16 08:51:57 +08:00
LiviaMedeiros 8dbdd03581 doc: deprecate util.TextDecoder and util.TextEncoder
Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/67461
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-11-16 08:51:57 +08:00
Matteo Collina 2feb5c8aad tls: normalize session buffer views
Client sessions can be supplied as ArrayBuffer views, but session state
checks only recognize Buffers. Normalize views to Buffers before
applying those checks, preserving their byte offset and length.

This hardens session reuse handling and keeps tagged sessions reusable
when stored as typed arrays.

Assisted-by: Codex
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/67251
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-11-16 00:31:32 +00:00
Roberto Bianchi d0d82d9990 lib: use indexed appends for dependent signals
Avoid a primordial push call for each dependent signal.

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
PR-URL: https://github.com/nodejs/node/pull/67299
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-15 22:01:21 +00:00
Hilary Asogwa 13475276bc url: validate href setter receiver first
Validate the URL receiver before converting the assigned href value.

Fixes: https://github.com/nodejs/node/issues/67344
Signed-off-by: dansatch <dansatch98@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67350
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-11-15 22:01:09 +00:00
Chengzhong Wu 2a854a8ddf build: enable pie on linux
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/67386
Refs: https://github.com/nodejs/node/issues/66951
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-11-15 22:00:55 +00:00
Gürgün Dayıoğlu 47d6da0884 fs,path: fix glob globstar section bounds
The last start index of each globstar-delimited body section was
computed from the non-globstar prefix counts in reverse order. When
sections have different lengths, the bound is too tight, so paths
such as `a/b/c/d/e` failed to match `**/a/b/c/**/d/**`. This affected
`path.matchesGlob()` and `exclude` patterns in `fs.glob()`.

Compute the bound from the number of non-globstar parts in the
section and every section after it.

Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day>
PR-URL: https://github.com/nodejs/node/pull/66738
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Efe Karasakal <hi@efe.dev>
2026-11-15 19:15:27 +00:00
Ulises Gascón 55da3531fc tools: notarize bin/node in the darwin tarballs
The binary tarball target only codesigns bin/node. Notarization runs
only for the pkg, and tools/osx-notarize.sh only knows how to submit a
pkg, so every darwin tarball binary ships signed but without a ticket.
Gatekeeper then applies a full trust evaluation to each process spawned
through it, which slows down every CLI shim on macOS.

Make tools/osx-notarize.sh take a path instead of a version id. A .pkg
keeps the existing flow. Any other file is treated as a Mach-O binary:
it is zipped with ditto, submitted with notarytool, and the ticket is
verified with `codesign --verify -R=notarized` using the existing retry
helper. spctl cannot be used for that check, it rejects command line
tools as "not an app". The binary itself is not modified, so published
checksums do not change. A bare version id is still accepted and
resolved to node-<version>.pkg for the release branches.

Call the script from the binary target after codesign. It is a no-op
unless the NOTARIZATION_* variables are exported, so the tarball jobs
keep behaving as today until the release job injects them.

Refs: https://github.com/nodejs/node/issues/67140
Refs: https://github.com/nodejs/build/issues/3538
Refs: https://github.com/nodejs/build/issues/4545
Refs: https://github.com/nodejs/node/pull/66855
Assisted-by: Claude
Assisted-by: Codex
Signed-off-by: Ulises Gascon <ulisesgascongonzalez@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67143
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
2026-11-15 16:15:31 +00:00
Livia Medeiros d105ef77fc test: use relative paths within test directory in test-watch-mode.mjs
Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/67343
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-11-15 14:51:24 +00:00
Livia Medeiros b0aa887412 util: use Map.prototype.getOrInsert() in circular reference formatting
Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/67451
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-11-15 11:52:26 +00:00
Hamza Kargin 537a20c113 fs: respect setDefaultHighWaterMark in ReadStream
ReadStream ignored stream.setDefaultHighWaterMark() and always used
64 KiB. Use the user-set value when there is one, and keep 64 KiB
otherwise so Windows does not drop to the 16 KiB stream default.

Fixes: https://github.com/nodejs/node/issues/66937
Signed-off-by: Hamza Kargın <hamzakargin@outlook.com>
PR-URL: https://github.com/nodejs/node/pull/66956
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-11-15 09:43:51 +00:00
Jason Zhang c07db8c5c1 src: avoid aborting on filesystem errors in node --run
`node --run` called the throwing overloads of
`std::filesystem::is_directory()` and `std::filesystem::current_path()`.
An unreadable `node_modules` directory or a removed working directory
made them throw, and the uncaught exception aborted the process.

Use the `std::error_code` overloads instead. A `node_modules/.bin` that
cannot be inspected is skipped, and a missing working directory is
reported as a regular error.

Signed-off-by: jazelly <xzha4350@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67270
Fixes: https://github.com/nodejs/node/issues/67269
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2026-11-15 04:48:02 +00:00
Christian Aurich Zanettini Martins 2e59a6da78 fs: use correct position when retrying writev
writevAll() tracks the position for the next attempt in its `pos`
argument, but calls fs.writev() with `this.pos`. WriteStream._writev()
advances `this.pos` by the whole batch right after starting the write,
so a retry from the asynchronous callback resumes at the end of the
batch instead of after the bytes that reached the file. A partial write
leaves a hole and puts the remainder past its place; an EAGAIN retry
moves forward even though nothing was written.

Use the local `pos`, as writeAll() already does.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66203
Refs: https://github.com/nodejs/node/pull/49211
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-15 04:17:27 +00:00
Christian Aurich Zanettini Martins 80fc1eff57 test: deflake test-tls-resume-servername
The PSK server's pskCallback answered every identity, but OpenSSL also
asks it about the resumption ticket, cut at its first NUL byte. When
that prefix is valid UTF-8, about 1% of the time, the ticket was taken
for an external PSK and the handshake failed with decrypt_error. Only
answer for the identity the client sends.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67450
Refs: https://github.com/nodejs/reliability/issues/1722
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2026-11-15 04:00:50 +00:00
Christian Aurich Zanettini Martins 2e0029f16a test: deflake test-fs-stat-cancel-inflight under FIPS
The pbkdf2() call that keeps the only threadpool worker busy used a
6-byte password and a 4-byte salt. OpenSSL 4 FIPS rejects those, so
the derivation failed at once and freed the worker. The queued stat
could then start before req.cancel() ran, and it completed without
ECANCELED.

Use inputs that meet the FIPS minimums and check that the derivation
succeeds.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67449
Refs: https://github.com/nodejs/node/pull/67248
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-11-15 03:41:33 +00:00
Guilherme Araújo e18f10645c src: write strings to streams without flattening
StreamBase::WriteString() created a String::ValueView twice, the first
time in StringBytes::StorageSize() only to read the length. A ValueView
flattens the string, so writing a string built by concatenation, such
as the header of an HTTP response, allocated a flat copy on the V8 heap
before copying it again into the write buffer.

Read the length from the string in StorageSize(), and copy one-byte
strings that fit the stack buffer with String::WriteOneByte(), which
does not flatten. For UTF-8 the characters go to the last third of the
buffer and are converted into the rest of it: a Latin-1 character takes
at most two bytes.

Assisted-by: Claude
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67435
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Philipp Dunkel <pip@pipobscure.com>
2026-11-15 00:39:09 +00:00
Geoffrey Booth cb05e4d0c2 module: remove async module customization hooks
Remove `module.register()` (DEP0205), the `--experimental-loader` and
`--loader` flags, and the machinery that supported them: the loader
hooks worker thread, the hooks proxy, the async module customization
hook chains for resolving and loading, the internal worker class used to
run the loader thread, and the asynchronous module job linking. Module
customization is now provided only by `module.registerHooks()`, which
runs synchronously on the thread that loads the modules.

As the loader thread no longer exists, the ES module loader always loads
and links modules synchronously, so the code that handled promises and
the re-invented `require()` for imported CommonJS customized by the
async module customization hooks is removed too. `import()` still defers
evaluation of the module to a later microtask, as before.

`worker_threads.isInternalThread` is kept for compatibility and is now
always `false`; removing it is left for a future semver-major change.

The `ERR_ASYNC_LOADER_REQUEST_NEVER_SETTLED` and
`ERR_LOADER_CHAIN_INCOMPLETE` error codes are no longer used and are
documented as removed.

Tests that exist only to exercise the async module customization hooks
are removed.

Assisted-by: Claude
Signed-off-by: Geoffrey Booth <webadmin@geoffreybooth.com>
PR-URL: https://github.com/nodejs/node/pull/67090
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2026-11-14 21:51:46 +00:00
Lily Chen dd23cd248c crypto: use const STACK_OF(SSL_CIPHER)* for SSL_get_ciphers
BoringSSL is updating SSL_get_ciphers and SSL_CTX_get_ciphers to return
const STACK_OF(SSL_CIPHER)* instead of a non-const pointer. Declare the
local ciphers variable in SSLPointer::getCiphers as const so it builds
cleanly against both OpenSSL and BoringSSL.

Refs: https://crbug.com/550501994
Signed-off-by: Lily Chen <chlily@google.com>
PR-URL: https://github.com/nodejs/node/pull/67443
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 21:25:02 +00:00
Filip Skokan bd08ba304e crypto: throw on X509Certificate operation errors
X509Certificate can report failed operations as missing fields or
negative checks. Invalid validity times return "Bad time value" or
Invalid Date, making relational date comparisons return false.

Throw when required fields cannot be converted, certificate encoding or
fingerprint calculation fails, or a present AIA or EKU extension cannot
be decoded. Apply this to getters and explicit toLegacyObject() calls.
Report failed or unsupported private-key comparisons as exceptions.

For verify(), return true for 1 and false for 0. Also return false for a
wrong key type or invalid unused bits in the signature BIT STRING.
Throw for other negative results.

Use the existing conversion behavior for legacy TLS certificate objects,
which are also constructed internally during handshakes. Formatting
unrelated metadata must not cause an uncaught exception or reject an
otherwise valid connection.

Fixes: https://github.com/nodejs/node/issues/67285
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/67408
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 18:00:51 +00:00
Daniel Cavalcante 0b4d0ac5a2 vfs: add callback readv and writev handlers
A mounted VFS causes callback readv and writev to call missing
handlers, breaking both virtual and real file descriptors.

Add both handlers while preserving I/O for real descriptors.

Signed-off-by: Daniel Cavalcante <dcavalcante@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66548
Fixes: https://github.com/nodejs/node/issues/66532
Reviewed-By: Philipp Dunkel <pip@pipobscure.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 16:01:59 +00:00
Antoine du Hamel 3f8e1f5a36 doc: add aduh95 as last security release stewards
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67434
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 11:33:34 +00:00
Lazizbek Ergashev 52bfcaf572 tls: pop errors from failed session parsing
Signed-off-by: lazerg <lazerg2@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67212
Fixes: https://github.com/nodejs/node/issues/67204
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 08:07:22 +00:00
Christian Aurich Zanettini Martins 7996b180af stream: close Utf8Stream fd after pending write
destroy() fsynced and closed the fd right away, even while an
fs.write() on it was still running on the thread pool. The write then
failed with EBADF, emitted as an 'error' that crashed the process when
nothing listened for it, or landed in whatever file reused the fd
number.

Close the fd once the in-flight write completes, as fs.WriteStream
does. Data buffered behind it is still dropped, so 'finish' is not
emitted in that case.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67355
Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-11-09.md
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 08:07:11 +00:00
Matteo Collina 291d62f885 stream: drop rejection step for sync transforms
transformStreamDefaultControllerPerformTransform chained a rejection
step onto the result of every transform() call. A non-thenable result
cannot reject, so return the shared resolved promise directly and save
a promise allocation and a microtask per chunk.

The write promise of a transform whose transform() returns a
non-thenable now settles one microtask earlier than in the reference
implementation. The relative order of all stream events is unchanged.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/67339
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 07:55:28 +00:00
Orgad Shaneh 6368e00e91 src: give small stream reads their own buffer
Every read was carved out of the env-wide 64KB StreamReadSlab and
handed to JS as a view over it. TLS asks for exactly the decrypted
size, so the copy-on-waste path in Commit() never triggers, and any
TLS chunk that JS keeps pins the whole slab and every other read in
it. Chunks queued for seconds (e.g. audio streamed faster than real
time) get the slabs promoted, and their external memory then drives
most major GCs.

Reads asking for less than a slab now get a right-sized managed
buffer, as before the slab existed. Large reads (plain TCP, where
libuv suggests 64KB) still use the slab.

Assisted-by: Claude Code
Signed-off-by: Orgad Shaneh <orgad.shaneh@audiocodes.com>
PR-URL: https://github.com/nodejs/node/pull/67327
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 06:25:03 +00:00
Yuya Inoue f8ab6107a4 http2: send deferred RST_STREAM on stream destroy
close() with NO_ERROR waits for 'finish' before sending RST_STREAM.
If the body is stuck behind flow control and the stream is destroyed
first, RST_STREAM is never sent and nghttp2 keeps the stream open.
On the next WINDOW_UPDATE, OnRead finds no stream and returns 0
without EOF, so nghttp2 sends empty DATA frames until OOM. Both
client and server streams are affected.

Send the deferred RST_STREAM in _destroy(). As a backstop, return
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE from OnRead when the stream is
gone, which nghttp2 documents as the way to reset a stream on error.

Fixes: https://github.com/nodejs/node/issues/67363
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67372
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2026-11-14 05:16:17 +00:00
Trevor Burnham 530b8e3a98 meta: update Trevor Burnham's email in .mailmap
Assisted-by: Claude Opus 5.5
Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67425
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-11-14 01:47:08 +00:00
Trevor Burnham b5e3a61db3 doc: explain how sqlite binds numbers and BigInts
A JavaScript number is always bound with sqlite3_bind_double(), so it is
written as REAL even when it has no fractional part. A BigInt is bound
with sqlite3_bind_int64() and is the way to write an INTEGER. The type
conversion table listed number under both INTEGER and REAL without
saying which applies when, so the rule had to be discovered by
experiment.

Column type affinity hides this most of the time, which is why the cases
it does not cover are surprising. Comparing against a TEXT column is the
worst of them: the number 3 compares as '3.0' and silently fails to
match a stored '3', with no error to point at the cause. Document the
rule, the reason for it, and that case, and remove number from the
table's INTEGER row. Point the virtual table section's link at the new
text.

better-sqlite3 binds numbers the same way and has fielded the same
question repeatedly (WiseLibs/better-sqlite3#165, #627, #897, #1144,
#1313), each time closed as working as intended.

Fixes: https://github.com/nodejs/node/issues/63826
Refs: https://github.com/WiseLibs/better-sqlite3/issues/627
Assisted-by: Claude Opus 5.5
Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67424
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Guilherme Araújo <arauujogui@gmail.com>
2026-11-14 01:37:10 +00:00
Chengzhong Wu dadf02907a src: adopt FallthroughCallback signature of Dispatchable
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/66653
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-13 20:16:37 +00:00
Node.js GitHub Bot 12b4c387fe deps: update inspector_protocol to c0045057ce801744c5e88596a2f1bab1802e
PR-URL: https://github.com/nodejs/node/pull/66653
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-13 20:16:36 +00:00
Matteo Collina 726d4d4b00 src: restore tty state on exit only if changed
ResetStdio() unconditionally writes the terminal attributes recorded at
startup back to stdin and stderr when the process exits, even when the
process never touched the terminal. This clobbers changes made in the
meantime by another process sharing the terminal: in `node -h | less`,
less switches the terminal to raw mode once it receives the first byte
of output, and node switches it back to cooked mode when it exits.

Only restore the recorded attributes when node itself changed the
terminal mode through setRawMode(), or when exiting because of a signal.
Restoring the O_NONBLOCK flag and libuv's own terminal mode reset are
unchanged.

Fixes: https://github.com/nodejs/node/issues/66440
Refs: https://github.com/nodejs/node/issues/35536
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/66753
Refs: https://github.com/nodejs/node/pull/66540
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2026-11-13 20:16:19 +00:00
René 40b49b6c6b deps: V8: backport 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
Co-authored-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/67416
Refs: https://issues.chromium.org/issues/576986967
Refs: https://github.com/nodejs/node/issues/62676
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Steven R Loomis <srl295@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-11-13 17:20:54 +00:00
Roberto Bianchi 02ad8f22f2 util: use indexed writes for inspected object properties
Avoid the cost of primordial push calls for each formatted property.

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
PR-URL: https://github.com/nodejs/node/pull/67297
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2026-11-13 17:11:04 +00:00
Yuya Inoue 925faf48f9 test: deflake test-watch-mode-files_watcher
Some test cases made a single change right after creating a watcher.
On macOS, libuv starts the FSEvents stream asynchronously, so that
change could be missed and the test hung until it timed out.

Keep making the change until the watcher reports it, as the other
cases in the file already do.

Refs: https://github.com/nodejs/reliability/issues/1715
Refs: https://github.com/nodejs/reliability/issues/1644
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67298
Refs: https://github.com/nodejs/node/actions/runs/42177414954
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
2026-11-13 10:25:49 +00:00
Sarthak Ahuja 11d74515f2 doc: document invalid X509Certificate validity times
When a certificate's notBefore or notAfter time cannot be parsed,
validFrom and validTo return the string 'Bad time value', and
validFromDate and validToDate return an invalid Date. Relational
comparisons with an invalid Date are always false, so a naive expiry
check can treat such a certificate as valid. Document the current
behavior and tell callers to reject invalid dates first.

Signed-off-by: Sarthak Ahuja <39986642+SarthakAhuja@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/67406
Refs: https://github.com/nodejs/node/issues/67285
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-13 09:18:44 +00:00
René 71fd959039 tools: update mk-ca-bundle to 1.35
Adds the facility to ignore root certificates by fingerprint using
mk-ca-bundle's -x parameter.

Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/67403
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-11-13 07:28:41 +00:00
James M Snell c905bedc90 lib: avoid dead code elimination with node:bench
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/66664
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-13 03:50:53 +00:00
James M Snell e256fcb78b lib: add gc options to node:bench
Adds option post-warmup and pre-sample gc options
to node:bench

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/66664
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-13 03:50:52 +00:00
James M Snell e3499df9b4 lib: default bench operations to 1
b.end(N) ... N defaults to 1
b.report(...) operations defaults to 1

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/66664
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-13 03:50:51 +00:00
James M Snell 7a38815076 lib: update node:bench reporters to include sys info
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/66664
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-13 03:50:49 +00:00
Farid Zakaria 7b4c9e30ee test: deflake watch mode test for missing env file
The subtest watched all of tmpdir, so files created there by the
subtests running alongside it restarted the child and broke its
output. The fix is to watch a directory of its own instead to not
conflict.

Refs: https://github.com/nodejs/node/pull/66232
Assisted-by: Claude
Signed-off-by: Farid Zakaria <farid.m.zakaria@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67041
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
2026-11-12 22:19:40 -03:00
Emerson Gomes 6728a1cfe0 http2: flush final GOAWAY after pending writes
Keep the native close pending when an active socket write prevents the
terminal GOAWAY from being serialized. Finish the close after the
outgoing buffers become available, preserving the requested error code.

Handle synchronous completion and transport errors without retrying
writes to a failed transport or losing the socket close notification.

Add a deterministic regression for default and custom GOAWAY codes, both
inside and outside the receive callback.

Fixes: https://github.com/nodejs/node/issues/66832
Assisted-by: Codex
Signed-off-by: Emerson Gomes <emerson.gomes@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66834
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-12 21:07:37 +00:00
Manjeet Singh 4ad8171344 doc: explain fallback arrays in package exports targets
The "exports" field type lists `string[]`, but the packages
documentation never describes how an array of targets is resolved.
Document that items are tried in order, that only invalid targets and
unmatched conditions are skipped, and that a missing file does not
cause the next item to be tried.

Fixes: https://github.com/nodejs/node/issues/58600
Signed-off-by: Manjeet Singh <024manjeetsingh@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67393
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2026-11-12 21:07:25 +00:00
fatih f4e89e70dd inspector: disconnect handles before releasing interfaces
Disconnect the thread handle while NodeInspectorClient still owns the
interface. This prevents cross-thread posts from calling
shared_from_this() after the interface's last strong reference has been
released.

Add a regression test verifying handle expiration during owner teardown.

Fixes: https://github.com/nodejs/node/issues/67079
Signed-off-by: Fatih Güzel <fatihguzeldev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67281
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-11-12 19:15:20 +00:00
Antoine du Hamel 67e45e4a87 tools: enable strict mode for yamllint
Treats warnings as errors, so we can detect regressions.

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67380
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-11-12 15:39:25 +00:00
Stewart X Addison 6b0cfafe65 test: increase iterations on histogram test after snapshot changes
Signed-off-by: Stewart X Addison <sxa@ibm.com>
PR-URL: https://github.com/nodejs/node/pull/67379
Reviewed-By: Philipp Dunkel <pip@pipobscure.com>
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-12 14:41:07 +00:00
Node.js GitHub Bot 4f23168685 2026-11-12, Version 27.0.0-alpha.0.1.0 (Alpha)
Notable changes:

child_process:
  * (SEMVER-MINOR) add subprocess.timedOut (Marco) https://github.com/nodejs/node/pull/66639
crypto:
  * (SEMVER-MINOR) make X.509 inspection guards explicit (Filip Skokan) https://github.com/nodejs/node/pull/67245
  * (SEMVER-MINOR) add X.509 generation with CSR support (Filip Skokan) https://github.com/nodejs/node/pull/67245
dns:
  * (SEMVER-MINOR) coalesce identical concurrent lookup() requests (Orgad Shaneh) https://github.com/nodejs/node/pull/62599
doc:
  * add efekrskl to collaborators (Efe Karasakal) https://github.com/nodejs/node/pull/67376
  * add Philipp Dunkel to contributors (Philipp Dunkel) https://github.com/nodejs/node/pull/67378
  * add christianaurichzm to collaborators (Christian Aurich Zanettini Martins) https://github.com/nodejs/node/pull/67377
http:
  * (SEMVER-MINOR) batch body spans per parser execute (Guilherme Araújo) https://github.com/nodejs/node/pull/67187
sea:
  * (SEMVER-MINOR) generate a compile cache for the VFS modules (Matteo Collina) https://github.com/nodejs/node/pull/66768
worker:
  * (SEMVER-MINOR) preload streams into startup snapshot (Matteo Collina) https://github.com/nodejs/node/pull/66311

PR-URL: https://github.com/nodejs/node/pull/67415
2026-11-12 14:31:58 +01:00
Robert I Nilsson 8aa19d23d1 doc: document this binding in TLS callbacks
Document that `this` is bound to the `tls.TLSSocket` instance
when `SNICallback` and `ALPNCallback` are invoked.

Signed-off-by: Robert I Nilsson <robert.i.nilsson@callclue.com>
PR-URL: https://github.com/nodejs/node/pull/66682
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-12 11:25:07 +01:00