Commit Graph
48785 Commits
Author SHA1 Message Date
René 6b8bc0a6af test: use correct constructor in test-sqlite-virtual-table
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/66401
Refs: https://github.com/nodejs/node/pull/65988
Reviewed-By: Guilherme Araújo <arauujogui@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-09-30 02:42:41 +00:00
한국 d57738e5a5 crypto: fix raw key export error for wrong key type
Exporting a key in 'raw', 'raw-public' or 'raw-seed' format when the
key type does not match (e.g. an ECDSA private key as 'raw', or an
ML-KEM public key as 'raw-seed') fell through to the generic
NotSupportedError. The Web Crypto and modern-algos export key steps
require an InvalidAccessError in these cases.

Mirror exportKeySpki() and exportKeyPkcs8(): select the exporter per
algorithm first, then check the key type, and drop the type guards
around the call sites in exportKeySync(). Formats an algorithm does
not support (e.g. 'raw' for ML-DSA) still throw NotSupportedError.
This also fixes wrapKey(), which uses the same export path.

Assisted-by: a closed-source coding agent
Signed-off-by: koreahghg <koreahghg@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66217
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-09-29 23:56:19 +00:00
Trivikram Kamat 9bf40b24cd sqlite: reject plans with unusable virtual table parameters
Return SQLITE_CONSTRAINT from xBestIndex() when a hidden column has
an equality constraint that is not usable at the current point in the
query plan. Accepting such a plan makes xFilter() call rows() with
null, silently dropping rows and returning an empty result, e.g. for
"SELECT DISTINCT * FROM m(t.a) JOIN t ON t.a = m.a". Cost estimates
alone cannot enforce parameter dependencies; rejecting the plan lets
SQLite pick an ordering where the parameter value is available.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: opencode
PR-URL: https://github.com/nodejs/node/pull/66215
Fixes: https://github.com/nodejs/node/issues/66214
Reviewed-By: Guilherme Araújo <arauujogui@gmail.com>
2026-09-29 23:36:16 +00:00
James Ross b42c0ccfa3 zlib: fix abort with decodeStrings: false
Passing decodeStrings: false to a zlib stream, or to an async
convenience method, let strings reach the native handle, which
aborts the process on its Buffer check. Force decodeStrings back to
true, as is already done for encoding and objectMode.

Signed-off-by: James Ross <james@jross.me>
PR-URL: https://github.com/nodejs/node/pull/66359
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-29 21:48:17 +00:00
James Ross 7bdd1f6363 benchmark: add zstdCompress benchmark
Signed-off-by: James Ross <james@jross.me>
PR-URL: https://github.com/nodejs/node/pull/66358
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-09-29 21:23:50 +00:00
James Ross fa4af16414 zlib: pledge input size in async zstdCompress()
zstdCompress() writes its input and ends the frame in separate calls,
so zstd cannot infer the input size the way it does for
zstdCompressSync(), and sizes its tables for an unbounded stream.

Default pledgedSrcSize to the input's byte length. The output is now
identical to zstdCompressSync() and several times faster at higher
levels. An explicit pledgedSrcSize, or a string with a custom
defaultEncoding, keeps the current behavior.

Signed-off-by: James Ross <james@jross.me>
PR-URL: https://github.com/nodejs/node/pull/66358
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-09-29 21:23:49 +00:00
Filip Skokan e6b3f96cd0 worker: discard queued messages on termination
Close the outside port and remove its message forwarding listeners
synchronously. Closing the port alone is asynchronous and can leave
queued messages dispatching when terminate() runs inside a listener.

