Commit Graph
47759 Commits
Author SHA1 Message Date
Tim Perry a1e3e6d2d8 test: fix flaky http2 maxOriginSetSize test
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64407
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-07-13 05:22:38 +00:00
Antoine du Hamel 71812d1b43 tools: pin to nixpkgs-26.05-darwin on Intel Macs
Unstable channel no longer supports Intel architecture for macOS. We can
use the 26.05 channel to keep testing on that platform for a little
longer.

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64210
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-07-12 18:10:37 +00:00
Daijiro Wachi b4c7be323e util: make MIMEParams accessors case-insensitive
MIME parameter names are case-insensitive and the parser already
ASCII-lowercases them, but MIMEParams.get(), has(), delete() and set()
compared against the raw argument. As a result a parsed parameter was
unreachable by the casing the caller used (e.g. params.get('Charset')
returned null for "Charset=utf-8"), and set() could create duplicate,
case-colliding parameters.

Lowercase the name in the accessors to match the parser, consistent with
the whatwg-mimetype reference implementation.

Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64123
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-12 16:53:44 +00:00
Daijiro Wachi 19a95f3d4b buffer: normalize lone "\r" in Blob native line endings
`new Blob(parts, { endings: 'native' })` failed to normalize a
standalone carriage return. The replacement regex only matched
`\n` and `\r\n`, so a lone `\r` (and runs such as `\r\r`) were
left untouched instead of being converted to the platform's
native line ending.

The WHATWG "convert line endings to native" algorithm requires
`\r`, `\n`, and `\r\n` to all be normalized. Match `\r\n` before
a lone `\r` so that CRLF collapses to a single native ending.

Refs: https://w3c.github.io/FileAPI/#convert-line-endings-to-native

Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64115
Refs: https://w3c.github.io/FileAPI/#convert-line-endings-to-native
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2026-07-12 16:53:35 +00:00
Antoine du Hamel c121461121 tools: add workflow to compare Nix changes
If a change breaks e.g. the benchmark workflow, it might be not obvious
to detect as we typically do not run any benchmark when bumping the
nixpkgs pin.
The added workflows will verify that all derivations can be built on all
platforms, and report the list of changes.

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64410
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-07-12 17:51:38 +02:00
Tim Perry dca0fd1b69 test: fix 2nd flaky blob test case
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64391
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-12 15:11:38 +00:00
Matteo Collina 47b6ef28e6 net: make TCP Server and Socket transferable across worker threads
Allow a listening net.Server or an accepted net.Socket to be moved to
another thread by listing it in the transferList of a worker_threads
postMessage() call. Unix only; Windows throws.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64225
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-07-12 15:11:28 +00:00
Stefano Baghino 2d7fee04f4 http: fix perf_hooks detail.req.url port and proxied path
The perf_hooks HTTP client entry built the reported URL from the bare
hostname, dropping non-default ports and IPv6 brackets, and appended
the request path even after it had been rewritten to absolute-form for
proxying, duplicating the protocol and authority.

Report the connection authority captured at request creation and, for
proxied requests, use the rewritten absolute-form target as-is.

Fixes: https://github.com/nodejs/node/issues/59625
Signed-off-by: Stefano Baghino <stefano@baghino.me>
PR-URL: https://github.com/nodejs/node/pull/64311
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
2026-07-12 14:48:42 +00:00
Antoine du Hamel a4821c8a75 tools: add option for benchmark.yml to post comment on PR
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64395
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-12 12:59:42 +00:00
Moshe Atlow 892976d17a test_runner: add context.log() and test:log event
Add a log(message[, data]) method to TestContext and SuiteContext that
emits a new test:log event. Unlike test:diagnostic, which is buffered
so it is emitted in the order tests are defined, test:log is emitted
immediately, in the order tests execute, including under process
isolation where it bypasses the per-file declaration order buffer.
This gives reporters that render the test tree unbuffered a live,
attributed logging channel that captured stdout cannot provide under
concurrency.

