Commit Graph
47721 Commits
Author SHA1 Message Date
Nora Dossche c18fd9060b sqlite: fix undefined behaviour in Session::Changeset()
If `nChangeset == 0`, the pointer `pChangeset` may be nullptr.
Passing a nullptr to `memcpy()` is undefined behaviour.
This can be triggered by running the test suite under UBSAN.

Signed-off-by: ndossche <nora.dossche@ugent.be>
PR-URL: https://github.com/nodejs/node/pull/63637
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-08-06 03:18:25 +00:00
Guilherme Araújo 51c0d94072 sqlite: add StatementSync.prototype.close()
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64232
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-08-05 18:10:35 -07:00
Guilherme Araújo 04c104a725 sqlite: add StatementSync.prototype[Symbol.dispose]()
This extends explicit resource management support to prepared
statements, allowing a StatementSync to be deterministically
finalized via a `using` declaration, mirroring the existing
DatabaseSync and Session dispose methods.

Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64232
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-08-05 18:10:31 -07:00
René 735a09f999 meta: update sccache to 0.17.0
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/64985
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-08-05 21:04:26 +00:00
mike-git374 62acd4888c sqlite: bind ArrayBuffer
PR-URL: https://github.com/nodejs/node/pull/62061
Fixes: https://github.com/nodejs/node/issues/61396
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2026-08-05 22:43:40 +02:00
Antoine du Hamel 02f46304d0 doc: update node.1 to fix linter
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65053
Refs: https://github.com/nodejs/node/pull/58909
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-08-05 20:04:24 +00:00
이혜미 9766a672a7 esm: fix wasm import name in error message
Report the rejected import name instead of the import module when
throwing for reserved Wasm import names.

Signed-off-by: hyemimi <hyemi7375@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64950
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
2026-08-05 20:03:09 +00:00
Filip Skokan 74ca91a5a2 doc: clarify OpenSSL FIPS configuration
Distinguish OpenSSL 3 provider setup from FIPS/property-query state,
document configuration precedence and provider limitations, and retain
the OpenSSL 1.1 and runtime control guidance.

Regenerate the CLI manpage.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64982
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-05 17:33:08 +00:00
Filip Skokan 0153c1f491 build: check FIPS option value in node.gyp
openssl_is_fips is always the string "true" or "false", so testing
whether it is non-empty always adds OPENSSL_FIPS to mkssldef. Add the
define only when FIPS was requested.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64982
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-05 17:33:07 +00:00
Filip Skokan fa05834a1b build: handle malformed OpenSSL macros
A missing OPENSSL_VERSION_NUMBER macro raises TypeError while the
configure logic attempts to slice None. Treat that like the other
version detection failures so configure warns and records version 0.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64982
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-05 17:33:06 +00:00
Filip Skokan 6b8a454f2b crypto: fix disabling FIPS mode
OpenSSL reports FIPS mode as disabled after a successful
EVP_default_properties_enable_fips(..., 0) call. Do not treat that
disabled state as a failure.

Add OpenSSL 3 regression coverage that verifies the state is enabled
before disabling it again.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64982
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-05 17:33:04 +00:00
Antoine du Hamel 3f2fc8aaef 2026-08-05, Version 26.7.0 (Current)
Notable changes:

crypto:
  * (SEMVER-MINOR) support loading private keys through STORE loaders (Filip Skokan) https://github.com/nodejs/node/pull/63949
  * update root certificates to NSS 3.125 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/64746
lib:
  * (SEMVER-MINOR) add perfetto support (Chengzhong Wu) https://github.com/nodejs/node/pull/64565
module:
  * (SEMVER-MINOR) implement `Symbol.dispose` in ModuleHooks (Remco Haszing) https://github.com/nodejs/node/pull/63928
test_runner:
  * (SEMVER-MINOR) add support for `--test-coverage-include-all` (avivkeller) https://github.com/nodejs/node/pull/64830