Allow the current event to finish while discarding subsequent messages,
including those drained when the backing thread exits.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66354
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-09-29 17:19:32 +00:00
Filip Skokan 74564d94df worker: serialize messages after exit
The outside port must serialize and transfer messages even when it has
no peer. Retain that port after the backing thread exits and create a
closed port when the entry script fetch fails. This preserves clone
errors and transfer side effects in both cases.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66354
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-09-29 17:19:29 +00:00
Filip Skokan f53f438a3b worker: preserve blob module URLs
Evaluate blob module sources under their original URL instead of
rewrapping them in a data URL. This preserves import.meta.url and module
identity while retaining the captured source after URL revocation.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66354
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-09-29 17:19:28 +00:00
Filip Skokan 5643755589 worker: convert importScripts arguments first
Web IDL converts every argument before entering the method algorithm.
Perform all USVString conversions before rejecting module workers or
parsing URLs, so later conversions can throw or revoke blob URLs first.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66354
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-09-29 17:19:26 +00:00
Filip Skokan ef8947aecf worker: fix postMessage overload resolution
Web IDL overload resolution treats functions as objects, accepts a null
iterator as missing, and retrieves the iterator method only once. Reuse
that method during sequence conversion in both postMessage entry points.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66354
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-09-29 17:19:25 +00:00
Guilherme Araújo c5b7a06d9b sqlite: throw on oversized string values
SQLite serves TEXT up to SQLITE_MAX_LENGTH, past what V8 can represent
as a string. V8 returns an empty handle without throwing, and the
user-defined function path then suppressed the SQLite error as if a
JavaScript exception were pending. exec() reported success for a
statement that never ran, and get() returned undefined.

Throw ERR_STRING_TOO_LONG when the value cannot be converted, and
suppress a SQLite error only when an exception is actually pending.

Assisted-by: Claude Code
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66209
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-09-29 16:58:35 +00:00
Lazizbek Ergashev 1f26576a3f http2: submit RST_STREAM before emitting 'aborted'
Signed-off-by: lazerg <lazerg2@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66314
Fixes: https://github.com/nodejs/node/issues/66306
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-09-29 10:27:53 +00:00
Node.js GitHub Bot 691cf6245c deps: update lief to 1.0.0
PR-URL: https://github.com/nodejs/node/pull/66345
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-09-29 08:57:54 +00:00
Antoine du Hamel 5a271b3495 tools: add deps/LIEF to the ignore list of test-shared.yml
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66342
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-09-29 08:39:46 +00:00
Antoine du Hamel d9274ce623 tools: fix nixpkgs updater script
We only want the first match, which by convention is the global pin the
script is meant to update.

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66337
Refs: https://github.com/nodejs/node/actions/runs/36284249504/job/108521854021
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-09-29 07:10:00 +00:00
Nigro Simone 686612918b test: check frame restore in CallbackScope
A CallbackScope must restore the async context frame that was active
before it, when there was none and when there was one.

Signed-off-by: Nigro Simone <nigro.simone@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66316
Refs: https://github.com/nodejs/performance/issues/24
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-29 06:45:37 +00:00
Nigro Simone e77e173004 benchmark: add a node::MakeCallback benchmark
The addon calls into JS with node::MakeCallback from a libuv timer, so
every call opens a top-level callback scope, like an I/O callback does.

Signed-off-by: Nigro Simone <nigro.simone@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66316
Refs: https://github.com/nodejs/performance/issues/24
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-29 06:45:36 +00:00
Nigro Simone d97041fff9 src: reduce InternalCallbackScope overhead
InternalCallbackScope looks up the Environment from the isolate two
times per call, inside async_context_frame::exchange, and it keeps the
prior async context frame in a v8::Global also when there is no frame,
that is the common case. Every call from native code into JS pays this:
MakeCallback, CallbackScope, AsyncWrap, Node-API.

Now the scope passes the Environment it already has, the option is read
with an inline accessor instead of copying the shared_ptr, and the
global handle is created only when the prior frame is not undefined.

benchmark/napi/make_callback, Node 26.3.0 built with and without this
change, Linux x64, 30 runs: from 202-208 ns to 155-159 ns per call.

