Commit Graph
49141 Commits
Author SHA1 Message Date
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
Efe Karasakal 4b9a0b7bb2 quic: fix crypto error classification
Signed-off-by: Efe Karasakal <hi@efe.dev>
PR-URL: https://github.com/nodejs/node/pull/66968
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-12 17:45:30 +01:00
Efe Karasakal 27e67c9be7 quic: fix internal error code conversion
Signed-off-by: Efe Karasakal <hi@efe.dev>
PR-URL: https://github.com/nodejs/node/pull/66967
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-12 17:45:30 +01:00
Livia Medeiros 9c7b282076 test: remove duplicate common imports
Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/67088
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-11-12 17:45:30 +01:00
Christian Aurich Zanettini Martins 45d622c014 test: add test for concurrent first use of OpenSSL
OpenSSL 3 builds its table of algorithm names on first use. When
43d3fe9558 moved that first use after other threads had started, an
RSA-PSS key decoded while the table was being built could fail with
`ERR_OSSL_EVP_DECODE_ERROR`, and every later RSA-PSS decode in the
process failed too. #66903 reverted that change.

The new test fails if it comes back: Workers decode an RSA-PSS
certificate while the root certificate loader or a thread pool crypto
job uses OpenSSL for the first time. It is based on a reproduction by
Filip Skokan in #66903.

Refs: https://github.com/nodejs/node/pull/66903
Refs: https://github.com/nodejs/node/pull/66935
Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66966
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-11-12 17:45:29 +01:00
Trivikram Kamat e4879ef5fe ffi: reject arguments after callback in registerCallback
Passing the signature after the callback silently created a `void ()`
callback, so native callers got no arguments forwarded and an
undefined return value.

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/66997
Fixes: https://github.com/nodejs/node/issues/66996
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-11-12 17:45:29 +01:00
Trivikram Kamat c9dddad6df ffi: accept -0 for int32 and uint32 arguments
ToFFIArgument validated int32/uint32 with IsInt32()/IsUint32(), which
reject -0, while every other integer width and the Fast API and
SharedBuffer paths accept it. Use the same validators as the 8- and
16-bit branches so behavior no longer depends on the JIT tier.

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/67035
Fixes: https://github.com/nodejs/node/issues/67033
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-11-12 17:45:29 +01:00
Livia Medeiros 1d2be62b5e util: use internal hexSlice directly in util.inspect()
Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/66974
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2026-11-12 17:45:29 +01:00
Antoine du Hamel d919a87cdc tools: remove node.gyp and node.gypi from v8.nix requisites
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66955
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-11-12 17:45:29 +01:00
Ulises Gascón 03d24b0f4d tls: test the SPKI blocklist with a fixture key
Replace the test-only hooks on the crypto binding, and the process-wide
list and mutex they required on every handshake, with a fixture CA
whose public key is a permanent entry on the compiled-in blocklist. The
test now exercises the real list through full handshakes, without
--expose-internals, and the production path is a comparison against a
constant array.

The new fixtures provide two chains that contain the blocked key: a
server certificate issued by blocked-ca, and one issued by ca1 that
reuses the blocked key itself. The private key is checked in like every
other fixture key, so blocking it costs nothing. It is pinned in the
fixtures Makefile, since its digest is compiled in.

Refs: https://github.com/nodejs/node/pull/66871#discussion_r4325672378
Assisted-by: Claude, Codex
Signed-off-by: Ulises Gascon <ulisesgascongonzalez@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66949
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-12 17:45:29 +01:00
Filip Skokan 4a92e8a862 crypto: reject immutable random fill buffers
Prevent randomFillSync(), randomFill(), and getRandomValues() from
modifying immutable ArrayBuffers or their views.

Refs: https://github.com/nodejs/node/issues/66346
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66944
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-11-12 17:45:29 +01:00
David Babenko-Sanders 4d73c14454 build: fix overriding node_path in GN build
Signed-off-by: David Babenko-Sanders <dsanders11@ucsbalum.com>
PR-URL: https://github.com/nodejs/node/pull/66805
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
2026-11-12 17:45:29 +01:00
Geoffrey Booth 75ad54c48b test: use registerHooks() over module.register()
Port the tests that registered async module customization hooks, via
`--loader`, `--experimental-loader` or `module.register()`, only as a
means of exercising other features to use `module.registerHooks()`
instead. This keeps the coverage for those features independent of the
async module customization hooks, which are being removed.

Tests that exist only to exercise the async module customization hooks
themselves are left as they are.

Assisted-by: Claude
Signed-off-by: Geoffrey Booth <webadmin@geoffreybooth.com>
PR-URL: https://github.com/nodejs/node/pull/67074
Refs: https://github.com/nodejs/node/pull/62395
Refs: https://github.com/nodejs/node/pull/62401
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-12 17:45:29 +01:00
Christian Aurich Zanettini Martins 19cae95c1e fs: fix readFileSync utf8 overflow on short reads
`ReadFileUtf8()` appends reads shorter than 8 KiB to a string and only
moves to a heap buffer at the first full 8 KiB read. That buffer always
started at 64 KiB, but a pipe can deliver more than that in short reads
first, so copying the string into it overflowed the heap. With
`big_len` past `big_cap`, the next read size also underflowed.

Size the heap buffer to at least what was already read. When that is
more than 64 KiB, the buffer is full and the existing growth step
enlarges it before the next read.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66939
Fixes: https://github.com/nodejs/node/issues/66341
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-11-12 17:45:28 +01:00
Rafael Gonzaga c89f5391f7 doc: note linear history rule on branch-off
Pushing new `vN.x` and `vN.x-staging` branches to the repository is
rejected by the "Require linear history" ruleset, because branch
creation evaluates the whole history and `main` still contains merge
commits from 2015. Document that a repository admin must disable the
rule, push the branches, and enable it again, as done for v26.x and
v27.x.

Refs: https://github.com/nodejs/Release/issues/1187
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/67057
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-11-12 17:45:28 +01:00