Commit Graph
46948 Commits
Author SHA1 Message Date
dependabot[bot] 2d26bf4897 tools: bump brace-expansion from 5.0.5 to 5.0.6 in /tools/eslint
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 5.0.5 to 5.0.6.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v5.0.5...v5.0.6)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 5.0.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/63415
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-05-26 23:00:06 +00:00
Filip Skokan 75c1982400 test: deflake test-webcrypto-crypto-job-mode
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63543
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-26 20:36:56 +00:00
Trivikram Kamat 92f48f43fe tools: enforce iterator result property order
Add a custom ESLint rule requiring iterator result objects to place
`done` before `value`, and update existing lib iterator result objects
to follow the rule.

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/63526
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-26 17:19:42 +00:00
Moshe Atlow cebe4248af test_runner: fix suite diagnostic chanel end
Signed-off-by: Moshe Atlow <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/63533
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-26 13:41:29 +00:00
Antoine du Hamel 85d4a5f4f1 doc: clarify filter option of sqlite.database.applyChangeset
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63515
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2026-05-26 13:41:13 +00:00
Stefan Stojanovic 55b8a30319 build,win: fix VS2022 arm64 PGO build
Refs: https://github.com/nodejs/node/pull/62761
Signed-off-by: StefanStojanovic <stefan.stojanovic@janeasystems.com>
PR-URL: https://github.com/nodejs/node/pull/63413
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2026-05-26 13:40:44 +00:00
Rafael Gonzaga 956e2a2b86 lib,permission: add permission.drop
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/62672
Refs: https://github.com/nodejs/node/issues/62223
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-26 13:40:14 +00:00
Joyee Cheung 460c35085f debugger,test: deflake resume failure test and add debug logs
On slow CI, the outer Debugger.resume can be picked up in the
same drain pass as the Debugger.evaluateOnCallFrame, while V8
still considers the context paused. In this case both resume
calls may succeed and the process can continue running from
the setInterval until the timeout. Accept both probe failure
and timeout as valid to accommodate this flakiness.

This patch also adds more debug logs to the probe mode to
show more information in case it flakes again in the CI

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63524
Fixes: https://github.com/nodejs/node/issues/63505
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-05-26 10:20:15 +00:00
Node.js GitHub Bot 8bb63edee7 crypto: update root certificates to NSS 3.123.1
This is the [`certdata.txt`][0] from NSS 3.123.1.

This is the version of NSS that shipped in Firefox 151.0.1 on 2026-05-21

Certificates removed:
- QuoVadis Root CA 2
- QuoVadis Root CA 3
- DigiCert Assured ID Root CA
- DigiCert Global Root CA
- DigiCert High Assurance EV Root CA
- SwissSign Gold CA - G2
- SecureTrust CA
- Secure Global CA
- COMODO Certification Authority
- Certigna
- certSIGN ROOT CA
- Izenpe.com
- AffirmTrust Commercial
- AffirmTrust Networking
- AffirmTrust Premium
- AffirmTrust Premium ECC
- TeliaSonera Root CA v1
- Entrust Root Certification Authority - G2
- Entrust Root Certification Authority - EC1
- Trustwave Global Certification Authority
- Trustwave Global ECC P256 Certification Authority
- Trustwave Global ECC P384 Certification Authority
- GLOBALTRUST 2020
- GTS Root R2
- FIRMAPROFESIONAL CA ROOT-A WEB

[0]: https://raw.githubusercontent.com/nss-dev/nss/refs/tags/NSS_3_123_1_RTM/lib/ckfw/builtins/certdata.txt

PR-URL: https://github.com/nodejs/node/pull/63527
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-05-26 12:14:18 +02:00
Jordan Harband 339339986d crypto: coerce -0 keylen to +0 in pbkdf2 and scrypt
`validateInt32(keylen, 'keylen', 0)` lets `-0` through: `typeof -0` is
`'number'`, `Number.isInteger(-0)` is `true`, and `-0 < 0` is `false`.
The value then reaches the PBKDF2Job binding, whose `IsInt32()` check
fails (V8 boxes `-0` as a HeapNumber rather than a tagged SMI) and
aborts the process with SIGABRT.
Coerce `keylen` to `+0`
after validation so the binding sees a true Int32.