Refs: https://github.com/nodejs/performance/issues/24
Signed-off-by: Nigro Simone <nigro.simone@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66316
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-29 06:45:35 +00:00
James M Snell 296584b7af benchmark: add http header validator benchmark
Compare http.isValidHeaderName() and http.isValidHeaderValue() with
http.validateHeaderName() and http.validateHeaderValue() wrapped in
try/catch, for valid and invalid input, and for both 'strict' and
'relaxed' header value validation.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66334
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2026-09-29 04:38:28 +00:00
James M Snell 44ba289f55 http: add isValidHeaderName() and isValidHeaderValue()
Add non-throwing counterparts of http.validateHeaderName() and
http.validateHeaderValue() that return a boolean instead of throwing.

Rejecting an invalid header with the existing validators costs a few
microseconds, because an error object and its stack trace are created,
compared to ~20ns for the boolean check. Userland HTTP implementations
such as undici (fetch Headers, request options) therefore keep private
copies of the token and field-value tables from _http_common. These new
functions let them reuse the core implementation.

isValidHeaderValue() accepts an optional `httpValidation` option
('strict' or 'relaxed') that has the same meaning as the option of the
same name on http.createServer() and http.request().

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66334
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2026-09-29 04:38:26 +00:00
Node.js GitHub Bot 3a30bcad56 deps: update zlib to 1.3.2.1-motley-456ae73
PR-URL: https://github.com/nodejs/node/pull/66330
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-29 01:40:20 +00:00
Node.js GitHub Bot 914c1c8a6f deps: update undici to 8.11.2
PR-URL: https://github.com/nodejs/node/pull/66332
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-09-29 01:40:06 +00:00
Node.js GitHub Bot e168cbf046 deps: update timezone to 2026d
PR-URL: https://github.com/nodejs/node/pull/66333
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-29 01:39:54 +00:00
Samuel Attard 471fe813bb module: avoid allocating a cache key string for every require()
The relative resolve cache was keyed by a concatenated
${parent.path}\x00${request} string, allocating a new key for every
require() call including fully cached ones. Key the cache by the
parent directory first (a Map keyed by the already-retained
module.path string) and then by the request (a dictionary object,
whose property access internalizes dynamically-constructed
specifiers). Faster on every measured workload shape and slightly
smaller in memory, since the concatenated keys are no longer
retained.

Signed-off-by: Sam Attard <sattard@anthropic.com>
PR-URL: https://github.com/nodejs/node/pull/63884
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-09-28 23:30:13 +00:00
Maksim Romanov ae9c25acc5 test: use common.PIPE in fs.cp socket tests
The socket was created under a nested tmpdir using an absolute path,
which can exceed the 104-byte sun_path limit on macOS when the
checkout lives in a long directory. common.PIPE uses a path relative
to the cwd, as the other pipe tests do.

Fixes: https://github.com/nodejs/node/issues/66324
Assisted-by: a closed-source coding agent
Signed-off-by: Maksim Romanov <romanov.maxim.98@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66329
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-09-28 20:12:21 +00:00
Filip Skokan 58821eed26 test: deflake fast FFI buffer tests
The optimized buffer tests can leave compiler jobs running during
library teardown. Wait for those jobs before closing the libraries,
matching the existing integer validation tests.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66327
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-28 19:47:03 +00:00
Hilary Asogwa e6d47201e1 buffer: fix negative index for large buffers
Fix incorrect negative index results for large buffers.
Add tests for number, Buffer and string searches beyond 2 GiB.

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

Signed-off-by: dansatch <dansatch98@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66325
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-09-28 17:58:14 +00:00
Filip Skokan c570b67593 test: unmark loader inspector wait test as flaky
Disconnecting the inspector can race with its final notification write.
If EOF resets the socket first, the write used to dereference a null
TCP handle. 8a84e6be90 added guards for writes after disconnect.

Removing those guards reproduces the loader test's SIGSEGV under a
scheduling-delay probe; the normal binary passes the same probe.
Remove the flaky expectations left over from before that fix.

