Commit Graph
47863 Commits
Author SHA1 Message Date
Matteo Collina 553aec1f7f doc: document open pull request limit
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/65250
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
2026-08-14 20:50:00 +00:00
ulofiai 38e3955691 deps: cherry-pick libuv/libuv@e640dc9
Signed-off-by: ulofiai <monsterking@tutamail.com>
PR-URL: https://github.com/nodejs/node/pull/65118
Fixes: https://github.com/nodejs/node/issues/63638
Refs: https://github.com/libuv/libuv/pull/5152
Refs: https://github.com/libuv/libuv/commit/e640dc93c79e1b930e320853a5f9f65fa489158d
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-08-14 20:02:08 +00:00
Node.js GitHub Bot 9cf2ce75f2 deps: update perfetto to 57.2
PR-URL: https://github.com/nodejs/node/pull/65114
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-08-14 18:33:27 +00:00
Maya Lekova f83e7df961 test: add a simple test for import defer of a CJS module
This tests imports a CommonJS modules with the `defer` modifier.
It ensures that the imported module is not evaluated before
accessing properties from its exports.

Signed-off-by: Maya Lekova <maya@igalia.com>
PR-URL: https://github.com/nodejs/node/pull/64694
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-08-14 16:14:58 +00:00
Joyee Cheung 3a35e48ea7 inspector: avoid calling into JS from V8 interrupts
Our inspector implementation dispatches inspector messages from
a V8 interrupt handler, so they could be handled during an arbitrary
point of JS execution where re-calling into another irrelevant JS
code is not safe.

This patch tracks V8 interrupt state in this case and rewrite the
async hook toggling as state reconciliation, so requests only record
the desired state, which is applied once calling into JS is possible
and safe, and the actual invocation is deferred to an immediate when
inside an interrupt. This simplifies the previous mechanism and
makes re-entracy and early termination safer.

Drive-by: skip installing command line API extensions during
teardown when calling into JS is no longer safe.

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65028
Refs: https://issues.chromium.org/u/1/issues/42212250
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/8173727
Refs: https://github.com/nodejs/node/pull/26935
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-08-14 16:14:48 +00:00
James M Snell db138c434c meta: add unified http api initiative
HTTP APIs in Node.js have become a bit of a mess.

We have separate `node:http`, `node:https`, and `node:http2`
modules. We have separate `fetch` implementation. We have
`http3` support in development. There are new http features
like datagrams and priorities that are entirely unsupported,
etc.

This strategic initiative will be focused on the development
of a unified HTTP API built around the web standard fetch
model. Client and Server.. independent of underlying transport
and updated to modern HTTP protocol capabilities.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65139
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2026-08-14 15:09:48 +00:00
Yagiz Nizipli 967d4af565 zlib: convert classes to modern syntax and eol DEP0184
Convert ZlibBase, Zlib, and the remaining zlib/Brotli stream
constructors to ES6 class syntax. Calling these constructors without
`new` is no longer supported (DEP0184 End-of-Life); use `new` or the
create* factory helpers instead.

This is a semver-major change: code that relied on `zlib.Gzip()`
(without `new`) will now throw TypeError. The createGzip/createDeflate
helpers and all documented `new`-based usage remain unchanged. The
wire behavior and public options are preserved.

Refs: https://github.com/nodejs/node/pull/55718
Refs: https://github.com/nodejs/node/pull/54708
Assisted-by: Grok
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/64849
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-14 14:52:07 +00:00
Harjoth Khara 9e23066b8a doc: document http2 header constants
Signed-off-by: harjoth <harjoth.khara@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64548
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-14 03:39:59 +00:00
Philipp Dunkel 91a99c5e5c zlib: roll back a failed add() directory rewrite
add()/addEntrySync() advanced the central-directory offset and adopted
the new entry into memory before the final directory rewrite. If that
rewrite failed (ENOSPC/EIO after the member bytes were already written),
the in-memory state and the on-disk archive were left diverged and
half-updated, with no restore, corrupting the next add().

Wrap the rewrite: on failure, restore the previous offset and directory
entry and rewrite the original directory back, leaving the archive and
handle exactly as before the call, then rethrow.