Reachable from any caller that forwards a JSON-parsed value,
since `JSON.parse('{"keylen":-0}').keylen` preserves the sign.

Mirror of the prior pbkdf2 fix. `validateInt32(keylen, 'keylen', 0)`
lets `-0` through (since `-0 < 0` is `false`), and the ScryptJob
binding's `IsInt32()` check at `crypto_scrypt.cc` aborts the process
with SIGABRT because V8 boxes `-0` as a HeapNumber rather than a
tagged SMI. Coerce `keylen` to `+0` after validation.

Signed-off-by: Jordan Harband <ljharb@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63531
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-26 11:25:44 +02:00
Node.js GitHub Bot 73c592be2f tools: update nixpkgs-unstable to 3d8f0f3f72a6cd4d93d0ad13203f2ea1cb7
PR-URL: https://github.com/nodejs/node/pull/63528
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-05-26 02:03:07 +00:00
Joyee Cheung e2ad744e5f test: remove test-node-output-v8-warning
asm.js validation is deprecated and disabled by default in V8,
so there's no longer a stable user-reachable trigger for
`v8::Isolate::kMessageWarning`. Remove the test.

Refs: https://chromium-review.googlesource.com/c/v8/v8/+/7832184

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63469
Fixes: https://github.com/nodejs/node-v8/issues/310
Refs: https://issues.chromium.org/issues/510487707
Refs: https://github.com/nodejs/node/pull/24365
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/7832184
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-05-25 21:52:00 +00:00
Antoine du Hamel b9203ee79f src,sqlite: only pass xFilter when user provided a callback
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63516
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2026-05-25 17:20:10 +00:00
Filip Skokan 742849dca7 test: cover webcrypto prototype pollution systematically
Drive the regression test from the WebCrypto algorithm registry so all
supported algorithms and operations must add explicit coverage
regardless of whether they are native-job backed or js-based.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63520
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-25 16:36:32 +00:00
Filip Skokan ecee55e875 doc,lib: align WebCrypto names with spec
Rename WebCrypto operation parameters and local variables to match the
spec terminology.

Use operation, algorithm, and key names consistently between the docs
and implementation.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63518
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-25 16:36:19 +00:00
Node.js GitHub Bot c98ab680d6 test: update test426-fixtures to 9b9e225b5a63139e9a95cdd1bf874a8f0b9d131
PR-URL: https://github.com/nodejs/node/pull/63373
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-25 18:30:18 +02:00
Daijiro Wachi 15d0c61bad doc: fix double spaces in ERR_TLS_INVALID_PROTOCOL_METHOD
Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63511
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-25 13:43:09 +00:00
Node.js GitHub Bot 49dcaa09db test: update WPT for url to e4a4672e9e
PR-URL: https://github.com/nodejs/node/pull/63372
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-25 11:13:22 +00:00
Trivikram Kamat 8c495c8030 stream: wait for push writer end fallback to drain
When endSync() returns -1 after buffered writes, a follow-up end()
should stay pending until the readable side drains the queued data.