Refs: https://github.com/nodejs/node/issues/54346
Refs: https://github.com/nodejs/node/issues/34833
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Claude, Codex
PR-URL: https://github.com/nodejs/node/pull/66319
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-28 14:52:19 +00:00
Filip Skokan c12d483b1f test: unmark exit timeout tests as flaky
Background compilation could deadlock at process exit: DrainTasks
waited for the compiler task while that task waited for main-thread
garbage collection. Since 5fb879c458, only user-blocking tasks count
toward that wait, excluding ordinary background compilation.

Remove the old flaky expectations for test-http2-large-file and
test-fs-read-stream-concurrent-reads.

Refs: https://github.com/nodejs/node/issues/47409
Refs: https://github.com/nodejs/node/issues/51862
Refs: https://github.com/nodejs/node/issues/54918
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Claude, Codex
PR-URL: https://github.com/nodejs/node/pull/66319
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-28 14:52:18 +00:00
Filip Skokan 1a15692fb6 test: unmark test-cpu-prof-dir-worker as flaky
The test could finish its workload without recording a workload frame.
0ab4a1ce90 increased the non-Windows workload from fib(30) to fib(40),
and 92e63426c0 moved Profiler.setSamplingInterval before Profiler.start
so the requested interval takes effect.

Remove the flaky expectation left over from before those fixes.

Refs: https://github.com/nodejs/node/issues/27611
Refs: https://github.com/nodejs/node/issues/32168
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Claude, Codex
PR-URL: https://github.com/nodejs/node/pull/66319
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-28 14:52:16 +00:00
Filip Skokan cbf3566b12 test: remove stale SEA Linux debug flaky entries
The entries added for Linux arm64 debug failures use arch==arm, so they
do not match that configuration. Since 9ea61828c7, the shared SEA guard
also correctly skips executable tests on Linux debug builds.

Remove the stale entries. The tests without that guard only validate
SEA configuration errors.

Refs: https://github.com/nodejs/node/issues/63749
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Claude, Codex
PR-URL: https://github.com/nodejs/node/pull/66319
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-28 14:52:14 +00:00
Filip Skokan e0a3c37c30 test: remove stale flaky status entries
Remove entries for test-performance-function and
test-report-fatal-error. Both tests were renamed, so their original
names no longer match tests.

Refs: https://github.com/nodejs/node/issues/54803
Refs: https://github.com/nodejs/node/issues/43457
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Claude, Codex
PR-URL: https://github.com/nodejs/node/pull/66319
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-28 14:52:11 +00:00
Robert Nagy 191a3b2db4 http2: emit close for aborted HEAD compat responses
The compat response defers 'finish' and 'close' for a HEAD request
until response.end(), because the stream of a headers-only response
closes as soon as the headers are sent. The same deferral also applied
to a HEAD stream that closed before any response was sent, for example
when the client cancelled it or the session was destroyed. Nothing was
left to call end(), so the response never emitted 'close' and the abort
could not be observed on it.

Defer only once the headers were sent, and otherwise close the response
as for any other method. The writable side of a HEAD stream is finished
from the start, so 'finish' is emitted only after the headers were
sent, and an aborted HEAD response does not report success.

Assisted-by: Opus 5.5
Signed-off-by: Robert Nagy <ronagy@icloud.com>
PR-URL: https://github.com/nodejs/node/pull/66310
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-09-28 10:40:58 +00:00
Matteo Collina cff7b12df1 stream: keep webstreams nil requests in fast mode
The shared "no pending request" records in the writable stream were
`__proto__: null` literals, which V8 creates in dictionary mode. They
sit in inFlightWriteRequest, closeRequest and pendingAbortRequest
whenever nothing is pending, and their promise field is checked several
times per write, so those loads did a hash lookup on every write and
every pipe. They are now built as plain literals and get their null
prototype afterwards, which keeps them in fast mode.

