Commit Graph
49155 Commits
Author SHA1 Message Date
Yagiz Nizipli d0c7be40f1 test: cover crypto digest and HMAC caches
Check that HMAC instances duplicated from the same cached context stay
independent when their updates are interleaved, and that warmed digest
and HMAC caches follow FIPS mode changes without breaking an HMAC that
is already in progress.

Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
Assisted-by: Grok
PR-URL: https://github.com/nodejs/node/pull/67109
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-11-12 18:00:38 +01:00
Yagiz Nizipli 7e7d6cfbcd crypto: skip clearing empty OpenSSL error queues
ClearErrorOnReturn calls ERR_clear_error() when it is created and
again when it goes out of scope. That function resets all 16 slots of
the thread's error queue, including two free() calls per slot, even
when the queue is empty, which is almost always the case. Check for a
queued error first, which costs a fraction of that.

ClearErrorOnReturn guards most crypto operations, including every
CryptoJob, so this applies to all of them.

Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
Assisted-by: Grok
PR-URL: https://github.com/nodejs/node/pull/67109
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-11-12 18:00:38 +01:00
Joyee Cheung 00839e2d84 src: do not enable the inspector during snapshot building
V8 no longer allows attaching a debuger or setting a debug context ID
during snapshot building. Avoid enabling the inspector in this case,
and reject the inspector options when the user-land --build-snapshot
is used.

Refs: https://chromium-review.googlesource.com/c/v8/v8/+/8679045
Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67154
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-11-12 18:00:38 +01:00
Stefan Stojanovic 621b99d2e4 build,win: minify pgo training build
Signed-off-by: StefanStojanovic <stefan.stojanovic@janeasystems.com>
PR-URL: https://github.com/nodejs/node/pull/67214
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-11-12 18:00:38 +01:00
Roberto Bianchi 92bfe9ae4f url: use indexed appends in search params getAll
Use indexed writes when collecting matching parameter values.
This improves getAll throughput without changing result order.

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
PR-URL: https://github.com/nodejs/node/pull/66872
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-11-12 18:00:38 +01:00
Shelley Vohr 4c8cece947 build: sort the ICU source lists
configure.py lists the ICU source files in the order os.walk() returns
them, which depends on the file system. That order ends up in
icu_config.gypi and in the generated build files, so it differs between
machines.

Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67206
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-11-12 18:00:38 +01:00
Damiano Mazzella d69c446bd6 ffi: support function calls from pointers
Add getFunctionFromPointer() to create callables from native addresses
with explicit signatures.

Reuse function preparation without populating named symbol caches.
Keep the associated library alive and invalidate pointer callables
when it is closed.

Add coverage for conversions, vtables, permissions and garbage
collection, and document pointer lifetime requirements.

Assisted-by: GitHub Copilot
Signed-off-by: Damiano Mazzella <damianomazzella@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66458
Fixes: https://github.com/nodejs/node/issues/66272
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-11-12 18:00:38 +01:00
Yuya Inoue 139507aaf0 doc: document C++ formatting in the pull request guide
Document formatter setup and usage separately from make lint so
contributors can catch C/C++ formatting issues before CI runs.

Refs: https://github.com/nodejs/node/pull/66834#issuecomment-6583209249
Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67205
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2026-11-12 18:00:38 +01:00
Filip Skokan 43b8f56a57 v8: support X509Certificate serialization
v8.serialize() currently rejects X509Certificate objects. Add a host
object encoding containing the certificate's DER snapshot, including
its issuerCertificate chain, and reconstruct fresh X509Certificate
objects in v8.deserialize().

Read the stored snapshot rather than the cached raw Buffer, which can
be modified by callers. Decode each certificate independently without
imposing issuer relationships on the serialized sequence.

Assisted-by: Codex
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67083
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-12 18:00:38 +01:00
Kevin Gibbons b2347deb85 lib: place value before done in iterator results
Apply the iterator-result-value-first lint fixer.

Assisted-by: claude:opus-5.5
Signed-off-by: Kevin Gibbons <bakkot@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66837
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2026-11-12 18:00:37 +01:00
Kevin Gibbons f94f25db87 tools: require value before done in iterator results
V8 has a fast path for `{ value, done }` literals, but it must be that
order.
Also, the ES spec technically requires that order.