Do not make duplex channel close() wait for that drain, since close()
only needs to signal EOF to the peer. Waiting there can deadlock when
the peer starts reading only after close() resolves.

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

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/63503
Fixes: https://github.com/nodejs/node/issues/63502
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-25 06:50:32 +00:00
James M Snell 2e3daf6e4d quic: support hostname verification
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-24 19:14:17 -07:00
James M Snell 866caa61f3 quic: add stream idle timeout
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode:Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-24 19:14:15 -07:00
James M Snell 813e42f921 src: improve token return value check
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-24 19:14:14 -07:00
James M Snell 59a4ec1892 quic: add block list support for endpoints
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-24 19:14:12 -07:00
James M Snell 430f89eb8d quic: improve peer cert verification
On the client, add verifyPeer: 'auto', 'strict', and
'manual' modes. The 'strict' mode will reject invalid
certs at the handshake layer, while the 'manual' mode
allows the application to inspect the peer cert and decide
whether to trust it or not. The 'auto' mode is the default
and will reject invalid certs at a middle layer after the
onhandshake event.

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-24 19:14:10 -07:00
James M Snell 38e852c5e1 quic: handle h3 max header size option
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-24 19:14:09 -07:00
James M Snell ad4db1e990 quic: add rate limiting docs
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-24 19:14:08 -07:00
James M Snell 495e53479f quic: cache timestamp for address lru cache
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-24 19:14:06 -07:00
James M Snell 15ad3a606b quic: add session creation rate limiting
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-24 19:14:04 -07:00
James M Snell e88346666f quic: refine rate limiting
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode:Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-24 19:14:02 -07:00
James M Snell 444ba160e3 quic: flip preferred address policy default to 'ignore'
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode:Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-24 19:14:01 -07:00
James M Snell 052017445b quic: add doc note about certificate size limitations
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63483
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-24 19:13:58 -07:00
Trivikram Kamat c55b126f09 test: deflake async-hooks statwatcher test
Wait for the initial missing-file poll before writing watched files.
Otherwise uv_fs_poll can observe the created file as its baseline and
never emit the expected change event.

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/63396
Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-05-15.md#jstest-failure
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-25 01:29:01 +00:00
Trivikram Kamat 1dbea7a20d test: avoid test_runner watch restart in spec snapshot
Pass explicit test files to the watch-mode spec reporter fixture.
This prevents setup writes from triggering a watch restart.

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/63392
Refs: https://github.com/nodejs/node/actions/runs/25983032903/job/76375266688
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-24 23:57:41 +00:00
Trivikram Kamat e98f2ba5a5 test: reduce watch mode restart flakiness
Start waiting for each watch restart before writing the file, then wait
for a platform-scaled settling period before mutating it again.

This gives watch mode time to process filesystem events and dependency
reporting from the child process on slower CI machines.

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/63390
Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-05-16.md#jstest-failure
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-24 23:57:31 +00:00
Marco c58e5a1d4f tools: skip commit-lint on backport pull requests
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63378
Fixes: https://github.com/nodejs/node/issues/63192
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-24 21:51:52 +00:00
Moshe Atlow 1ddb754d39 test_runner: dont buffer unordered events in process isolation mode
Signed-off-by: Moshe Atlow <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/63432
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2026-05-24 19:48:42 +00:00
Aviv Keller 8bc95474a1 doc: move hyperlinks outside of text blocks
Signed-off-by: avivkeller <me@aviv.sh>
PR-URL: https://github.com/nodejs/node/pull/63493
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-05-24 18:46:55 +00:00
Antoine du Hamel d79aad8cd7 tools: fix skip of test-internet on forks
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63492
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-05-24 17:57:19 +00:00
Antoine du Hamel 8c3e9bd967 test: get rid of unnecessary AbortController instanciations
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63489
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-24 15:20:58 +00:00
Antoine du Hamel 7a9feef584 doc: edit Rust toolchain general install instructions
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63488
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-05-24 15:20:48 +00:00
René df09b2a48c ffi: remove function signature property aliases
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/63482
Refs: https://github.com/nodejs/node/pull/62072/changes#r3067834658
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-05-24 12:39:53 +00:00
atlowChemi 74ccf384a9 test_runner: fix --test-rerun-failures swallowing failures on retry
Three independent bugs interacted to let a real failure-on-retry be
reported as a pass:

1. The runner's disambiguator stored the counter against the suffixed
   identifier (after mutation) instead of the base key, so the counter
   never advanced past 1 and every 3rd+ same-loc registration collided
   on :(1).