PR-URL: https://github.com/nodejs/node/pull/65027
2026-08-05 18:21:40 +02:00
Dario Piotrowicz a8350acb1d doc: remove --expose-gc flag from CLI documentation
PR-URL: https://github.com/nodejs/node/pull/58909
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-08-05 18:16:43 +02:00
Filip Skokan dc7838c191 tools: add an OpenSSL FIPS build to test-shared.yml
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64960
Fixes: https://github.com/nodejs/node/issues/48379
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-05 15:38:12 +00:00
Filip Skokan 45550ee0f3 test: update tests to run with OpenSSL >= 3.0 FIPS mode
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64960
Fixes: https://github.com/nodejs/node/issues/48379
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-05 15:38:11 +00:00
Filip Skokan b79dcdf1df src: report why --enable-fips failed
The startup failure always appended the OpenSSL error queue, so when
Node.js itself detected the missing fips provider it printed an error
header followed by nothing. Report the reason instead.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64979
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-08-05 14:49:29 +00:00
Node.js GitHub Bot f7804f7078 test: update WPT for WebCryptoAPI to 82c3d9069c
PR-URL: https://github.com/nodejs/node/pull/64977
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-08-05 13:57:43 +00:00
James M Snell 9e59c1abd6 util: add non-throwing MIMEType.parse
Similar to `URL.parse(...)`, the `MIMEType.parse(...)` API will
return `null` if the input cannot be parsed as opposed to throwing
the way the constructor does.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64965
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-08-05 13:57:32 +00:00
RafaelGSS 3e6cca0e6a dns: handle large resolveAny address replies
Refs: https://hackerone.com/reports/3795657
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
CVE-ID: CVE-2026-58042
PR-URL: https://github.com/nodejs/node/pull/64820
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-08-05 08:18:59 -03:00
kyungrae2002 7c87c37c44 doc: document ArrayBuffer support in pbkd2Sync
Signed-off-by: kyungrae <kyungrae2002@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64976
Refs: https://github.com/nodejs/node/pull/35093
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-08-05 10:20:04 +00:00
Matteo Collina b33cc0edc1 url: handle unparsable serialized URLs in setters
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64651
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-08-05 10:19:53 +00:00
James M Snell 41afbd30cf src: update repeated use strings to env
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64760
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-08-05 05:36:44 +00:00
Yilong Li e535675be3 doc: correct default highWaterMark values
File write streams inherit the default byte-stream highWaterMark.
The fixed 16 KiB value became stale when that default changed.
Also document the Windows-specific byte-stream default.

Signed-off-by: umuoy1 <burningdian@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64617
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-08-05 04:37:14 +00:00
Archkon 579fb17ada tools: sync mk-ca-bundle.pl with curl
Synchronize mk-ca-bundle.pl with curl 1.33. This brings in curl's
corrected handling of NSS distrust-after metadata.

Refs: https://github.com/curl/curl/blob/0ada20387c31c638cfd7f6b4ae7e5cab5b318caf/scripts/mk-ca-bundle.pl
Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64753
Fixes: https://github.com/nodejs/node/issues/64752
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-08-05 02:17:26 +00:00
Archkon 6bab948d34 buffer: treat detached ArrayBuffers as empty
Treat detached ArrayBuffers and Buffer or TypedArray views backed by
them as zero-length inputs in buffer.isUtf8() and buffer.isAscii(). Both
functions now return true for these inputs, consistent with other empty
inputs.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64504
Fixes: https://github.com/nodejs/node/issues/64503
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-05 02:17:00 +00:00
npm CLI robot c8fa0b1466 deps: upgrade npm to 11.19.0
PR-URL: https://github.com/nodejs/node/pull/64883
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-04 21:27:31 +02:00
Chengzhong Wu 1fc74c8dbb build: enable perfetto updater
Signed-off-by: Chengzhong Wu <legendecas@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64966
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2026-08-04 19:10:36 +00:00
Jihwan 8465148f4a test_runner: fix env option validation
Signed-off-by: hanityx <hanityx@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64865
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-08-04 18:32:44 +00:00
Trivikram Kamat 2b350bb8e4 ffi: accept pointer BigInts in multi-argument fast calls
convertPointerArg ended with an unconditional getRawPointer call for
buffer and arraybuffer types, rejecting BigInt addresses that the
single-argument fast path and ToFFIArgument both accept. Drop the
fallback; hasPointerMemoryArg already converts memory-backed values,
and null, undefined, and strings are handled earlier.

