Commit Graph
47997 Commits
Author SHA1 Message Date
Yagiz Nizipli cc57cb7588 test: add Headers coverage and benchmark
Add WHATWG Headers unit tests and a fetch/headers benchmark so Node
can track the API after the implementation change lands in undici.

Refs: https://github.com/nodejs/undici/pull/5699
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/65365
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-08-22 21:02:18 +00:00
Sumit Kumar Das 3ff8c2dbde esm: avoid super-linear data URL MIME regex
The MIME regex used for data: URLs could backtrack super-linearly on a
malformed URL lacking a ',' separator. Make the optional parameter
group anchored on ';' so it cannot overlap with the media-type group.

Adds a benchmark (esm/get-data-protocol-format) parameterized over
path length, so a backtracking regression shows up as an ops/sec
cliff instead of a wall-clock assertion in a test, per review.

Fixes: https://github.com/nodejs/node/issues/61904
Signed-off-by: skdas20 <skdas5405@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/61951
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-22 20:37:46 +00:00
mag123c 2858f34652 test_runner: print coverage and diagnostic info with dot reporter
When using the dot reporter with coverage enabled, coverage threshold
failures and coverage reports were not printed, only an exit code was
returned. This made it impossible to know why the test run failed.

This change adds handling for test:diagnostic and test:coverage events
to the dot reporter, matching the behavior of the spec reporter.

Fixes: https://github.com/nodejs/node/issues/60884
Signed-off-by: mag123c <diehreo@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/61423
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-22 12:09:19 -07:00
Yagiz Nizipli 4b3bba58dd url: speed up URLSearchParams
Parse query strings with indexOf instead of a per-character state
machine, skip ToString when values are already strings, cache
toString() until the list mutates, and join serialized pairs.

Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
Assisted-by: Cursor
PR-URL: https://github.com/nodejs/node/pull/65363
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-22 18:48:28 +00:00
Jerry Zhao 7d69ed11f7 fs: pass symlink type in cp when filter is provided
When `fs.cp`/`fs.cpSync` is called with both `verbatimSymlinks: true`
and a `filter` function, directory symlinks were incorrectly created
as file symlinks on Windows.

Without a `filter`, cp takes the C++ fast path (`cpSyncCopyDir`) which
uses `std::filesystem::copy_symlink()` and preserves the symlink type
automatically. With a `filter`, the JS fallback calls `symlinkSync`/
`symlink` without a `type` argument. On Windows, that causes the type
to be auto-detected by stat-ing the resolved target at the destination,
but during a recursive copy the target directory may not exist yet at
the destination (e.g. `linked/` is copied before `packages/` in
alphabetical order). The stat fails and `type` falls back to `'file'`,
producing a file symlink in place of a directory symlink.

Detect the symlink type from the source (which always exists) via
`internalModuleStat(src)` and pass it explicitly to the `symlinkSync`/
`symlink` call sites. `onLink` already computed `srcIsDir` for
subdirectory validation; hoist that computation above the early-return
paths and thread the derived `symlinkType` through `copyLink` as well.
Both the sync (`cp-sync.js`) and async (`cp.js`) implementations are
fixed.

Add two regression tests that copy a tree containing a relative
directory symlink with `verbatimSymlinks: true` and a `filter`
function, then assert the destination link still resolves as a
directory.

Fixes: https://github.com/nodejs/node/issues/62653
Signed-off-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/62654
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-22 17:44:37 +00:00
Samuel Attard c01e3b3031 fs: allocate FSReqPromise stat arrays lazily
Every promise-based fs operation eagerly allocated two AliasedBuffers
(a stats array and a statfs array) at request creation, although only
stat-family resolutions ever read the first and only statfs() reads
the second. Each allocation is an ArrayBuffer, a TypedArray and a
strong v8::Global. The callback path has no equivalent cost since it
resolves through a shared global array.

Construct the arrays lazily in ResolveStat()/ResolveStatFs() instead.
Once created the lifetime is unchanged, so deferred continuations
still read from request-owned memory.

Improves fs/promises throughput under concurrency: writeFile +53%,
stat +26%, readFile +22% at 64 in-flight operations on tmpfs, with
callback paths unchanged.

