Commit Graph
47983 Commits
Author SHA1 Message Date
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
Node.js GitHub Bot c1aac81565 deps: update zlib to 1.3.2.1-motley-8002e91
PR-URL: https://github.com/nodejs/node/pull/65316
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-08-20 23:55:38 +00:00
Node.js GitHub Bot 323dbd8575 deps: update simdjson to 4.6.7
PR-URL: https://github.com/nodejs/node/pull/65318
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-08-20 23:55:28 +00:00
June b5d37cd41e lib: fix ERR_INVALID_ARG_TYPE with --enable-source-maps
Signed-off-by: June Kim <kimjune01@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63215
Fixes: https://github.com/nodejs/node/issues/63169
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-08-20 23:02:33 +00:00
James M Snell 9f0ce45fe4 src: fixup manual new/delete usages
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus
PR-URL: https://github.com/nodejs/node/pull/65348
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2026-08-20 13:03:25 -07:00
mag123c e2cb91d08a test_runner: add classname hierarchy for JUnit reporter
Signed-off-by: mag123c <diehreo@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/60220
Fixes: https://github.com/nodejs/node/issues/59417
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-20 19:16:07 +00:00
Antoine du Hamel 12eb296a31 tools: make env variables consistent in cron jobs
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65168
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-08-20 19:15:56 +00:00
Marten Richter 2bfc1e97ec quic: write desired size needs update on maxstream
Without this update the streams can stall, if the
chunks are close or bigger than the window size.

Signed-off-by: Marten Richter <marten.richter@freenet.de>
PR-URL: https://github.com/nodejs/node/pull/64768
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-20 11:51:41 -07:00
Shelley Vohr 5ba7e05551 build: add simdutf dir to include path in GN build
The GN build defaults `node_simdutf_path` to `//third_party/simdutf`,
the copy that ships in a Chromium checkout. That target doesn't put
its own directory on the include path, so the unqualified
`#include "simdutf.h"` in libnode, node_js2c and node_cctest doesn't
resolve unless the embedder adds the directory themselves.

Add `get_label_info(node_simdutf_path, "dir")` to `node_internal_config`
(used by libnode and node_cctest) and to node_js2c's `include_dirs`.

Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65382
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-20 14:19:31 +00:00
Stefan Stojanovic 58d58a47e3 build,win: add PGO workload scripts
Signed-off-by: StefanStojanovic <stefan.stojanovic@janeasystems.com>
PR-URL: https://github.com/nodejs/node/pull/63696
Refs: https://github.com/nodejs/node/issues/61964
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-08-20 13:18:01 +00:00
Shelley Vohr ea4b37fe59 src: run same-priority platform tasks in posting order
TaskQueue became a std::priority_queue when worker tasks started to
honor v8::TaskPriority. Its comparator returns false for entry types
without a priority member, and for entries of equal priority, on the
assumption that the heap then keeps insertion order. It does not: three
tasks pushed A, B, C pop as A, C, B, and larger batches come out in
heap order. That affects the per-isolate foreground task queue (tasks
of one priority no longer run in the order they were posted), the
foreground delayed task queue, and the delayed task scheduler of the
worker thread task runner, whose local queue is drained in one batch:
when v8 posts a delayed worker task shortly before the platform shuts
down, the StopTask pushed by Stop() can run before a ScheduleTask that
was pushed earlier, that ScheduleTask then starts a timer on the
scheduler's loop after all timers were supposed to be stopped, and
Shutdown() blocks in uv_thread_join() until the delay (e.g. the 8 s of
the memory reducer) expires.

Give every queued item a sequence number and use it as the tie
breaker, so that tasks of equal priority, and tasks without one, come
out in FIFO order again; higher priorities still come first. PopAll()
now returns the tasks in that order instead of handing out the heap.

Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65353
Refs: https://github.com/nodejs/node/pull/58047
Refs: https://github.com/nodejs/node/pull/61999
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-08-20 12:16:09 +00:00
Kirill Saied 5a9fd82800 fs: treat std::errc::permission_denied as EPERM error
In the thrown exception, `std::errc::permission_denied` is already
treated as an `EPERM` error, but it is not included in one of the
omittable errors when retrying the `RmSync` operation. This commit
includes it.

This also fixes the `retryDelay` calculation on Windows where the
`retryDelay` is divided by `1000` but the win32's `Sleep` function
takes the argument as an `ms` unit, dividing the supplied `ms` unit
further to a much smaller delay.

Signed-off-by: louiellan <louie.lou.llaneta@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64698
Fixes: https://github.com/nodejs/node/issues/64016
Refs: https://github.com/nodejs/node/pull/64017
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2026-08-20 11:17:04 +00:00
Kirill Saied 6d60352305 src: define O_SYNC, O_DSYNC and O_DIRECT on Windows
Signed-off-by: Kirill Saied <sayed.kirill@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64707
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-20 11:05:05 +00:00
trivenay fd5b13557f quic: do not destroy incoming streams that have a consumer
An incoming stream was destroyed unless the session had an onstream
callback, even when session-level stream callbacks (onheaders et al)
were registered and the negotiated application (HTTP/3) would drive
the stream through them. Users had to register stub onstream handlers
just to keep their streams alive.

Destroy an incoming stream only when the session has no consumer for
it at all: no onstream callback, and no session-level stream callbacks
runnable on the negotiated application (checked via the existing
headersSupported session state, computed when the application is
selected from ALPN). Sessions with no consumers keep the current
destroy-and-warn behavior so unconsumed streams cannot accumulate and
hold flow control credit.

On HTTP/3 sessions only bidirectional request streams reach this path;
control and QPACK streams are consumed internally by nghttp3 and are
never exposed to JavaScript.

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

Signed-off-by: Naman Trivedi <trivenay@amazon.com>
PR-URL: https://github.com/nodejs/node/pull/65335
Fixes: https://github.com/nodejs/node/issues/64192
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-20 07:03:21 +00:00
Matteo Collina 28995396b2 stream: decouple transform backpressure changes
The spec's [[backpressureChangePromise]] is only ever observed by the
transform source pull algorithm (settles when backpressure next becomes
true) and by a sink write arriving under backpressure (settles when it
next becomes false), both internal. Replace the promise record with
direct continuation delivery: a parked pull is completed by enqueueing
the readable controller's pull-fulfilled step on the shared resolved
promise, and a parked write by a cached per-stream continuation that
resolves the sink promise with the perform-transform promise, so
adoption reproduces the previous derived-chain settle depth exactly.
Each delivery lands at the same microtask position as the old record's
reaction.

transformStreamDefaultControllerPerformTransform now mirrors the
reference implementation's promiseCall().then(undefined, rejection
steps) directly instead of running an async wrapper pair per chunk: the
transformer.transform callback is wrapped raw, a non-thenable result
reuses the shared resolved promise, and a synchronous throw is
delivered through a rejected promise, keeping the error timing inside a
reaction.

A pipe-through benchmark is added since the suite had no
transform-throughput row.

pipeThrough passthrough improves by ~8% and a writer-driven transform
loop by ~14%; the pipe-to and read families are unchanged.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/65143
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-08-20 03:56:00 +00:00