Signed-off-by: Philipp Dunkel <pip@pipobscure.com>
PR-URL: https://github.com/nodejs/node/pull/65016
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-14 03:39:49 +00:00
Philipp Dunkel ad736a851e zlib: let a ZipFile read finish before close()
An entry read runs on a file descriptor shared with its ZipFile, but
reads did not take part in close()'s lifecycle: close() marked the
handle closed and released the fd while a read was still in flight, so
the read landed on a closed - or worse, an OS-reused - descriptor
(surfacing as EBADF, or a cross-file read once the number was
reclaimed), despite the class comment promising otherwise.

Track in-flight reads on the shared handle. close() now marks the handle
closing (rejecting new reads at once), waits for the in-flight reads to
finish on the still-open fd, and only then closes it; closeSync(), which
cannot wait, refuses while an asynchronous read is outstanding.

Signed-off-by: Philipp Dunkel <pip@pipobscure.com>
PR-URL: https://github.com/nodejs/node/pull/65016
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-14 03:39:47 +00:00
Philipp Dunkel e7834cdbd0 test: cover ZIP fd lifecycle and add rollback
Add regression tests for two node:zlib ZipFile robustness issues:

- A read in flight when close() is called must complete on a live
  descriptor; close() must not release the fd out from under it (which
  surfaces as EBADF, or an OS-reused-fd cross-file read).
- If the central-directory rewrite fails after add() has written the
  member bytes, both the in-memory state and the on-disk archive must be
  rolled back, not left half-updated.

Signed-off-by: Philipp Dunkel <pip@pipobscure.com>
PR-URL: https://github.com/nodejs/node/pull/65016
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-14 03:39:45 +00:00
Philipp Dunkel 13ea0579da zlib: do not hang archiving a FIFO or device
zipFiles() opened each source before fstat-ing it, so open() on a FIFO
(or a slow/blocking device) blocked indefinitely - the regular-file
guard ran too late to prevent it, and each stuck open pinned a libuv
threadpool thread. Open with O_NONBLOCK so the open returns promptly and
the fstat can reject anything that is not a regular file; O_NONBLOCK has
no effect on a regular file's subsequent reads.

Signed-off-by: Philipp Dunkel <pip@pipobscure.com>
PR-URL: https://github.com/nodejs/node/pull/65016
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-14 03:39:44 +00:00
Philipp Dunkel ad87559e7e zlib: reject local/central ZIP header mismatch
The reader treats the central directory as authoritative for a member's
method, sizes, CRC, and name, but read the local header only for its
signature. An archive whose local file header disagrees with the
central directory therefore extracts different bytes here than in a
reader that uses the local header (e.g. Info-ZIP unzip), and its
encrypted bit was read from the local header while its identity came
from the central directory - a parser-confusion split that defeats
inspect-then-consume pipelines and can slip an encrypted member past a
central-directory scanner.

Cross-check the local header against the central entry when a member is
read: method, CRC, and both sizes (exempting a data-descriptor entry,
whose local crc/sizes are legitimately zero), plus the encryption flag.
Reject a mismatch with ERR_ZIP_INVALID_ARCHIVE, consistent with the
reject-rather-than-silently-choose stance already taken for ambiguous
archive ends.

The existing hardening/coverage tests that forged a decode-time size,
CRC, or Zip64 lie in the central header alone now trip this earlier
check; update them to patch both headers consistently so they still
exercise the decode-time guards they target.

Signed-off-by: Philipp Dunkel <pip@pipobscure.com>
PR-URL: https://github.com/nodejs/node/pull/65016
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-14 03:39:42 +00:00
Philipp Dunkel af5df60a42 test: cover ZIP header-confusion and DoS guards
Add regression tests for node:zlib ZIP hardening:

- A local file header that disagrees with the central directory on
  compression method, sizes, CRC, or the encryption flag lets another
  ZIP reader extract a different member from the same archive; such an
  archive must be rejected (fixed in a follow-up commit).
- zipFiles() must reject a FIFO/special source rather than block forever
  on open() (fixed in a follow-up commit).
- Streaming (contentIterator) is hard-bounded by the header's declared
  uncompressed size and rejects a member that inflates past it, so
  entry.size is a ceiling a consumer can trust up front; lock that in.