Signed-off-by: Sam Attard <sattard@anthropic.com>
PR-URL: https://github.com/nodejs/node/pull/63886
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2026-08-22 17:44:25 +00:00
nashit hayat 70c189bd9d src: fix out-of-bounds write when transcoding odd-length ucs2
Signed-off-by: Nashit-h <nashit@bugqore.com>
PR-URL: https://github.com/nodejs/node/pull/64512
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-08-22 17:44:15 +00:00
GetThatCookie 467c0431d7 http: cache maxHeaderPairs per header section
Signed-off-by: GetThatCookie <NimmenKeks@gmx.de>
PR-URL: https://github.com/nodejs/node/pull/64988
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-08-22 17:44:04 +00:00
Luan Muniz 82a710203e benchmark: add test-only and mock timers cases
The only benchmark covers creating selected and non-selected
tests when running with --test-only.

The mock timers benchmark covers enabling timer mocks, setTimeout,
setInterval, setImmediate, scheduler.wait, AbortSignal.timeout,
mocked Date.now(), setTime(), and runAll().

Refs: https://github.com/nodejs/node/issues/55723
Signed-off-by: Luan Muniz <luan@luanmuniz.com.br>
PR-URL: https://github.com/nodejs/node/pull/64097
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-22 17:18:16 +00:00
Richard Lau 626f42d437 build: target Power 9 and z14
Set compiler flags to match the minimum supported Power and z
architectures.

Signed-off-by: Richard Lau <richard.lau@ibm.com>
PR-URL: https://github.com/nodejs/node/pull/65439
Refs: https://github.com/nodejs/node/pull/61005
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/7239348
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-08-22 17:18:06 +00:00
Shelley Vohr e38eede0e5 lib: load fewer builtins when bootstrapping without a snapshot
Contexts that are not deserialized from the built-in snapshot -- worker
threads, and the main context of embedders that create their own
isolate or of `node --no-node-snapshot` -- compile (with the code cache
at best) every builtin the bootstrap touches, so each eagerly required
builtin is startup time (~0.15-0.4 ms apiece). A number of them are only
required eagerly so that they end up in the snapshot, or for features
the bootstrap path never uses.

Load lazily what those paths do not need:

- is_main_thread.js: preload util, url, the ESM loader (translators,
  resolver, module_job/map, source maps, node:module, vm modules, mime,
  data_url, the TypeScript stripper), internal/blob and
  internal/dns/utils only while building a snapshot; they load on first
  use otherwise.
- fs: internal/blob (+ internal/encoding and its tables) is only used
  by fs.openAsBlob().
- internal/url: internal/data_url (+ internal/mime) is only used by the
  Buffer-returning file URL helpers.
- internal/process/execution, the CommonJS loader, esm/translators and
  esm/load: the TypeScript stripper and data: URL helpers are only
  needed for TypeScript sources / data: URLs.
- pre_execution: internal/dns/utils (+ internal/net) is only needed up
  front to validate an explicit --dns-result-order or to register the
  resolver's snapshot serializer; the default order becomes the
  variable's initializer.
- internal/worker: event_loop_utilization and error_serdes are only
  needed once a sub-worker's ELU is read or it reports an error.
- worker_threads: `locks` is defined lazily, like util's lazy exports.

Main-thread startup with the snapshot is unchanged (the same modules
are preloaded into it; the bootstrap-modules test lists are adjusted).
A bare worker compiles 95 -> 83 builtins (cold start -5%); without the
snapshot an empty CommonJS entry point compiles 76 -> 59 builtins and an
empty ES module entry point 76 -> 69.

Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65329
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-22 17:07:39 +00:00
Filip Skokan f411275331 tools: improve commit queue failure comment
Commit Queue failure comments hid the actionable reason inside the
collapsed landing transcript.

Surface the reason and retry instructions before the full output. Add
specific guidance for a missing multi-commit policy and explicit reasons
for push and squash-merge failures.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65433
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-08-22 14:24:44 +00:00
이혜미 f4bcf756f6 doc: remove outdated WASI version fallback
Signed-off-by: hyemimi <hyemi7375@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65303
Refs: https://github.com/nodejs/node/pull/47391
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2026-08-22 11:59:46 +00:00
Filip Skokan 30fe871703 crypto: use available BoringSSL APIs
Use BoringSSL's current RSA and DH validation results instead of
maintaining backend-specific prechecks and collapsing key errors.