The event carries the message, an optional opaque structured payload
that the runner passes through untouched, and the emitting test's
name, testId, parentId, nesting, and location. Built-in reporters
render it the same way they render test:diagnostic.

Signed-off-by: Moses Atlow <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/64389
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-07-12 11:45:05 +00:00
Archkon 17163ead33 http: do not emit socket errors after complete response
Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64278
Fixes: https://github.com/nodejs/node/issues/64272
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-12 11:16:52 +00:00
Archkon 794d9b1df0 doc: remove duplicate VirtualProvider description
Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64400
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-07-12 07:13:19 +00:00
Archkon 7c53fb51dc src: fix some typo errors and rename some variables
Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64301
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-07-12 06:16:34 +00:00
Trivikram Kamat 14166a59cc stream: validate writevSync chunks before queuing
Ensure writevSync() validates every chunk before handing the batch to
the push queue. Invalid chunks now throw ERR_INVALID_ARG_TYPE without
leaving data readable from the failed write.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/64300
Fixes: https://github.com/nodejs/node/issues/64299
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-12 04:01:07 +00:00
Efe Karasakal abe25457e9 http: remove unused n arg from IncomingMessage._read
Signed-off-by: Efe Karasakal <hi@efe.dev>
PR-URL: https://github.com/nodejs/node/pull/64370
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-11 22:32:41 +00:00
Node.js GitHub Bot 8a3b11c738 deps: update ngtcp2 to 1.24.0
PR-URL: https://github.com/nodejs/node/pull/64297
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-07-11 10:37:06 +00:00
Matteo Collina 9f1ae2222c stream: speed up reads and iteration over default WHATWG streams
Skip the size algorithm call and its result validation when the size
algorithm is the default one, and stop re-running the full
ShouldCallPull predicate at per-chunk call sites where its inputs are
already established.