Assisted-by: claude:opus-5.5
Signed-off-by: Kevin Gibbons <bakkot@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66837
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2026-11-12 18:00:37 +01:00
Kevin Gibbons 1ab60fd1df benchmark: add URLSearchParams iterator consumers benchmark
Assisted-by: claude:opus-5.5
Signed-off-by: Kevin Gibbons <bakkot@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66837
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2026-11-12 18:00:37 +01:00
LiviaMedeiros de4fc5400d vfs: place value before done in iterator result
Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/67231
Refs: https://github.com/nodejs/node/pull/66837
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2026-11-12 18:00:37 +01:00
Antoine du Hamel 53828e73e6 Revert "benchmark: add URLSearchParams iterator consumers benchmark"
This reverts commit b2913b4b7e.

PR-URL: https://github.com/nodejs/node/pull/66837
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2026-11-12 18:00:37 +01:00
Rafael Gonzaga 97dfaed090 doc: describe how the permission model grants the entrypoint
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/67038
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-11-12 18:00:37 +01:00
Kevin Gibbons b4afb79d69 benchmark: add URLSearchParams iterator consumers benchmark
Assisted-by: claude:opus-5.5
Signed-off-by: Kevin Gibbons <bakkot@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66837
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2026-11-12 18:00:37 +01:00
dependabot[bot] 73b47ca18c tools: bump the eslint group in /tools/eslint with 2 updates
Bumps the eslint group in /tools/eslint with 2 updates: [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) and [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc).

Updates `@babel/core` from 8.0.7 to 8.0.9
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v8.0.9/packages/babel-core)