Signed-off-by: Philipp Dunkel <pip@pipobscure.com>
PR-URL: https://github.com/nodejs/node/pull/65016
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-14 03:39:40 +00:00
Trivikram Kamat 54ac460a6b ffi: refresh cached string buffers on every call
Native code can mutate temporary string storage during an FFI call.
Rewrite cached buffers on every conversion so a later call with the
same JavaScript string receives a fresh copy of its UTF-8 bytes.

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/65051
Fixes: https://github.com/nodejs/node/issues/65050
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-14 01:54:41 +00:00
Donghoon Kang 5e7bd32c54 typings: add internal_only_v8 binding typeis
Add an InternalOnlyV8Binding declaration for
internalBinding('internal_only_v8') and wire it into
InternalBindingMap.

Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/65071
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2026-08-14 00:41:51 +00:00
Antoine du Hamel 4078cde32e tools: fix linter when permittedInsecurePackages is empty
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65226
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-08-13 23:11:32 +00:00
Node.js GitHub Bot d14729db9a meta: move one or more collaborators to emeritus
PR-URL: https://github.com/nodejs/node/pull/65182
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-08-13 21:54:37 +00:00
Filip Skokan e1cdcec718 crypto: improve SubtleCrypto.supports() accuracy
Constrain context parameters, ML-KEM derived-key imports, HKDF output
lengths, and RSA key generation.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65222
Refs: https://redirect.github.com/w3c/webcrypto/pull/558
Refs: https://redirect.github.com/WICG/webcrypto-modern-algos/pull/76
Refs: https://redirect.github.com/WICG/webcrypto-modern-algos/pull/77
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2026-08-13 21:39:12 +00:00
Edy Silva f914e45b2d benchmark: complete the sqlite is-transaction fix
Signed-off-by: geeksilva97 <edigleyssonsilva@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65218
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-08-13 18:36:12 +00:00
Adrián Estrada 54bdc2e383 doc: document REPL DEP0185 throws and uncaught-exception behavior
Two doc-only improvements to `doc/api/repl.md`, both filling gaps left
by recent semver-major REPL changes:

1. `repl.REPLServer` is an ES class; calling it without `new` is
   End-of-Life (DEP0185) and throws a native V8 `TypeError`. The
   "Class: REPLServer" section now notes this and links to the DEP0185
   entry in `doc/api/deprecations.md`. No `Stability: 0` banner is
   added because the class itself is not deprecated — only the
   `new`-less invocation is — matching the parallel DEP0184/DEP0195
   "classes without `new`" convention.

2. PR #64034 ("repl: use inspector over vm") removed the old
   "Global uncaught exceptions" subsection because the `domain`-based
   restrictions it documented no longer exist. A new top-level
   `### Error handling` section documents the current model (mirroring
   the `### Error handling` convention in async_hooks/http2/quic),
   anchored to the existing `Uncaught Error: REPL await` example.

Refs: https://github.com/nodejs/node/pull/59495
Refs: https://github.com/nodejs/node/pull/54869
Refs: https://github.com/nodejs/node/pull/54842
Refs: https://github.com/nodejs/node/pull/64034
Signed-off-by: Adrian Estrada <edsadr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64993
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-08-13 17:26:22 +00:00
James M Snell 1662b69955 src: make the options structs smaller with packed bits
While the Options objects are not a significant overhead,
they still waste a few hundred bytes due to sloppy definition
and alignment issues. Tighten it up and shave off a couple
hundred wasted bytes.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65145
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
2026-08-13 10:06:37 -07:00
Antoine du Hamel 73eed9be27 src: escape Windows environment variables in task runner
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
2026-08-13 16:34:53 +00:00
Hiroki Osame c3d68ef969 util: preserve function names without source map names
Signed-off-by: Hiroki Osame <hiroki.osame@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65108
Fixes: https://github.com/nodejs/node/issues/65104
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2026-08-13 16:13:28 +00:00
Trivikram Kamat c47ad66162 ffi: reject detached ArrayBufferViews
Detached ArrayBuffers were rejected with ERR_INVALID_ARG_VALUE, but
detached views were not: typed arrays exported zero bytes and DataViews
threw a bare TypeError from byteLength.