readable-async-iterator type=normal: +16.6% (***)
readable-read-buffered: +13.9% to +27.5% (**/***)
pipe-to: +3.7% to +6.0% (15/16 configs significant)

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64320
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-07-11 08:53:54 +00:00
Moshe Atlow 8f5fda2d23 doc: add scope overview tables for TestsStream events
Summarize all TestsStream events in three tables by scope (test, file,
and global), pairing declaration ordered (buffered) test scoped events
with their execution ordered (immediate) equivalents.

Signed-off-by: Moshe Atlow <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/64386
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-07-11 08:11:37 +00:00
Trivikram Kamat 6eff6797be stream: copy SAB-backed chunks in iter consumers
Ensure bytes() copies single chunks backed by SharedArrayBuffer so
arrayBuffer() and arrayBufferSync() return ArrayBuffer instances as
specified.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/64382
Fixes: https://github.com/nodejs/node/issues/64381
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mattias Buelens <mattias@buelens.com>
2026-07-11 04:48:55 +00:00
Tim Perry ab41cf0a78 test: fix flaky watch + cwd + argv test-runner test
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64372
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-07-10 20:35:28 +00:00
Matteo Collina 26079c0cfa doc: clarify proxy threat model
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64366
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-07-10 16:53:10 +00:00
Antoine du Hamel 116302d950 dns: address compile-time warnings
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64355
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-07-10 12:36:23 +00:00
Jamie Magee d6cd5c19cf deps: enable OpenSSL asm support for riscv64
Move linux64-riscv64 from NO_ASM_ARCHS to ASM_ARCHS in the OpenSSL
config Makefile and regenerate the configuration. This adds asm/ and
asm_avx2/ config variants alongside the existing no-asm/ variant.

When riscv64 was first added to the OpenSSL config in 2021 (#40063),
OpenSSL had no RISC-V assembly support. OpenSSL 3.5.x now ships 17
perlasm generators covering AES (zvkned, zvkb, zkn), SHA-256/512
(zvknha, zvknhb), GHASH/GCM (zvkg, zvbc), ChaCha (v, zbb), SM3
(zvksh), SM4 (zvksed), and CPUID detection. Runtime capability
detection via riscvcap.c and the Linux hwprobe syscall ensures safe
fallback to generic C code on hardware without these extensions.

Also add riscv64 entries to the six asm gypi selector files:
openssl_asm.gypi, openssl_asm_avx2.gypi, openssl-cl_asm.gypi,
openssl-cl_asm_avx2.gypi, openssl-fips_asm.gypi, and
openssl-fips_asm_avx2.gypi.

Refs: https://github.com/nodejs/build/issues/4099
Signed-off-by: Jamie Magee <jamie.magee@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62606
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-07-10 12:36:10 +00:00
Trivikram Kamat 4140d4c2c8 stream: reject nested async streamables in from()
Reject nested async iterables and toAsyncStreamable values when from()
is consuming a sync iterable source. Promise values are still awaited.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/64352
Fixes: https://github.com/nodejs/node/issues/64351
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-10 07:01:45 +00:00
Joyee Cheung 8fec65d877 test: normalize Windows crash in debugger test normalization
The inspector can crash on teardown when the debuggee exits quickly,
previously we ignored it for debugger tests as that's likely an
upstream issue unrelated to Node.js's own debugger utilities,
but the detection only matches patternsf on UNIX-y platforms.
On Windows this manifests as exit code 3221225477 (0xC0000005
STATUS_ACCESS_VIOLATION) instead of SIGSEGV. Extend the helper
to recognize and normalize both variants.

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64332
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-09 11:24:31 +00:00
Kirill Saied 7360fadff4 test: unmark flaky http2-large-file for Win
Signed-off-by: Kirill Saied <sayed.kirill@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64255
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-07-09 11:24:20 +00:00
Kirill Saied 70361998cb test: unmark flaky SEA snapshot tests on Windows
Signed-off-by: Kirill Saied <sayed.kirill@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64317
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-09 06:31:24 +00:00
semimikoh 243905ae41 buffer: fix Blob.stream() leaking source buffer
Blob.prototype.stream() registered a wakeup callback on the
underlying source's start() and never released it. The strong
Reader::wakeup_ handle kept the reader -- and through it the
blob's DataQueue and backing store -- reachable as a GC root, so
the source buffer leaked on every stream() call. On Node 26+,
streaming a 1 MiB blob 300 times retained ~300 MiB in
process.memoryUsage().arrayBuffers while the V8 heap stayed small.

Register the wakeup lazily in pull() and clear it on every terminal
or idle path (EOS, error, cancel, backpressure), mirroring the
cleanup already done by the async iterator path. The strong handle
now only lives while a pull is in flight, so the reader and its
backing store become collectable once the stream finishes, errors,
is cancelled, or goes idle under backpressure.

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

Signed-off-by: semimikoh <ejffjeosms@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63577
Fixes: https://github.com/nodejs/node/issues/63574
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-09 06:31:10 +00:00
Trivikram Kamat 0032189dbe stream: avoid draining merged iter sources
Defer reading the next value from each source in merge() until the
merged consumer resumes after receiving the previous value.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/64293
Fixes: https://github.com/nodejs/node/issues/63566
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-07-08 23:01:52 +00:00
Filip Skokan db7cc5b400 crypto: split OpenSSL 3, BoringSSL, and legacy backends
This separates the native crypto backend paths for OpenSSL >= 3,
BoringSSL, and legacy OpenSSL. The OpenSSL >= 3 path now builds with
`OPENSSL_API_COMPAT=30000` and `OPENSSL_NO_DEPRECATED`, moving normal
crypto/TLS code away from APIs that OpenSSL 3.0.0 marks deprecated.
BoringSSL remains on its own branch, and OpenSSL < 3 remains the legacy
fallback.

The exception is ENGINE support. ENGINE APIs are isolated into a
dedicated compatibility target so they can remain available while the
JS-facing engine APIs are runtime-deprecated in 27.x. That gives us a
clear removal point for 28.x, without letting ENGINE usage leak back
into the strict OpenSSL 3 path.

The split also makes the eventual OpenSSL 1.1.1 removal easier to reason
about. Once support for OpenSSL < 3 is dropped, the legacy branch can be
removed in a focused follow-up, possibly targeting 27.x, instead of
untangling mixed version guards throughout the crypto implementation.

No public crypto or TLS API behavior is intentionally changed.

Assisted-by: Codex:gpt-5
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64211
Refs: https://github.com/nodejs/node/issues/56733
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-08 20:07:45 +00:00
Node.js GitHub Bot a18052e4c1 deps: update c-ares to 1.34.8
PR-URL: https://github.com/nodejs/node/pull/64330
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-07-08 18:54:47 +00:00
Tim Perry 0792ee57ba quic: extract transport logic from Application to Session
One small fix notably included:

- Check is_destroyed() after StreamCommit, since it calls JS callbacks
  which could destroy the session.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64127
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-08 18:54:36 +00:00
npm CLI robot fd35018553 deps: upgrade npm to 11.18.0
PR-URL: https://github.com/nodejs/node/pull/64199
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-07-08 18:19:36 +00:00
Marten Richter 799e910181 quic: correct http3 callback and fix revealed errs
The http3 application had misinterpreted some of
nghttp3 callbacks regarding stopSending
and ResetStream.
Actually, these callbacks asks the application
to do the action and not informs about an event
from the peer.

The fixes lead to some failures of the automated
tests, uncovering some problems:

First headers, and pendingTrailers were reset,
when the internal object went away,
though the test wanted to read them.

Second, during a graceful session shutdown,
the implemented did not waited for all stream
to be removed, but only one.

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

Signed-off-by: Marten Richter <marten.richter@freenet.de>
PR-URL: https://github.com/nodejs/node/pull/64289
Fixes: https://github.com/nodejs/node/issues/63657
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-07-08 15:58:33 +00:00
Maya Lekova a0062623e0 module: add two tests for eager imports when using import defer
- when the defer imported module contains top-level await
  - when the defer imported module is also eagerly imported

Refs: https://github.com/tc39/proposal-defer-import-eval
Signed-off-by: Maya Lekova <maya@igalia.com>
PR-URL: https://github.com/nodejs/node/pull/64197
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-07-08 15:58:13 +00:00
Yagiz Nizipli 1912893c29 stream: use ring buffer for WHATWG stream queues
The [[queue]] backing every default readable/writable controller was a
plain array of { value, size } wrappers consumed with
ArrayPrototypeShift, so each buffered chunk allocated a wrapper object
and each dequeue moved (or forced the engine to re-linearize) the
remaining elements; the byte controller queue paid the same shift cost
for its chunk descriptor records.

Replace the array with a power-of-two ring buffer. Default controller
queues store each entry as (value, size) in two consecutive slots, so
the per-chunk wrapper allocation disappears; the byte controller keeps
its descriptor records (they are mutated in place at the head) in
single slots. Controllers start from (and are reset to) a shared
immutable empty queue, so constructing a stream allocates no queue
storage until a chunk is actually buffered. Enqueues measured by the
internal default size algorithm (never observable by user code, always
returns 1, cannot throw) skip the algorithm call and its try/catch
entirely.

The layout mirrors what Bun/WebKit use for the same spec structure:
[[queue]] as a ring-buffer deque (WTF::Deque in Bun's
src/jsc/bindings/webcore/streams/StreamQueue.h), the pure-JS ring
buffer in Bun's src/js/internal/fifo.ts, and the trivial-size-algorithm
bypass in
src/jsc/bindings/webcore/streams/JSReadableStreamDefaultController.cpp.

benchmark/compare.js against the unmodified baseline (30-run capture
plus an independent 15-run repeat, Welch t-test, all p < 1e-5):
webstreams/pipe-to.js +12-17% across all sixteen high-water-mark
configurations, readable-read-buffered +20% (bufferSize=1) to +49%
(bufferSize=1000), readable-async-iterator +21%. No stable significant
regression across the rest of the webstreams suite: the creation.js and
readable-read.js deltas seen in the full-suite capture disappear in
isolated 60-run rechecks.

Refs: https://github.com/oven-sh/bun/blob/main/src/js/internal/fifo.ts
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
Assisted-by: Grok (Grok Build)
PR-URL: https://github.com/nodejs/node/pull/64312
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-08 15:05:45 +00:00
Yagiz Nizipli f653d84fcd stream: hoist repeated loads in readable paths
fromList() re-read state.length and each chunk's length several times
per call and re-loaded buffer[idx] around every copy, and read() loaded
state.length three times in its read(0) check; the engine cannot fold
these loads across the intervening copy and slice calls. Cache them in
locals instead. Ported from Bun's fork of the same functions
(src/js/internal/streams/readable.ts fromList/read), which carries
these hoists on top of the shared readable-stream lineage.

benchmark/compare.js against the unmodified baseline (60-run capture
plus an independent 30-run repeat, Welch t-test):
streams/readable-unevenread +0.65% (p=4.3e-4) / +0.59% (p=5.9e-3) and
streams/pipe.js +0.74% (p=2.0e-4) / +0.52% (p=8.8e-3), with no
significant regression across the captured streams benchmarks.

Refs: https://github.com/oven-sh/bun/blob/main/src/js/internal/streams/readable.ts
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
Assisted-by: Grok (Grok Build)
PR-URL: https://github.com/nodejs/node/pull/64312
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-08 15:05:43 +00:00
Stewart X Addison 3fc183f833 doc: add note about restricted CI to pull-requests.md
PR-URL: https://github.com/nodejs/node/pull/64321
Signed-off-by: Stewart X Addison <sxa@ibm.com>
2026-07-08 15:29:20 +01:00
Stewart X Addison 6e8a24d464 doc: various updates to releases.md
- Clarify permissions needed to be able to prepare a release
- Add CitGM to the "relevant jenkins jobs" section
- Clarify GPG key creation process and algorithms
- Also suggest that GPG keys can be published to ubuntu's keyservers
- Clarify that signed commits on release branches are required
- Add note about branch-diff using significant github API credits
- Explicit comment on each section which can be skipped with automation

Signed-off-by: Stewart X Addison <sxa@ibm.com>
PR-URL: https://github.com/nodejs/node/pull/64198
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2026-07-08 15:07:57 +01:00
Paolo Insogna 3e8aa7de27 ffi: add getCurrentEventLoop
Signed-off-by: Paolo Insogna <paolo@cowtech.it>
Assisted-By: OpenAI:GPT-5.5 <openai/gpt-5.5>
PR-URL: https://github.com/nodejs/node/pull/64323
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2026-07-08 13:24:50 +00:00
Node.js GitHub Bot 9051e5e7eb 2026-07-08, Version 26.5.0 (Current)
Notable changes:

buffer:
  * (SEMVER-MINOR) implement blob.textStream() (Matthew Aitken) https://github.com/nodejs/node/pull/64036
esm:
  * (SEMVER-MINOR) add `--experimental-import-text` flag (Efe) https://github.com/nodejs/node/pull/62300
perf_hooks:
  * (SEMVER-MINOR) sample delay per event loop iteration (Pablo Erhard) https://github.com/nodejs/node/pull/62935
stream:
  * (SEMVER-MINOR) expose ReadableStreamTee (Matteo Collina) https://github.com/nodejs/node/pull/64195
tls:
  * (SEMVER-MINOR) report negotiated TLS groups (Filip Skokan) https://github.com/nodejs/node/pull/64119

PR-URL: https://github.com/nodejs/node/pull/64329
Signed-off-by: Richard Lau <richard.lau@ibm.com>
2026-07-08 11:48:20 +00:00
Node.js GitHub Bot 1709394fcb meta: move one or more collaborators to emeritus
PR-URL: https://github.com/nodejs/node/pull/64315
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-08 09:57:12 +00:00
Pascal Garber 1d87a24050 tls: match IPv6 hosts against IP-Address SANs
checkServerIdentity() stopped matching an IPv6 host against a matching
IP-Address SAN. The hostname is now run through domainToASCII() before
the net.isIP() gate, and domainToASCII('::1') === '' (an IPv6 literal is
not a domain), so net.isIP('') is 0, the IP-SAN branch is skipped, and
verification fails with "Cert does not contain a DNS name". IPv4 is
unaffected because dotted-decimal survives domainToASCII().

Match IP hosts against the original hostname instead of the IDNA-
normalized one. net.isIP() rejects non-ASCII input, so there is no IDNA
confusion to guard against for an IP literal; the normalized form is
still used for the DNS-name path.

Fixes: https://github.com/nodejs/node/issues/64144
Signed-off-by: Pascal Garber <pascal@artandcode.studio>
PR-URL: https://github.com/nodejs/node/pull/64145
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-07-08 09:57:03 +00:00
Trivikram Kamat 91b65a4fe8 stream: prefer sync iterator in fromSync
When an input provides Symbol.iterator, fromSync() should consume the
synchronous iterator instead of rejecting the input because it also
exposes an asynchronous or promise-like protocol.

Continue rejecting async-only iterables and promise/thenable-only
inputs, but allow sync iterables that also define Symbol.asyncIterator
or then().

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/64294
Fixes: https://github.com/nodejs/node/issues/64292
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-08 07:06:40 +00:00
Trivikram Kamat 8e1ab55ac4 test: increase timeout in consumed-timeout test
Increase the base timeout in test-http-server-consumed-timeout from
common.platformTimeout(200) to common.platformTimeout(1000).

The test is intentionally timing-sensitive and can fail on slower or
more contended CI hosts when timers fire later than expected. Using a
larger timeout reduces false positives without changing the behavior
being tested.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/64204
Refs: https://ci.nodejs.org/job/node-stress-single-test/764/
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-07-08 00:59:28 +00:00
Chengzhong Wu 4ee2117883 vm: enable interception on global restricted properties
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/64202
Fixes: https://github.com/nodejs/node/issues/63715
Refs: https://github.com/v8/v8/commit/a05321ebd98e3bff3c6bba3df02895a49d6ad2fb
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-07-07 17:59:01 +00:00
Chengzhong Wu 39d9e8cba0 deps: V8: backport a05321ebd98e
Original commit message:

    [execution] Lookup interceptor for RestrictedGlobalProperty

    When the script context looks up if a global property is
    restricted, it should also query the global interceptor.

    To avoid calling the interceptor for every declaration
    unconditionally, an interceptor has to be defined with
    `PropertyHandlerFlags::kHasDontDeleteProperty`
    to intercept restricted global property queries.

    Refs: https://github.com/nodejs/node/issues/63715
    Refs: https://github.com/nodejs/node/issues/52634

    Change-Id: I623ff285c4e8773d8ee7f681cbad68ba24bd3f40
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7898818
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#108280}

Refs: https://github.com/v8/v8/commit/a05321ebd98e3bff3c6bba3df02895a49d6ad2fb
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/64202
Fixes: https://github.com/nodejs/node/issues/63715
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-07-07 17:59:00 +00:00
Moshe Atlow f4c85d5d82 test_runner: report entryFile in TestStream events
Signed-off-by: Moshe Atlov <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/64309
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-07-07 15:29:21 +00:00
Chengzhong Wu 94164da441 doc: remove obsolete --napi-modules doc entry
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/64220
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2026-07-07 15:29:10 +00:00
Matteo Collina 5e47f2b468 http2: avoid copying the options in respond()
respond() copied the user-provided options object on every call just
so it could normalize and locally flip options.endStream, and
prepareResponseHeadersObject() then looked the :status and date
fields up again on the dictionary-mode null-prototype headers copy
it had just built. Use a local variable for endStream and pick up
:status/date while copying the headers instead.

No measurable throughput change on its own; this removes an object
clone and several dictionary-mode property lookups per response.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64265
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-07-07 14:24:16 +00:00