Signed-off-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
Assisted-by: claude:opus-5
PR-URL: https://github.com/nodejs/node/pull/64964
Fixes: https://github.com/nodejs/node/issues/64963
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-04 17:15:37 +00:00
Antoine du Hamel 339062296e tools: store "default" OpenSSL version in openssl-matrix.nix
To help with automating keeping in sync with the bundled version.

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64962
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-04 16:34:32 +00:00
Antoine du Hamel bd2e603921 tools: remove true from branch name for auto-update automation
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64961
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-08-04 15:58:42 +00:00
agape1225 2010da59f9 doc: use ffi.suffix in permission example
The `--allow-ffi` example in cli.md hard-coded the Linux-only `.so`
extension. node:ffi already exposes `suffix` for exactly this case,
and doc/api/ffi.md's own examples use it. Do the same here.

Assisted-by: Claude Sonnet 5
Signed-off-by: agape1225 <49804691+agape1225@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64914
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-04 15:58:27 +00:00
Junsoo Ha 7cb4e7fc46 ffi: support SharedArrayBuffer in getRawPointer
Signed-off-by: Junsoo Ha <junsoo2018@naver.com>
PR-URL: https://github.com/nodejs/node/pull/64864
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-04 15:58:10 +00:00
Ryuhei Shima 427d2e1203 build: add host toolset to perfetto_sdk
Signed-off-by: islandryu <shimaryuhei@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64751
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-04 15:03:32 +00:00
Paul Bouchon 500d0482df test: prefer in-memory databases in sqlite tests
Several SQLite tests created temporary file databases through a
`nextDb()` helper even though they only exercise SQL behavior and never
rely on filesystem persistence. Switch those to `:memory:`, which is
faster and drops the temporary-file bookkeeping. Tests that depend on an
on-disk or shared database keep using files: the constructor, open() and
backup() cases, the timeout and cross-worker suites, and the WAL
journal-mode PRAGMA.

Refs: https://github.com/nodejs/node/issues/64665
Signed-off-by: Paul Bouchon <mail@bitpshr.net>
PR-URL: https://github.com/nodejs/node/pull/64701
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-08-04 15:03:13 +00:00
Matteo Collina 1576cb83b4 http2: increase default window sizes
Increase the default HTTP/2 stream window from 64KB (65535) to 4MB
(4194304) and the default local connection window to 32MB (33554432).

The default 64KB window limits throughput on high-latency connections
to window_size / RTT. With a 250ms RTT, throughput is limited to
256KB/s. The new defaults improve throughput to 16MB/s (128Mbps)
for the stream window and 128MB/s (1Gbps) for the connection window.

Fixes: https://github.com/nodejs/node/issues/38426
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64623
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-04 14:01:33 +00:00
Yilong Li 31cde9fee9 ffi: reuse libffi call plans
Precompute a libffi call plan for each fixed signature on x86-64
System V and reuse it from the generic and SharedBuffer invokers. This
avoids repeating argument-placement work for every call.

Continue to use ffi_call() with libffi older than 3.7, on other ABIs,
and when plan allocation fails.

Signed-off-by: umuoy1 <burningdian@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64958
Fixes: https://github.com/nodejs/node/issues/64562
Refs: https://github.com/libffi/libffi/commit/3cc6beb7d404e12d3458461d76557b79795816ff
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-04 13:21:11 +00:00
Kamal Rawal 15495a069f doc: fix grammar and punctuation in dgram documentation
Signed-off-by: Rawal27 <obviouslykamal@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64957
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2026-08-04 12:33:25 +00:00
Archkon 793a6ec0de src: use UTF-8 for task runner filesystem paths
Use ConvertPathToUTF8() instead of path::string() when passing
filesystem paths to Node and libuv interfaces. This prevents paths
containing characters outside the active Windows code page from being
corrupted or rejected.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64868
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2026-08-04 12:33:13 +00:00
Tim PerryandFilip Skokan d18457bad3 tls: don't trigger SNICallback or OCSPRequest from the TLS lib stack
Both events (backed by oncertcb) could potentially write to the socket
synchronously, re-entering SSL mid-handshake and breaking the
connection, so we defer them just like the new 'resumeSession'
behaviour.