Report negotiated TLS groups and the documented zero security level
through BoringSSL's compatibility APIs.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65423
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-08-22 10:51:51 +00:00
Filip Skokan 148b6cd5ee crypto: remove obsolete BoringSSL shims
BoringSSL implements OPENSSL_zalloc and BN_secure_new and provides
compatible secure heap status stubs. Use the common code paths.

Remove ClientHello helpers left unused by the early callback migration
and require the fixed ML-KEM private-key import error.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65423
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-08-22 10:51:50 +00:00
Filip Skokan e573bd6b12 crypto: enable SIV and GCM-SIV modes in Cipher/Decipher APIs
Closes #63393

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63411
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-22 08:24:09 +00:00
Trivikram Kamat bd25af32cc ffi: prefer canonical type names
Document long type names as canonical and use them in examples.
Group alternative spellings separately in the documentation and
internal type maps while retaining support for every existing alias.

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/65417
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-08-22 07:28:28 +00:00
Richard Gibson a48e33fb6f util: fix formatting of functions returned from getters
Fixes: https://github.com/nodejs/node/issues/64838
Signed-off-by: Richard Gibson <richard.gibson@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64839
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-22 05:07:59 +00:00
Donghoon Kang 1db6cda84b doc: fix broken GYP link in n-api.md
Replace the unavailable GYP website with the GYP documentation
preserved in the Chromium source repository.

Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/65413
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-08-22 03:49:24 +00:00
sangwook 280c85c1d2 test: deflake test-net-listen-ipv6only
The test verified ipv6Only by connecting to the IPv4 side of an
ephemeral port and expecting ECONNREFUSED, but it never reserved that
IPv4 port. Under parallel execution another test could occupy it,
making the connection succeed instead of being refused.

Run the test sequentially with a fixed common.PORT so it no longer
competes with other tests for the same port, matching the fix already
applied to the sibling cluster variants.

Fixes: https://github.com/nodejs/node/issues/64172
Signed-off-by: sangwook <rewq5991@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64173
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-08-22 02:46:41 +00:00
Shivay-98 6586288a41 net: handle undefined parent in _unrefTimer and _destroy
The fix and approach are from #64491 by Shivay-98; this reopens it to
get it landed, since the original stalled awaiting requested changes.

`Socket.prototype._unrefTimer` and `Socket.prototype._destroy` both walk
the `_parent` chain with a strict `!== null` check. During connection
teardown a socket's `_parent` can be left `undefined` (for example a TLS
socket layered over another stream), so the loop steps onto `undefined`
and reads a property off it, throwing a TypeError:

    Cannot read properties of undefined (reading 'Symbol(timeout)')

from an uncaught I/O callback and crashing the process.

Using a nullish (`!= null`) check terminates the walk on both `null` and
`undefined`.

[petter@hightouch.io: apply the same fix to the identical loop in
`_destroy`, which the original regression test already exercised via
`destroy()`; add direct unit coverage for both paths.]

Fixes: https://github.com/nodejs/node/issues/64490
Refs: https://github.com/nodejs/node/pull/64491

Signed-off-by: Petter Häggholm <petter@hightouch.io>
PR-URL: https://github.com/nodejs/node/pull/64644
Fixes: https://github.com/nodejs/node/issues/64490
Refs: https://github.com/nodejs/node/pull/64491
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-08-21 19:33:38 -07:00
Sylvester Keil 34db39b963 test_runner: use run options with isolation="none"
When using run() programatically with isolation="none",
testNamePatterns, testSkipPattersn, and only were ignored.
This combination of options only worked when set via CLI flags,
because parseCommandLine() is still used to seed globalOptions.

Fixes: https://github.com/nodejs/node/issues/57399
Signed-off-by: Sylvester Keil <sylvester@keil.or.at>
PR-URL: https://github.com/nodejs/node/pull/62269
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2026-08-21 18:47:46 -07:00
Trevor Burnham 5fc9f1f2ff sqlite: reject reentry while binding parameters
c4b755ee00 tracks the statements currently being stepped and rejects
reentry into them, but the guard is established inside the execution
helpers, after the entry point has already reset the statement and
bound its parameters. Binding reads properties off the supplied
object, so a named-parameter getter runs JavaScript in that window.
Reentering the same statement there resets it a second time and, for
iterate(), hands out a second iterator; both iterators record the
same reset generation, so neither is invalidated and they interleave
rows from one virtual machine.