The readable controllers also initialized their state slot with an
empty object that setup replaced immediately. That throwaway allocation
is gone, matching the writable and transform controllers.

Add a writable-write benchmark: nothing in benchmark/webstreams drove
WritableStreamDefaultWriter.write() directly.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/66230
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-09-28 07:51:16 +00:00
James M Snell b59840b593 buffer: add isLatin1
Implements a fast check to determine if a string is
a valid byte string (only chars <= 0xff).

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66298
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2026-09-28 04:22:57 +00:00
James M Snell 8f43e8884b buffer: add isLatin1
Implements a fast check to determine if a string is
a valid byte string (only chars <= 0xff).

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66298
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2026-09-28 04:22:37 +00:00
Trivikram Kamat 75e4bbe0a8 report: skip unresponsive workers on process timeout
When --process-timeout expires, --report-on-process-timeout asked
every Worker for a subreport and waited without a time limit. A Worker
blocked in a synchronous native call never answers, so the watchdog
force-exited the process before the report was written. That left a
truncated, invalid JSON file, and the forced-exit message was glued
onto the "Writing Node.js report to file" line.

For reports triggered by --process-timeout, wait at most two seconds
for Worker subreports and leave out Worker threads that have not
responded by then. The subreport state is now shared with the interrupt
callbacks, so a Worker that answers late does not touch freed memory.
Other report triggers are unchanged.