Track detachment in ArrayBufferViewContents::Read() and skip the JS
length check for detached buffers, so every detached input is rejected.

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/65086
Fixes: https://github.com/nodejs/node/issues/65085
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-08-13 15:25:11 +00:00
Trivikram Kamat 525e8f43e0 ffi: reject detached ArrayBuffers as pointers
Reject detached ArrayBuffers and ArrayBuffer views in getRawPointer()
and FFI pointer argument conversion. This prevents detached backing
stores from being silently passed to native functions as null pointers.

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/65083
Fixes: https://github.com/nodejs/node/issues/65082
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-08-13 14:58:23 +00:00
Hendrik Liebau bcb680c08c test: cover realpathSync resolving symlinks after a FIFO stat
While walking a path, `realpathSync` skips the components it already
knows are real, and in that branch it reads the shared stat buffer to
decide whether the walk has reached a pipe or a socket. That buffer
holds the result of the last stat made anywhere in the process rather
than the last one made by the walk, so an unrelated stat of a FIFO ends
the walk early and the path comes back with its symlinks unresolved. The
unresolved path is then written to the cache, so every later resolution
repeats it.

The walk only takes that branch once the ancestors are established as
real, which is the state the module loader's cache is in. The test goes
through `require()` to reach it, where the stale read costs a second
copy of a module reached through a symlink.

Signed-off-by: Hendrik Liebau <mail@hendrik-liebau.de>
PR-URL: https://github.com/nodejs/node/pull/65113
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-13 14:36:25 +00:00
Edy Silva f46e96fe54 sqlite: expose prepared statement statistics
Signed-off-by: geeksilva97 <edigleyssonsilva@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64541
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-08-13 13:59:56 +00:00
Chemi Atlow a674c5d1a3 test_runner: extend tag filter with boolean expression DSL
Upgrades the experimental tag filter introduced by stage 1 to accept a
boolean expression instead of a literal tag name.

Grammar: `and`/`&&`, `or`/`||`, `not`/`!`, parentheses for grouping,
and `*` wildcards inside identifiers. Standard precedence
(`not > and > or`); binary operators are left-associative. Word forms
require whitespace separation; punctuation forms do not. Untagged
tests evaluate `false` for any include expression and `true` for
`not X`, so excluding tags does not accidentally remove untagged
tests.

The flag and `testTagFilters` option are still repeatable; multiple
expressions still AND together. Malformed expressions fail fast at
the parent process at startup.

Tag value validation tightens to reject whitespace, operator
characters (`& | ! ( ) *`), and the reserved words `and`/`or`/`not`
in any casing - a breaking change relative to the stage 1 ship,
acceptable at Stability 1.0 (Early development).

Signed-off-by: atlowChemi <chemi@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/63054
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2026-08-13 13:26:26 +00:00
greenhead 1d9d49c1be stream: use validateBuffer for BYOB reader view
The same check is already spelled validateBuffer(view, 'view') in
ReadableStreamBYOBRequest.respondWithNewView(), and the thrown error is
unchanged.

Signed-off-by: greenhead <shren0812@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65046
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-13 07:29:17 +00:00
Paul Bouchon 1b2de5e052 module: fix --check on ambiguous ESM files
A `.js` file with no `"type"` in the nearest package.json has no format
of its own, and `defaultGetFormat()` reports it as null. `--check`
passed that null straight to `wrapSafe()`, which parses as CommonJS.
Module syntax makes that parse bail out early, so the file was reported
as valid and `--check` exited 0 even though it is not valid JavaScript
under either goal.

At load time the goal for such a file is decided by looking for module
syntax in the source. Decide it the same way here, so the file is
parsed as a module and its real syntax error is reported. Files whose
format is known are unaffected, as are ambiguous files without module
syntax, which are still parsed as CommonJS.