Establish the guard at the four StatementSync entry points instead,
before the reset, so it spans binding as well as stepping. The
existing guards inside the helpers are left in place; the stepping
set is a stack, so the nested acquisition is balanced.

Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
Assisted-by: claude:opus-5
PR-URL: https://github.com/nodejs/node/pull/65294
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-21 22:54:43 +00:00
Shelley Vohr adad4d650d module: do not split a portable compile cache by uid
A portable compile cache is meant to be reused wherever the same module
layout is found, which includes being generated once (at build time,
say) and shipped read-only with an application for whoever runs it. On
platforms with uids the cache subdirectory is suffixed with the uid of
the user who created it, so such a cache is only ever found by that one
user. Omit the suffix in portable mode: a user who cannot write to the
directory still reads it, and a failed write is only a cache miss.

Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65293
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-21 21:53:19 +00:00
Maruthan G 9d94b6548a test_runner: mock dual-package with conditional exports
When `mock.module()` targets a package whose `exports` field maps
`import` and `require` to different files, the ESM resolver and the
CJS resolver disagree on the resolved path. Only the ESM path was
registered in `mockMap`, so `require()` of the mocked specifier
bypassed the mock and loaded the real CJS module.

Resolve the specifier through `Module._resolveFilename` from the
caller's directory in addition to the existing ESM resolution. When
the two paths differ, register the CJS path as a second key in
`mockMap` and invalidate `Module._cache[cjsPath]`, restoring it on
`restore()`. Single-resolution packages keep their existing behavior.

Fixes: https://github.com/nodejs/node/issues/58231
Signed-off-by: Maruthan G <maruthang4@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62943
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
2026-08-21 13:09:19 -07:00
Paul Bouchon 838a3e9051 test_runner: restore directory search for --test
Passing a directory to `node --test` (e.g. `node --test tests`) matched
the directory itself as a glob pattern and then tried to run it as a
test file, failing with MODULE_NOT_FOUND. Before glob patterns were
supported, a directory argument was searched for test files within it.

Expand a pattern that resolves to a directory into a search for the
default test files inside it. Despite the report framing this as
Windows-only, it reproduces on every platform: it is a plain
regression from when directory arguments stopped being searched.

Fixes: https://github.com/nodejs/node/issues/64555
Signed-off-by: Paul Bouchon <mail@bitpshr.net>
PR-URL: https://github.com/nodejs/node/pull/64637
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-08-21 13:03:46 -07:00
John Kleinschmidt e65df3b3e5 doc: reserve NMV 150 for Electron 45
Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org>
PR-URL: https://github.com/nodejs/node/pull/65405
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-08-21 18:16:48 +00:00
Joyee Cheung 15940ef908 build,src: make --use-largepages a no-op
This feature has not been actively used in the wild and has
always only been best-effort on systems that support it. The build
changes it needs breaks WSL1 compatibility and the relocation
mechanism won't work with newer V8 that remaps builtins using
mremap(MREMAP_DONTUNMAP).

This patch effectively removes this feature by turning the flags
into no-ops. A warning will be printed if `--use-largepages=on`
is used.

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65389
Fixes: https://github.com/nodejs/node/issues/63735
Fixes: https://github.com/nodejs/node/issues/64408
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/7985687
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-21 19:29:17 +02:00
Mert Can Altin 610fcd8341 src: use simdutf for two-byte utf8 conversion
Signed-off-by: Mert Can Altin <mertgold60@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62248
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-08-21 17:06:02 +00:00
Orgad ShanehandClaude Opus 5 a0c366c58c doc: document that an empty OPENSSL_CONF skips config loading
A default OpenSSL configuration file that exists but cannot be read is
fatal at startup: CONF_MFLAGS_IGNORE_MISSING_FILE only covers ENOENT
and ENOTDIR, so a container that mounts /etc/ssl inaccessible to the
user Node.js runs as cannot start at all.