Signed-off-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
Assisted-by: claude:opus-5.5
PR-URL: https://github.com/nodejs/node/pull/66304
Fixes: https://github.com/nodejs/node/issues/66303
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-09-27 22:04:18 +00:00
dependabot[bot] df775ec2ea tools: bump the doc group in /tools/doc with 4 updates
Bumps the doc group in /tools/doc with 4 updates: [@doc-kit/cli](https://github.com/nodejs/doc-kit/tree/HEAD/packages/cli), [@doc-kit/generator-react](https://github.com/nodejs/doc-kit/tree/HEAD/packages/react), [@node-core/doc-kit](https://github.com/nodejs/doc-kit/tree/HEAD/packages/node) and [@node-core/doc-kit-legacy](https://github.com/nodejs/doc-kit/tree/HEAD/packages/node-legacy).

Updates `@doc-kit/cli` from 1.0.2 to 1.0.3
- [Release notes](https://github.com/nodejs/doc-kit/releases)
- [Changelog](https://github.com/nodejs/doc-kit/blob/main/packages/cli/CHANGELOG.md)
- [Commits](https://github.com/nodejs/doc-kit/commits/@doc-kit/cli@1.0.3/packages/cli)

Updates `@doc-kit/generator-react` from 0.3.0 to 0.3.1
- [Release notes](https://github.com/nodejs/doc-kit/releases)
- [Changelog](https://github.com/nodejs/doc-kit/blob/main/packages/react/CHANGELOG.md)
- [Commits](https://github.com/nodejs/doc-kit/commits/@doc-kit/generator-react@0.3.1/packages/react)

Updates `@node-core/doc-kit` from 2.0.2 to 2.0.3
- [Release notes](https://github.com/nodejs/doc-kit/releases)
- [Changelog](https://github.com/nodejs/doc-kit/blob/main/packages/node/CHANGELOG.md)
- [Commits](https://github.com/nodejs/doc-kit/commits/@node-core/doc-kit@2.0.3/packages/node)

Updates `@node-core/doc-kit-legacy` from 1.0.2 to 1.0.3
- [Release notes](https://github.com/nodejs/doc-kit/releases)
- [Changelog](https://github.com/nodejs/doc-kit/blob/main/packages/node-legacy/CHANGELOG.md)
- [Commits](https://github.com/nodejs/doc-kit/commits/@node-core/doc-kit-legacy@1.0.3/packages/node-legacy)

---
updated-dependencies:
- dependency-name: "@doc-kit/cli"
  dependency-version: 1.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: doc
- dependency-name: "@doc-kit/generator-react"
  dependency-version: 0.3.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: doc
- dependency-name: "@node-core/doc-kit"
  dependency-version: 2.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: doc
- dependency-name: "@node-core/doc-kit-legacy"
  dependency-version: 1.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: doc
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/66295
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-09-27 18:47:26 +00:00
Brian Muenzenmeyer 37d5c80f97 build: toggle doc-kit verbosity based on V
Signed-off-by: bmuenzenmeyer <brian.muenzenmeyer@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66293
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-09-27 18:29:58 +00:00
Filip Skokan a2a064c76a test: split FFI call and callback coverage
Isolate each callback abort scenario so timeouts identify the failing
case. Consolidate callback GC coverage in the weakref test and disable
core dumps for intentional aborts on POSIX.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66287
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-09-27 14:54:18 +00:00
Filip Skokan 5137638062 tools: check CI availability and workload
Select mergeable PRs and check Jenkins availability and workload before
removing request labels. Leave requests for a later run when Jenkins is
unavailable or the workload has reached the configured limit.

Make the batch size and workload limit repository variables, defaulting
to 5 and 10 respectively.

Refs: https://github.com/nodejs/node-core-utils/pull/1204
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66280
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-09-27 12:34:10 +00:00
Donghoon Kang c97bbfb2e7 benchmark: remove duplicate ffi string length direct
Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/66278
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-27 12:05:50 +00:00
Marco 3641c36af1 watch: detect files replaced via unlink and create
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63888
Fixes: https://github.com/nodejs/node/issues/51621
Refs: https://github.com/nodejs/node/issues/54774
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-09-27 09:36:07 +00:00
James M Snell 2ce7a73fec perf_hooks: fix truncation of monitorEventLoopDelay() resolution
`IntervalHistogram` stored the interval as `int32_t`, so a resolution
above 2^31 - 1 ms wrapped: `resolution: 2 ** 32 + 1` sampled every
millisecond.

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: OpenCode
PR-URL: https://github.com/nodejs/node/pull/66115
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-09-27 08:10:15 +00:00
Matteo Collina 0519f500b4 http: cache parser callbacks
Cache the per-message callback lookups on the parser's JS object instead
of retaining callback functions in strong v8::Global handles. A callback
that captures its parser can otherwise keep the parser alive.

Clear the cache when a parser is initialized or freed so reused parsers
can load replacement callbacks and idle parsers do not retain them.
Header field names remain non-internalized because they are supplied by
clients.

Assisted-by: pi
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/66152
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-09-27 08:10:01 +00:00
Yuya Inoue 55e966fbe2 build: support LIEF 0.17.x and 1.x
Keep bundled LIEF at 0.17.0 while selecting the Mach-O section API
from the headers in use and the bundled build settings by version.
Prepare the updater for Mbed TLS 4 and TF-PSA-Crypto so the vendor
update can land separately.

Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66240
Fixes: https://github.com/nodejs/node/issues/66238
Refs: https://github.com/nodejs/node/pull/66242
Refs: https://github.com/nodejs/node/issues/63530
Refs: https://github.com/nodejs/nodejs-dependency-vuln-assessments/issues/360
Refs: https://github.com/nodejs/nodejs-dependency-vuln-assessments/issues/342
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-09-27 08:09:47 +00:00
Ali Hassan 7d79ed37de sea: add test and update docs for import() with code cache
Signed-off-by: Ali Hassan <ali-hassan27@outlook.com>
PR-URL: https://github.com/nodejs/node/pull/62678
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-09-27 06:56:43 +00:00
agape1225 cf0434f59c typings: wire up spawn_sync internal binding types
Signed-off-by: agape1225 <49804691+agape1225@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/65996
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2026-09-27 03:54:54 +00:00
Antoine du Hamel 14e8f5bca4 tools: enable temporal by default in Nix integration
So we can test it with `test-shared.yml`.

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66267
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-09-26 22:45:17 +00:00