Fixes: https://github.com/nodejs/node/issues/65202
Signed-off-by: Paul Bouchon <mail@bitpshr.net>
PR-URL: https://github.com/nodejs/node/pull/65203
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-12 21:47:11 +00:00
René 167768f338 deps: float ICU-23262 patch for icu78
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/64678
Fixes: https://github.com/nodejs/node/issues/63041
Refs: https://unicode-org.atlassian.net/browse/ICU-23262
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-12 23:13:05 +02:00
3b214e084c doc: create ai-guidelines and include to CONTRIBUTING
Co-authored-by: Beth Griggs <bethanyngriggs@gmail.com>
Co-authored-by: Aditi <62544124+Aditi-1400@users.noreply.github.com>
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
Co-authored-by: Tobias Nießen <tniessen@tnie.de>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Co-authored-by: Efe <dogukankrskl@gmail.com>
Co-authored-by: James M Snell <jasnell@gmail.com>
Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/62105
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Aditi Singh <aditisingh1400@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
2026-08-12 18:23:46 +00:00
James M Snell d9966100cf test: add permission fast api test
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:42 -07:00
James M Snell dee1fe76a0 src: apply minor namespace format tweak in permissions
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:40 -07:00
James M Snell d157b005d4 src: simplify permissions with BooleanPermissions
Most of the PermissionBase subclasses used the identical
simple pattern. Rather than define a bunch of individual
identical permissions, use a single utility definition.
Special cases like FsPermission are still possible but
the simple case is kept... well, simple.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:38 -07:00
James M Snell 55e00cfa60 src: simplify includes in permissions
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:37 -07:00
James M Snell 9e733fa232 src: apply a modest performance perf to permissions
Improve the way the RadixTree works and apply a
fast api call.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:36 -07:00
James M Snell 14a4f3aacb src: make permission storage a bit more efficient
Use a fixed array rather than an unordered list

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:34 -07:00
James M Snell ae2ce9d05d src: apply multiple general cleanups to permissions
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:33 -07:00
James M Snell adcc6fc1e5 src: simplify c++ diagnostics channel API
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:32 -07:00
James M Snell 18c2da1346 src: make minor cleanup to permission checks
Getting the name of the channel is unnecessary.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:30 -07:00
James M Snell 9dc2f0d86d src: use DictionaryTemplate for permission diag channel message
Since DiagnosticChannel permission messages always have the
same shape and should be as low cost as possible, use a
cached DictionaryTemplate for creating them

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:29 -07:00
James M Snell 79720e98c1 src: cache permission strings
Use env_property strings for permissions since those
are fixed. Avoid creating new string instances each
time.

Also use ToV8Value for a couple since we're in here.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:28 -07:00
Antoine du Hamel 075d748655 tools: only include fast-tracked and old enough PRs in CQ
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65197
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-08-12 15:55:10 +00:00
James M Snell bfa3e982ec lib,src: improve histogram implementation
Several improvements:

1. In histogram-inl, Add previous locked only this->mutex while
   reading the other's fields unsafely.
2. In histogram.cc, PrepareCB now uses ContainerOf
3. In histogram.cc, BigInt value range is checked
4. In histogram.js, simplified impl and reduced duplication
5. In event_loop_delay.js, use a more consistent constructor

Adds new analytical APIs to Histogram

* histogram.ccdf(value)
* histogram.cdf(value)
* histogram.countAt(value)
* histogram.ksTest(other)
* histogram.kurtosis
* histogram.linearBuckets(stepSize)
* histogram.logBuckets(first, base)
* histogram.percentilesAt(percentiles)
* histogram.shewness

On RecordableHistogram

* histogram.recordCorrected(val, expectedInterval)
* histogram.subtract(other)

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus
PR-URL: https://github.com/nodejs/node/pull/65024
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-12 07:41:57 -07:00
James M Snell 3ad942784a src: shave about 20 bytes off each TLSWrap instance
By shifting from individual bool fields to a packed struct
we can save 20 bytes per TLSWrap instance

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65144
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2026-08-12 07:38:55 -07:00
greenhead 356ee0a45e doc: fix broken fs.BigIntStats link in vfs.md
fs.md describes the bigint variant inside the fs.Stats section and has
no separate fs.BigIntStats section to link to.

Signed-off-by: greenhead <shren0812@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65045
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-12 13:38:41 +00:00
Donghoon Kang 69bf457349 typings: add credentials internal binding types
Add a CredentialsBinding declaration for internalBinding('credentials')
and wire it into InternalBindingMap.

Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/65036
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2026-08-12 09:51:21 +00:00
Matteo Collina 00f0f8cf8a zlib: validate central directory record count
ZIP readers trusted the EOCD record count. They did not check that
the parsed headers consumed the declared central directory size.
Reject archives whose count leaves directory bytes unparsed.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/65002
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-08-12 11:02:57 +02:00