Updates `eslint-plugin-jsdoc` from 65.4.0 to 65.4.2
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v65.4.0...v65.4.2)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-version: 8.0.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: eslint-plugin-jsdoc
  dependency-version: 65.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/67189
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-11-12 18:00:37 +01:00
dependabot[bot] 487cfb3f37 meta: bump rtCamp/action-slack-notify from 2.4.0 to 2.4.1
Bumps [rtCamp/action-slack-notify](https://github.com/rtcamp/action-slack-notify) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/rtcamp/action-slack-notify/releases)
- [Commits](https://github.com/rtcamp/action-slack-notify/compare/33ca3be66c6f378fe1610fd1d5258632dbed5e58...06cc13f74fa8d4d2296c09455d91e9453e4025f4)

---
updated-dependencies:
- dependency-name: rtCamp/action-slack-notify
  dependency-version: 2.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/67190
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-11-12 18:00:37 +01:00
dependabot[bot] afc2418140 meta: bump step-security/harden-runner from 2.21.1 to 2.22.3
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.21.1 to 2.22.3.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/e14015d583714f6e62063499dc959a02595150a1...46b06cea07f9e64621fdf066ba77ac6915163d43)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.22.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/67191
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-11-12 18:00:24 +01:00
Geoffrey BoothandClaude Sonnet 5.5 65670b858d deps: load amaro from dist/internal.js
amaro 1.3.0 turned dist/index.js into a thin wrapper that requires
./internal.js, where the implementation now lives. Register and
require internal.js as the built-in instead of index.js, which would
otherwise fail to resolve its sibling.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
PR-URL: https://github.com/nodejs/node/pull/66144
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2026-11-12 17:45:34 +01:00
Node.js GitHub Bot 273d0fabbe deps: update amaro to 1.3.0
PR-URL: https://github.com/nodejs/node/pull/66144
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2026-11-12 17:45:33 +01:00
Trivikram Kamat 237fd0d169 ffi: make Fast API functions collectable
V8 strongly caches instantiations of low-serial FunctionTemplates,
which pinned Fast API functions and, through them, their
DynamicLibrary and trampoline. FunctionTemplate::New() has no opt-out,
so add an ObjectTemplate property to make these templates uncacheable,
then delete it from the new function.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: claude:opus-5.5
PR-URL: https://github.com/nodejs/node/pull/67177
Fixes: https://github.com/nodejs/node/issues/67176
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-12 17:45:33 +01:00
Node.js GitHub Bot 92441a0216 deps: update perfetto to 59.1
PR-URL: https://github.com/nodejs/node/pull/67171
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-11-12 17:45:33 +01:00
Node.js GitHub Bot e491c695e1 deps: update simdjson to 5.1.0
PR-URL: https://github.com/nodejs/node/pull/67172
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-11-12 17:45:33 +01:00
Trivikram Kamat 4f1597c4de ffi: define function pointer property as own data property
`CreateFunction` assigned `pointer` with `Object::Set`, which walks
`Function.prototype`. A non-writable inherited `pointer` turned the
store into a silent no-op, so the function reported the inherited
value instead of its native address. Use `CreateDataProperty`.

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/67170
Fixes: https://github.com/nodejs/node/issues/67169
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-11-12 17:45:33 +01:00
Seongeun Lee 60649e5300 typings: fix internal type resolution
Treat builtin JavaScript files as modules to avoid script-scope
collisions with standard library declarations. Explicitly provide the
existing internalBinding type so binding inference is preserved.

Define the ICU Buffer alias using the existing Uint8Array convention.

Assisted-by: Codex
Signed-off-by: leah-1ee <selee3196@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66512
Refs: https://github.com/nodejs/node/pull/49742
Refs: https://github.com/nodejs/node/pull/59176
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-11-12 17:45:33 +01:00
Trivikram Kamat e4e5d1c5cb vfs: forward the watchFile listener through RealFSProvider
fs.watchFile() on a path served by a real-directory mount dispatches
to RealFSProvider.watchFile(), which ignored the supplied listener and
registered an empty function instead. The user callback never fired
after the file changed, and fs.unwatchFile(path, listener) could not
match the anonymous stub, so the stat watcher's poll timer stayed
registered and kept the process alive.

Accept the listener and pass it through to fs.watchFile() so the
callback fires on change and unwatchFile() removes it by identity.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: opencode
PR-URL: https://github.com/nodejs/node/pull/66224
Fixes: https://github.com/nodejs/node/issues/66223
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-12 17:45:33 +01:00
gegham1 b92e0f6669 test: fix cluster dgram 1 test on macos
Send to localhostIPv4 instead of 0.0.0.0.
Add strict null equality assert on socket send callback error
for failing fast in such cases.

Fixes: https://github.com/nodejs/node/issues/60050
Signed-off-by: gegham1 <geghamayvazyan9@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66986
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-12 17:45:32 +01:00
Yuya Inoue e099865024 doc: add LIEF to the dependency list
Refs: https://github.com/nodejs/node/issues/67164

Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67165
Refs: https://github.com/nodejs/node/issues/67164
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-12 17:45:32 +01:00
Antonio Duran 64d75bc661 test: convert forEach to for of test-buffer-inheritance file
Signed-off-by: Antonio Duran <ing.antonio.duran@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67121
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-12 17:45:32 +01:00
Sergio Calderon 41e8612056 test: replace for each with for of
Signed-off-by: Sergio Calderon <sergioo.calderonn@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67122
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-12 17:45:32 +01:00
Antonio Duran 9f214f5f58 test: use spawnSyncAndAssert in nested async stack overflow test
Signed-off-by: Antonio Duran <ing.antonio.duran@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67123
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-12 17:45:32 +01:00
Jan Peer Stöcklmair 59d390fba6 test: convert .forEach to for...of
Signed-off-by: JPeer264 <jan.peer@sentry.io>
PR-URL: https://github.com/nodejs/node/pull/67124
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-12 17:45:32 +01:00
Emmanuel Florencio Trujillo 16d1cfd187 test: convert .forEach to for...of in test-net-write-arguments.js
Signed-off-by: EmmanuelFlorencioT <emmanuel.florencio.dev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67125
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-12 17:45:32 +01:00
Raymundo Lopez Santiago d08d94384f test: convert for each to for of in test/parallel/test-net-server-close
Signed-off-by: 11rls11 <raymundo.lopzantiago@outlook.com>
PR-URL: https://github.com/nodejs/node/pull/67127
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-12 17:45:32 +01:00
Raul Garcia 8bd2acdf53 test: use for...of in test-require-resolve-invalid-paths
Signed-off-by: Raul Garcia <rraulg5@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67128
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-12 17:45:32 +01:00
dependabot[bot] 82addc3612 meta: bump cachix/install-nix-action from 31.11.1 to 31.11.3
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.11.1 to 31.11.3.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](https://github.com/cachix/install-nix-action/compare/13d8dd58da0234aa297dedd986986ccb8e7f3e24...75c75c31ebece974e48ebc36b4ad125bd97bd97b)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-version: 31.11.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/67019
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-11-12 17:45:31 +01:00
Gürgün Dayıoğlu fc80c6c1c8 module: avoid reparsing package.json in esm format detection
Determining the format of a `.js` or `.ts` module called
`getPackageScopeConfig()`, which spread the deserialized package
configuration and thereby invoked its lazy `exports` and `imports`
getters. Every resolved module parsed those maps again, so load time
and memory grew with the number of modules in a package times the
size of its `exports` map.

Use `getPackageType()` for format detection and only look up the
package.json path when warning about a typeless package. Stop
spreading the configuration in `getPackageScopeConfig()` so that the
maps are parsed only when accessed.

Fixes: https://github.com/nodejs/node/issues/66485
Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day>
PR-URL: https://github.com/nodejs/node/pull/66982
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-12 17:45:31 +01:00
Dustin 47de18cc61 quic: retain readers for readable streams
Create readers when readable QuicStream instances are constructed so
data received before the first async iterator pull survives native
stream cleanup. Add a regression test for a peer-initiated
unidirectional stream that sends data and FIN before the reader is
pulled.

Assisted-by: Codex
Signed-off-by: GiHoon1123 <rlaejrqo465@naver.com>
PR-URL: https://github.com/nodejs/node/pull/66407
Fixes: https://github.com/nodejs/node/issues/66347
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-12 17:45:31 +01:00
Matteo Collina a330e6f66c stream: reject writes during WritableStream close
WritableStreamDefaultControllerProcessClose clears the controller
algorithms while the stream is still 'writable', before the sink close
settles. A write in that window, such as writer.write() after
writer.close() while the sink's close() or a TransformStream's flush()
is pending, reached the cleared size algorithm and failed an internal
assertion instead of being rejected as closing. Accept that state in
writableStreamDefaultControllerGetChunkSize so the write is rejected
with a TypeError, as it is once the stream has closed.

Refs: https://github.com/nodejs/node/issues/57272
Refs: https://github.com/whatwg/streams/issues/1341
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/67058
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-11-12 17:45:31 +01:00
Matteo Collina c9dc9dcb45 stream: keep async context of fromWeb writes
Writable.fromWeb() and Duplex.fromWeb() dispatch writes to the
WritableStream directly and complete them through a shared write
tracker. A write issued before the WritableStream had started was
queued and processed from its start step, so the sink ran in the async
context of the code that created the WritableStream, and the tracker
invoked the Node.js write callback synchronously from whatever context
completed the sink write, so the writes and final() it released ran
there too. The promise-based adapter waited for writer.ready and
received the result through a reaction, both in the context of the
Node.js write.

Dispatch writes issued before the start from a writer.ready reaction,
failing them if the stream was closed or errored meanwhile, and deliver
the write callback in the context of the Node.js write, from a reaction
when it completes in another context.

Refs: https://github.com/nodejs/node/issues/66906
Refs: https://github.com/nodejs/node/pull/65548
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/67055
Refs: https://github.com/nodejs/node/pull/67052
Refs: https://github.com/nodejs/node/pull/67054
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-11-12 17:45:31 +01:00
Trivikram Kamat 6f3282bf2f benchmark: merge crc32c into crc32 zlib benchmark
Signed-off-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/67004
Refs: https://github.com/nodejs/node/pull/66828
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-11-12 17:45:31 +01:00
Abdirahim Musse b0e7aef4db doc: ffi rename OS/400 -> IBM i
Signed-off-by: Abdirahim Musse <33973272+abmusse@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/67144
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-11-12 17:45:31 +01:00
Robert Nagy ba50acec27 buffer: limit UTF-8 fast calls to safe one-byte strings
Replace the allocating UTF-8 fast call with a fast binding for
sequential one-byte strings. Its slow fallback only returns a Smi
sentinel. JavaScript sends rejected strings to a separate regular
binding that can flatten strings and handle lazy deoptimization.

Both native callbacks used by the fast API avoid JS-heap allocation.
Add GC regression and string-representation coverage, including
optimized fast acceptance and rejection checks.

Fixes: https://github.com/nodejs/node/issues/66870
Refs: https://github.com/nodejs/node/pull/67134
Assisted-by: Codex
Signed-off-by: Robert Nagy <ronagy@icloud.com>
PR-URL: https://github.com/nodejs/node/pull/67136
Refs: https://github.com/nodejs/node/issues/66870
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-11-12 17:45:31 +01:00
Chengzhong Wu ae36323cf8 node-api: fix crash on TSFN finalization reentrance at shutdown
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/65967
Fixes: https://github.com/nodejs/node/issues/65100
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
2026-11-12 17:45:30 +01:00
Ulises Gascón a43f9a1f8d doc: remove CI lockdown steps from security releases
The CI is no longer locked down for security releases. The pre-release
paragraph describing the lockdown procedure was already dropped from
releases.md in nodejs/node#64198, but the release day steps and two
inline notes still told stewards and releasers to wait for it.

Remove the remaining references:

  * Drop 'Lock down the CI' and 'Unlock the CI' from the release day
    checklist in security-release-process.md and renumber the steps.
  * Drop the note in releases.md telling releasers not to run CI on
    nodejs-private pull requests until the lockdown.
  * Drop the security release details block under the CI step that
    deferred to the lockdown coordinated with the Build Working Group.

Refs: https://github.com/nodejs/node/pull/64198
Signed-off-by: Ulises Gascon <ulisesgascongonzalez@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67116
Refs: https://github.com/nodejs/build/pull/4355
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-11-12 17:45:30 +01:00
Yuya Inoue 19957e3521 http2: release queued data memory on stream cancellation
Release the memory charged for queued outbound data when a stream is
canceled, so subsequent requests can reuse the session's memory budget.

Refs: https://github.com/nodejs/node/issues/66739
Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67113
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-12 17:45:30 +01:00
Christian Aurich Zanettini Martins 43b993d4f9 test: deflake test-worker-message-port-transfer-filehandle-fd0
The child closed stdin and expected the next open() to return fd 0,
but another thread can open a descriptor in between and take it.

Pass the file to the child as stdin and wrap fd 0 in a FileHandle, so
it is open from the start. After the transfer is discarded, accept an
fd 0 that was reused for another file.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66980
Refs: https://github.com/nodejs/reliability/issues/1701
Refs: https://github.com/nodejs/node/pull/66750
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-11-12 17:45:30 +01:00
Joyee Cheung 546277a806 doc: clarify that V8 major upgrade uses stable release
Along with Chrome, V8 has several different release channels. A
V8 release only reaches stable after the stable cut has been rolled
out and tested in several Chrome release channels, where regressions
and bugs are discovered and fixed.

This patch clarifies that we follow the _stable release_ of main
branch to reduce the amount of churn needed. The V8 stable releases
are already battle tested in Chrome and generally contain fewer
regressions/bugs that would require another refresh to address.

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67106
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-11-12 17:45:30 +01:00
Trivikram Kamat a613c18f06 ffi: keep DynamicLibrary alive while callbacks are registered
Callback pointers returned by registerCallback() are plain bigint
addresses, so they do not keep the owning DynamicLibrary reachable.
If user code dropped the library without calling close(), the next GC
ran ~DynamicLibrary(), which freed every ffi_closure. Native code still
holding a callback pointer then jumped into freed trampoline memory and
crashed the process, even though close() was never called.

Hold the owning library through a BaseObjectPtr in each FFICallback,
so it stays strong until its last callback is unregistered or the
library is closed. Callbacks released with unrefCallback() still count,
because their trampolines remain live native memory. Since this forms a
cycle, release the callbacks from an Environment cleanup hook so the
library is still freed at teardown.

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/66842
Fixes: https://github.com/nodejs/node/issues/66841
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-11-12 17:45:30 +01:00