2. The reporter had the same off-by-one when writing the state file.
3. The reporter only bumped its counter on `test:pass`, so any failing
   test at a shared source location desynchronised the writer and
   runner counters - on retry, the surviving failing sibling would
   inherit a slot that in the previous attempt belonged to a different
   (passing) sibling. Node matched by that slot, replaced `this.fn`
   with a synthetic noop replay, and reported the failure as a pass.

Track the base identifier separately in the runner, bump the counter
against the base key in both the runner and the reporter, and bump the
reporter's counter on `test:fail` in addition to `test:pass`.

Fixes: https://github.com/nodejs/node/issues/63424
Signed-off-by: atlowChemi <chemi@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/63431
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-05-24 10:29:56 +03:00
Trivikram Kamat 837910d298 stream: flush each fused stateless transform
Ensure consecutive stateless stream/iter transforms each receive a
final null flush after upstream flush output has been processed.

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

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/63468
Fixes: https://github.com/nodejs/node/issues/63467
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-23 21:43:57 +00:00
Daijiro Wachi 985b608730 doc: fix double space in modules.md
Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63512
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-23 20:10:43 +00:00
Matteo Collina c9562ddb82 vfs: add minimal node:vfs subsystem
Adds the node:vfs builtin module with VirtualFileSystem and
provider classes. No integration with fs, modules, or SEA.

Assisted-by: Claude-Opus4.7
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/63115
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-05-23 18:43:31 +00:00
sangwook c9dbb86683 inspector: expose precise coverage start to JS runtime
Add a `startCoverage` method on the `profiler` internal binding so
that V8 precise coverage can be enabled after bootstrap. The method
is idempotent against the existing bootstrap path (which creates a
V8CoverageConnection when NODE_V8_COVERAGE or
--experimental-test-coverage is set) and a no-op when the inspector
is unavailable, e.g. in the parent process of
`--test --test-isolation=process` where workers handle coverage and
Environment::should_create_inspector() returns false.

Refs: https://github.com/nodejs/node/issues/60023
Signed-off-by: sangwook <rewq5991@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63079
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-05-23 17:02:02 +00:00
Filip Skokan dfe2d47fe1 crypto: harden WebCrypto against prototype pollution
Avoid re-wrapping native WebCrypto promises with PromiseResolve(),
since resolving a promise can read its user-mutated constructor.

Add a helper for chaining internal WebCrypto job promises without
consulting Promise species state, and use it for intermediate job
results.

Also align JWK wrapping and unwrapping with the spec's fresh-global
JSON handling by detaching internal JWK values from user prototypes.
Use the internal UTF-8 encoder/decoder bindings instead of shared
TextEncoder/TextDecoder prototype methods.

Expand the WebCrypto prototype pollution regression test to cover
SubtleCrypto methods, export formats, zero-length KDF results, JWK
toJSON/kty pollution, and encoder/decoder prototype poisoning.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63363
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-05-23 15:45:33 +00:00
Filip Skokan 0cabd66f31 crypto: pass CryptoKey handles to KDF jobs
Pass CryptoKey handles directly into KDF jobs instead of exporting
secret bytes in lib.

Normalize HKDF, PBKDF2, and Argon2 around the same job construction
pattern so WebCrypto derivation paths avoid extra key material copies
and keep operation failures in native job handling.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63363
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-05-23 15:45:32 +00:00
Filip Skokan b8fc182a0f crypto: remove async from WebCrypto methods
Remove async function wrappers from SubtleCrypto methods while keeping
their public promise-returning behaviour.

Route method entry points through a shared helper that converts
synchronous validation errors into rejected promises. Let the internal
implementations return native job promises directly.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63363
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-05-23 15:45:31 +00:00
Filip Skokan e24e698a97 crypto: add WebCrypto CryptoJob mode
Add a WebCrypto-specific CryptoJob mode that returns a promise from
run() and resolves it when native work is finished.

Encode job output directly as Web Crypto values, including CryptoKey
instances and CryptoKeyPair dictionaries. Convert operation-specific
setup failures from AdditionalConfig into OperationError rejections.

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