Also fixes a small bug in the error path of EmitClientHello, which now
bails out more aggressively instead of resuming handshakes in a V8
teardown scenario.

Co-authored-by: Filip Skokan <panva.ip@gmail.com>
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64827
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-08-04 12:33:02 +00:00
Tim Perry 5b940dd124 tls: drop hand-rolled TLS client hello parser
This existed for 'resumeSession', which needed to do an async lookup
though SSL_CTX_sess_set_get_cb is sync-only. Nowadays both OpenSSL &
BoringSSL have an early ClientHello callback for suspend/resume to
handle this properly, so it was redundant, in addition to being
complicated and generally a bit fragile & scary.

This PR switches to use the modern OpenSSL/BoringSSL mechanisms for this
and drops the client hello parser & related infrastructure completely.

In addition, there's a new test here, covering a fixed bug: the hello
parser silently dropped fragmented hellos, which we now do handle
correctly.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64827
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-08-04 12:33:00 +00:00
Filip Skokan 72768c7ff6 tools: add ./tools/nix/pkcs11.nix to nix-changes.yml
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64967
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-08-04 11:52:01 +00:00
Matteo Collina 3fc98b802e stream: cut per-chunk allocations in pipeTo
readableStreamPipeTo allocated, for every chunk written to the
destination, a { promise, resolve, reject } write request record that
it immediately marked as handled, and drove its loop with an async
step()/run() pair whose implicit promises cost one allocation and one
reaction per iteration. The parked-read path additionally allocated a
read request object, a PromiseWithResolvers record, and a microtask
closure per chunk; this is the steady state for pipeThrough, since a
TransformStream's readable side has a high water mark of zero.

Replace the per-write records with a single per-pipe tracker that the
write request queue holds once per pending write and whose
resolve()/reject() methods maintain a pending-write count, drive the
pump loop with plain callbacks instead of async functions, and reuse
one read request and one forwarding function across all chunks, the
same pattern tee uses since c543cfb72b.

Benchmark results (benchmark/compare.js --runs 20):
webstreams/pipe-to.js +29.9% to +35.8% across all 16 configurations
(all 99.9% confidence); a pipeThrough(TransformStream) passthrough
loop improves ~17%; every other webstreams benchmark is unchanged.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64890
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-08-04 11:06:00 +00:00
Matteo CollinaandAsroy Cristian Sitorus 5cef7673ae sqlite: prevent database close during callbacks
Co-authored-by: Asroy Cristian Sitorus <asroycristiansitorus@gmail.com>
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64743
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-04 11:05:47 +00:00
Node.js GitHub Bot ece8bbef97 deps: update ngtcp2 to 1.25.0
PR-URL: https://github.com/nodejs/node/pull/64944
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-08-04 12:01:10 +02:00
Node.js GitHub Bot 11bdef42b7 deps: update nghttp3 to 1.18.0
PR-URL: https://github.com/nodejs/node/pull/64943
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-08-04 09:55:38 +00:00
Kamal Rawal d82019e99a doc: fix grammar and editorial issues in addons documentation
Signed-off-by: Rawal27 <obviouslykamal@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64952
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2026-08-04 09:12:54 +00:00
Tim Perry 2ddade631a http: fix writableFinished and 'finish' after write errors
Only emit 'finish' and set writableFinished once all data has actually
been flushed successfully. end() callbacks now report the outcome like
stream.Writable: called with null on finish, or with the error that
prevented the flush.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64847
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-04 09:07:43 +00:00
Tim Perry 13e4e3d8e8 quic: fix stop sending behaviour & callback
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64710
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-04 09:07:31 +00:00
Trivikram Kamat fb6693eeaa stream: preserve push signal abort reason
Pass the stream-wide signal reason directly to writer.fail() so valid
non-Error abort reasons are not replaced with an AbortError.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/64798
Fixes: https://github.com/nodejs/node/issues/64797
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-04 04:58:22 +00:00