OpenSSL skips config loading entirely when OPENSSL_CONF is set to an
empty value, which gets past this, but that was undocumented. Say so,
including that no configuration is applied, FIPS setup included.

Refs: https://github.com/nodejs/node/issues/62230
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Orgad Shaneh <orgad.shaneh@audiocodes.com>
PR-URL: https://github.com/nodejs/node/pull/64949
Fixes: https://github.com/nodejs/node/issues/62230
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-08-21 17:05:31 +00:00
Antoine du Hamel ce1e0d59e5 tools: improve nix-changes coverage
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65403
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-08-21 17:05:15 +00:00
Antoine du Hamel 71ac33e63d tools: refactor shell.nix pkcs11 integration to its own section
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65404
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-08-21 17:04:49 +00:00
Michaël Zasso 3bee1ae618 meta: move targos to emeritus
Signed-Off-By: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/65393
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-08-21 16:00:21 +00:00
soreavis 3618c954ac doc: fix broken TLS security level example
The example under "Setting security levels" does not run. The client
sets `maxVersion: 'TLSv1'` while its `minVersion` stays at the
`tls.DEFAULT_MIN_VERSION` default of `'TLSv1.2'`, so no version overlaps
and the connection fails with ERR_SSL_NO_PROTOCOLS_AVAILABLE. Setting
the client's `minVersion` is not enough on its own: the handshake then
fails with an alert 40, because `createServer` is given no key or
certificate and the server has no shared cipher.

Set `minVersion` on the client, add the key and certificate placeholders
and the openssl recipe that the other sections using them already carry,
pass the server certificate as the client's `ca`, and use port 8000 like
the rest of the file. The section now runs from an empty directory and
prints "Client connected with protocol: TLSv1".

Signed-off-by: Julian Soreavis <julian.soreavis@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65391
Fixes: https://github.com/nodejs/node/issues/60569
Refs: https://github.com/nodejs/node/pull/60571
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-21 15:01:49 +00:00
Antoine du Hamel b4fa29a6f1 tools: fix max body length handler in create-release-proposal.sh
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65455
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-08-21 15:01:39 +00:00
Trivikram Kamat 37e66c41a4 sqlite: remove unused column name helper
Remove the unused column name helper from StatementExecutionHelper.
It became unused after all() and get() switched to cached names.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/65401
Refs: https://github.com/nodejs/node/pull/65276
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2026-08-21 14:19:45 +00:00
Junsoo Ha f7968e73ee test: use common/child_process spawnSync helpers
Replace manual spawnSync() result assertions
with test/common/child_process helper functions.

Signed-off-by: Junsoo Ha <junsoo2018@naver.com>
PR-URL: https://github.com/nodejs/node/pull/65377
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-08-21 13:40:07 +00:00
Dayun c5d4ae6d36 doc: clarify socket destroyed behavior
Signed-off-by: Dayun <dlekdbs6530@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65395
Fixes: https://github.com/nodejs/node/issues/57367
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2026-08-21 13:39:55 +00:00
Olivier Flückiger 21f0f2786f src: remove --harmony-import-attributes
Import attributes have been enabled by default since V8 M123 and are now
standard in JavaScript. Remove the hardcoded injection of the flag in
Node.js so that the flag can be deprecated and removed upstream in V8.

Refs: https://chromium-review.googlesource.com/c/v8/v8/+/8260695
Signed-off-by: Olivier Flückiger <olivf@chromium.org>
PR-URL: https://github.com/nodejs/node/pull/65396
Refs: https://github.com/nodejs/node/pull/61898
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-08-21 07:48:38 +00:00
Donghoon Kang 11a9998549 doc: update outdated nodejs.org guide links
Update outdated `nodejs.org/en/docs/guides/...` links
to their current `nodejs.org/learn/...` destinations.

Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/65394
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-21 05:53:42 +00:00
Trivikram Kamat c2543d9301 sqlite: reject busy statement finalization in authorizer
An iterator can leave a statement active between sqlite3_step() calls.
Finalizing that statement from an authorizer callback can release its
locks and change the outcome of the statement being authorized.

Reject close() and Symbol.dispose when the statement is busy and the
connection is in an authorizer callback. Continue allowing idle
statements to be finalized.

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/65369
Fixes: https://github.com/nodejs/node/issues/65368
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-21 03:30:10 +00:00
구현우 9ea61828c7 test: fix Linux debug skip in SEA test guard
process.config.variables.is_debug is only populated by the GN build
flow (tools/generate_config_gypi.py), so on the gyp builds used by CI
the guard never fired and SEA tests ran on Linux debug builds against
the original intent. Switch to
process.config.target_defaults.default_configuration === 'Debug',
matching the pattern used in test/common/index.js.

Fixes: https://github.com/nodejs/node/issues/63749
Refs: https://github.com/nodejs/node/issues/61483
Signed-off-by: Hyunwoo Gu <realization0327@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63751
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-21 01:21:47 +00:00
Yagiz Nizipli a3620719bc build: use build-ci for benchmark merge-commit rebuild
The merge-commit job used `make -j4`, which skips configure. After
node.gyp or generated sources change, that can leave the comparison
binary unlinked against new files. `make build-ci` re-runs configure
first, matching the base-build step.

Assisted-by: Grok
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/65362
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-21 01:21:30 +00:00
Kirill Saied 9677349240 child_process: keep SIGWINCH from killing on Win
Fixes: https://github.com/nodejs/node/issues/64324
Signed-off-by: PickBas <sayed.kirill@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64510
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2026-08-21 00:50:15 +00:00
Lazizbek Ergashev da2d6178a6 dns: validate address type in lookupService
Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64878
Fixes: https://github.com/nodejs/node/issues/64877
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-08-21 00:50:05 +00:00
dependabot[bot] beeb1026c1 tools: bump brace-expansion in /tools/clang-format
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.13 to 1.1.18.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v1.1.13...v1.1.18)

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

PR-URL: https://github.com/nodejs/node/pull/64984
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-08-21 00:49:54 +00:00
Hierax_Umbra 94724212bf fs: fix out-of-bounds write in mkdtemp for long prefixes
Mkdtemp() allocated the template buffer as `length + strlen("XXXXXX")`,
leaving no room for the terminating NUL byte. For a single-byte prefix
long enough to force the heap allocation path (length + 6 > the
stack-buffer threshold), the terminating NUL was written one byte past
the end of the buffer -- a 1-byte heap-buffer-overflow flagged by
AddressSanitizer.

Allocate room for the terminating NUL, copy the suffix, and use
SetLengthAndZeroTerminate to set the correct length and write the
terminator, following the MaybeStackBuffer paradigm used elsewhere in
this file.

Signed-off-by: frandle331-yh <s1240100@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64770
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-08-20 23:56:28 +00:00
Nora Dossche 575abdf51c crypto: fix missing error checks on ASN1_STRING_to_UTF8()
This function returns a negative error code on error.
When it does so, the `value_str` pointer will remain uninitialized
and cause a crash later on when it is freed by OPENSSL_free().
Even if it wouldn't crash there, it still fails to signal the error
and an empty string may be propagated to the callers.
The check also mirrors the other one in the same file.

Signed-off-by: ndossche <nora.dossche@ugent.be>
PR-URL: https://github.com/nodejs/node/pull/65200
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2026-08-20 23:56:17 +00:00
Paul Bouchon c4cfa637d3 module: report unreadable package.json
A package.json that exists but cannot be read was treated the same as
one that is not there: the read failure returned no config and
resolution continued as if the package had none. Fields such as
"exports" and "type" silently disappear, so a specifier can resolve to
a different file than the package declares, while an unparsable
package.json already throws ERR_INVALID_PACKAGE_CONFIG.

Keep treating ENOENT and ENOTDIR as "no package config here", and
report any other read failure with the underlying error.

Fixes: https://github.com/nodejs/node/issues/65220
Signed-off-by: Paul Bouchon <mail@bitpshr.net>
PR-URL: https://github.com/nodejs/node/pull/65223
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-08-20 23:56:07 +00:00
Aviv Keller 0ce7b02d50 doc: remove synopsis
Signed-off-by: avivkeller <me@aviv.sh>
PR-URL: https://github.com/nodejs/node/pull/65246
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-20 23:55:56 +00:00