Commit Graph
47544 Commits
Author SHA1 Message Date
Sumit Kumar Das 5316f445bd doc: mention constructor check in deepStrictEqual
Signed-off-by: skdas20 <skdas5405@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62010
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-07-27 06:44:24 +00:00
Archkon 54a5095764 dns: do not consult hosts file in reverse lookups
dns.reverse() is documented with dns.resolve*() as always performing DNS
queries without using hosts file configuration. However, c-ares
ares_gethostbyaddr() honors the channel lookup order, which can include
the files source and cause reverse lookups to return entries from
/etc/hosts.

Configure c-ares resolver channels with ARES_OPT_LOOKUPS set to "b" so
getHostByAddr uses DNS/PTR lookups only. This keeps dns.reverse()
aligned with dns.resolve*() and preserves the distinction from
system-resolution APIs such as dns.lookup() and dns.lookupService().

This is preferable to documenting the current behavior because hosts-
file reverse lookup results are platform-dependent and expose hostent
alias semantics rather than DNS PTR record semantics.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64268
Fixes: https://github.com/nodejs/node/issues/64257
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-26 20:10:12 +02:00
avivkeller 4a5eb1cf73 repl: add basic syntax highlighting
Signed-off-by: avivkeller <me@aviv.sh>
PR-URL: https://github.com/nodejs/node/pull/64591
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-25 23:56:46 -07:00
Aviv Keller 1ba3ce45bf test_runner: convert to uint during deserialization
Signed-off-by: Aviv Keller <me@aviv.sh>
PR-URL: https://github.com/nodejs/node/pull/64706
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-07-26 05:17:40 +00:00
Aviv Keller 893602cbf6 test: mark test-repl-user-error-handler as flaky
Signed-off-by: Aviv Keller <me@aviv.sh>
PR-URL: https://github.com/nodejs/node/pull/64612
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2026-07-26 04:01:17 +00:00
Mohamed Sayed 4314d136f0 stream: fix uncatchable error closing half-open Duplex.toWeb() writable
Signed-off-by: Mohamed Sayed <k@3zrv.com>
PR-URL: https://github.com/nodejs/node/pull/64161
Fixes: https://github.com/nodejs/node/issues/64120
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-07-26 04:01:05 +00:00
Mohamed Sayed d4d35c6363 sqlite: fix crash when a session outlives its database
Keep the database alive while a session is open so that closing the
database before the session does not leave the session pointing at
freed memory.

Signed-off-by: Mohamed Sayed <k@3zrv.com>
PR-URL: https://github.com/nodejs/node/pull/63797
Fixes: https://github.com/nodejs/node/issues/63796
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2026-07-26 01:43:30 +00:00
Remco Haszing 2c4ea73ae9 module: implement Symbol.dispose in ModuleHooks
This change implements the `Symbol.dispose` key in the
`ModuleHooks` class as an alias for deregister. This makes
`registerHooks` work with the `using` keyword.

Fixes: https://github.com/nodejs/node/issues/63846
Signed-off-by: Remco Haszing <remcohaszing@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63928
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Jacob Smith <jacob@frende.me>
2026-07-26 00:59:39 +00:00
Maël Nison c8da4ec206 loader: enforce path normalization before lookup
Signed-off-by: Maël Nison <nison.mael@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63917
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2026-07-26 00:59:29 +00:00
Ilia Alshanetsky eb7ee3253f buffer: validate copyArrayBuffer offsets against buffer length
CopyArrayBuffer() computed `byteLength - offset` in unsigned arithmetic
before its CHECK_GE bounds check. An offset greater than the buffer
length wrapped the subtraction to a near-SIZE_MAX value, so the check
passed and memcpy() copied out of bounds.

process.binding('buffer').copyArrayBuffer() is an internal, trusted
binding; the only in-tree caller, the Web Streams BYOB reader, already
validates the offsets in JS. Assert the offsets are within bounds with
CHECK_LE before the subtractions so the invariant holds regardless of
caller, matching the CHECK-based style already used here.

Signed-off-by: Ilia Alshanetsky <ilia@ilia.ws>
PR-URL: https://github.com/nodejs/node/pull/63904
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-07-26 00:59:19 +00:00
Archkon 6af3ddaf5c crypto: use user-facing error for output encoding changes
Replace the internal assertion with ERR_INVALID_ARG_VALUE when the
output encoding changes between Cipher or Decipher calls. Document the
encoding requirement and update the corresponding tests.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64692
Fixes: https://github.com/nodejs/node/issues/64689
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-07-25 19:30:24 +00:00
RajeshKumar11 3e06d536a9 src: fix crash when writing odd-length hex string via Writev
StringBytes::StorageSize had a CHECK that fatal-asserted when a
hex-encoded string with an odd number of characters was written
through Writev (e.g. via HTTP requests which are automatically
corked). Writing the same string via a single Write did not crash
because StringBytes::Write delegates to HexDecode, which silently
drops the trailing incomplete nibble.

Remove the CHECK and let integer division handle odd lengths, which
is consistent with StringBytes::Size and HexDecode.

Fixes: https://github.com/nodejs/node/issues/45150
Signed-off-by: RajeshKumar11 <kakumanurajeshkumar@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63658
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-07-25 14:40:06 +00:00
Archkon 0618e9f0fc v8: report minor mark-sweep in GCProfiler
Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64688
Fixes: https://github.com/nodejs/node/issues/64687
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-25 05:56:42 +00:00
Jacob Smith b02ef4cb8c doc: update technical priorities
Signed-off-by: Jacob Smith <3012099+JakobJingleheimer@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64505
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-07-25 04:59:12 +00:00
Augustin Mauroy 9274903ff6 doc: deprecation add more codemod
Signed-off-by: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/63175
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-07-25 04:59:02 +00:00
Trivikram Kamat 902411982c debugger: preserve overlapping CDP request state
A Debugger.paused event can arrive before the response to the resume
request that triggered it. The resulting probe evaluation replaces the
resume request in `inFlight`, but the resume cleanup then clears the
newer request's state.

Only clear `inFlight` when it still refers to the request being
completed. This preserves probe attribution when the target exits
during evaluation. Clarify the existing end-to-end test coverage
for this case.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/64467
Refs: https://github.com/nodejs/reliability/issues?q=sort%3Aupdated-desc%20test-debugger-probe-failure-process-exit
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-07-25 01:44:08 +00:00
Matteo Collina fdcb1de9fe net: support TCP handle transfer on Windows
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64460
Fixes: https://github.com/nodejs/node/issues/64456
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2026-07-24 17:25:38 -07:00
Guy Bedford b420cb649d net: support AF_UNIX paths in net.BoundSocket
Signed-off-by: Guy Bedford <guybedford@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64399
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-24 16:11:39 -07:00
Antoine du Hamel e8be132e31 doc: remove unsupported syntax from stream_iter.md
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64649
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-07-24 22:31:12 +02:00
Matteo Collina 9041ad047a readline: reduce createInterface overhead
Speed up Interface construction:

- Hoist the history accessor property descriptors to module scope and
  define them with a single ObjectDefineProperties call, instead of
  allocating six closures and four descriptor objects per instance.
- Stop assigning the history options onto the input stream. This avoids
  hidden class transitions on the user provided stream and no longer
  mutates it observably.
- Only check process.env.TERM for a dumb terminal when the interface is
  in terminal mode. Reading process.env goes through the environment
  interceptor and is comparatively expensive, and _ttyWrite is never
  called when terminal is false.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64585
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-07-24 09:09:01 -07:00
Node.js GitHub Bot 5841155d92 deps: update googletest to fa005b296f90faec4f352d7ab382287bf6548c8d
PR-URL: https://github.com/nodejs/node/pull/64587
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-24 15:53:50 +00:00
StefanStojanovic cdaa88eaaa deps: histogram: cherry-pick 62ea52b07ee9b195
Original commit message:

    Fix ClangCL build on Windows

Refs: https://github.com/HdrHistogram/HdrHistogram_c/commit/62ea52b07ee9b195b31855d8327abf9a06ab0054
PR-URL: https://github.com/nodejs/node/pull/64296
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-07-24 17:25:05 +02:00
Node.js GitHub Bot 7b140eb14c deps: update histogram to 0.11.10
PR-URL: https://github.com/nodejs/node/pull/64296
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-07-24 17:25:02 +02:00
Chengzhong Wu 5bdc82dc12 src: add perfetto trace agent
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/64565
Refs: https://github.com/nodejs/diagnostics/issues/654
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
2026-07-24 14:00:25 +00:00
Chengzhong Wu 2564344f87 src: rename legacy trace event headers
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/64565
Refs: https://github.com/nodejs/diagnostics/issues/654
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
2026-07-24 14:00:23 +00:00
Chengzhong Wu 7df69d521b src: fix trace macro compatibility
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/64565
Refs: https://github.com/nodejs/diagnostics/issues/654
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
2026-07-24 14:00:21 +00:00
Chengzhong Wu 5022b94fb5 lib: add perfetto support
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/64565
Refs: https://github.com/nodejs/diagnostics/issues/654
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
2026-07-24 14:00:18 +00:00
Chengzhong Wu 6d173727e4 build: perfetto-sdk
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/64565
Refs: https://github.com/nodejs/diagnostics/issues/654
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
2026-07-24 14:00:16 +00:00
David Evans c558c8e81a dns: add tests for ENODATA states
This adds new tests to codify the existing behaviour of throwing
ENODATA when there are no matching DNS records.

It also updates an existing test which was broken by
https://github.com/nodejs/node/pull/64355 - previously requesting
DNS records for a domain which has a CNAME to another domain,
neither of which contain the requested type of record, would return
an empty array. Since #64355, it will instead throw ENODATA.

Finally, this updates the trigger for the relevant pipeline so that
the internet tests will run if the cares_wrap.cc (and various other
related files) are changed, which should reduce the chance of
similar changes breaking main in the future.

Refs: https://github.com/nodejs/node/pull/64355
Signed-off-by: David Evans <davidje13@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64624
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-07-24 09:57:13 +00:00
liujiahuiandliujiahui 94e11b022d deps: V8: backport c4d06ba586f3
Original commit message:

    [loong64][compiler] Extend Word64Select instruction functionality

    Change-Id: Iba762777642d2d2d3aa904f9afc1e9005139992e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7801520
    Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
    Commit-Queue: Liu Yu <liuyu@loongson.cn>
    Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
    Auto-Submit: Liu Yu <liuyu@loongson.cn>
    Cr-Commit-Position: refs/heads/main@{#107619}

Refs: https://github.com/v8/v8/commit/c4d06ba586f33b8e5db81507b05e2cad9b7c07dc
Co-authored-by: liujiahui <liujiahui@loongson.cn>
PR-URL: https://github.com/nodejs/node/pull/63731
Fixes: https://github.com/nodejs/node/issues/63721
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2026-07-24 09:57:00 +00:00
James M Snell 6572cf54b4 src: avoid using ToLocalChecked in crypto_hash
And other minor cleanups

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64668
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-07-24 06:10:12 +00:00
Node.js GitHub Bot 7d42b0b06c deps: update amaro to 1.1.11
PR-URL: https://github.com/nodejs/node/pull/64586
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-07-24 06:09:56 +00:00
liuxingbaoyu 0fae62c581 src: fix libuv assertion on windows
Ignore `PostDelayedTask` after `Stop`
to avoid assertions.

Fixes: https://github.com/nodejs/node/issues/56645
Signed-off-by: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/61999
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-07-24 06:09:43 +00:00
Node.js GitHub Bot fde9e945ae doc: run license-builder
PR-URL: https://github.com/nodejs/node/pull/63918
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-07-23 22:52:47 -07:00
Trivikram Kamat 7bee75438f stream: abort pending single-source merge reads
Make the single-source merge path abort-aware so signal cancellation
rejects a pending read and closes the active source iterator.

Handle synchronous iterator return values when marking aborted cleanup
as handled.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64445
Fixes: https://github.com/nodejs/node/issues/64444
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2026-07-24 05:08:09 +00:00
Trivikram Kamat e383a1da48 stream: use RangeError for broadcast overflow
Reject strict-backpressure writes with a RangeError when the broadcast
pending writes queue is full.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64420
Fixes: https://github.com/nodejs/node/issues/64419
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2026-07-24 02:44:32 +00:00
Trivikram Kamat 68dc116f34 stream: skip null output from stateful transforms
Treat null yielded by sync and async stateful transforms as no output,
consistent with transform normalization semantics.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64462
Fixes: https://github.com/nodejs/node/issues/64461
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2026-07-23 23:32:17 +00:00
Archkon de6eeece8f zlib: validate pledgedSrcSize as a safe integer
pledgedSrcSize represents an exact byte count. Reject values that are
not non-negative safe integers instead of silently ignoring or coercing
them through IntegerValue().

Apply the same validation to zlib/iter and retain a native validation
check for internal callers.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64604
Fixes: https://github.com/nodejs/node/issues/64603
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Jan Martin <jan.krems@gmail.com>
2026-07-23 22:17:50 +00:00
trivenay fe5037baa9 http: propagate highWaterMark to ClientRequest OutgoingMessage
`http.request({ highWaterMark })` passes the value to the TCP socket
via createConnection() but does not set it on the OutgoingMessage
internal kHighWaterMark.  OutgoingMessage._writeRaw() has two mutually
exclusive write paths:

  Path A (socket connected): conn.write() — uses socket HWM ✓
  Path B (no socket yet):    outputSize < this[kHighWaterMark] — uses
                             OutgoingMessage own default (64 KB) ✗

Because the OutgoingMessage constructor already accepts
options.highWaterMark, the fix is to set kHighWaterMark from the
user options after they are parsed in the ClientRequest constructor.

This resolves two symptoms:

  1. write() returning the wrong boolean for pre-socket writes (the
     user highWaterMark was silently ignored on all Node versions).

  2. A deadlock on Node >= 24.16.0 where the incorrect false return
     sets kNeedDrain, but drain never fires because the socket was
     never backpressured (introduced by the stricter drain gate in
     #62936).

Signed-off-by: Naman Trivedi <trivenay@amazon.com>
Fixes: https://github.com/nodejs/node/issues/64645
Refs: https://github.com/nodejs/node/pull/62936
PR-URL: https://github.com/nodejs/node/pull/64653
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-23 16:47:25 +00:00
Trivikram Kamat 241fb9a8f1 ffi: preserve strings during reentrant calls
Cache temporary string conversion buffers by wrapper and active call
depth. This prevents nested FFI calls from overwriting or replacing
buffers still in use by an outer native call.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/64551
Fixes: https://github.com/nodejs/node/issues/64550
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-23 15:27:21 +00:00
Antoine du Hamel 9f10b570f3 doc: clarify rules for adding new built-in modules
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64648
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-07-23 14:37:34 +00:00
Matteo Collina fd41198dff sqlite: fix use-after-free in Exec() and ApplyChangeset()
When sqlite3_exec() or sqlite3changeset_apply() call JavaScript
callbacks (user-defined functions, conflict handlers, or filter
callbacks), the DatabaseSync object could be garbage-collected
if the JavaScript code drops all references to it. Both methods
only held a raw DatabaseSync* pointer on the C++ stack, which
V8 GC does not track.

Add a BaseObjectPtr<DatabaseSync> guard that keeps the database
alive for the duration of these SQLite API calls, preventing a
use-after-free when the JavaScript callback triggers GC.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64535
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-07-23 14:37:21 +00:00
Tim Perry f9715fc595 quic: defer server session emit until TLS ClientHello is processed
This ensures we don't fire session events for totally invalid TLS
handshakes - fundamental errors, bad SNI/ALPN values, or anything else
that our TLS config would reject. Instead, it means servers can access
servername & alpnProtocol synchronously as soon as the event is fired -
all key session data is available and it's immediately usable.

We don't want to defer further to handshake completed, since that'd be
an extra RT, and defeat 0RTT benefits entirely. ClientHello processed
without errors is sufficient for now.

This isn't a security mechanism. Existing structures will defer
actually sending & receiving anything that's not marked explicitly as
early data until the handshake completes anyway.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64132
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-23 13:44:46 +00:00
Rafael Gonzaga aedf2a4187 doc: mention DEPENDENCY custom field for H1 reports
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/64634
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-23 12:27:40 +00:00
James M Snell 3437febacd test: update quic tests for stream/iter update
PR-URL: https://github.com/nodejs/node/pull/64464
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2026-07-23 05:19:46 -07:00
James M Snell 64c115072e stream, quic: update iterable streams backpressure
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus
PR-URL: https://github.com/nodejs/node/pull/64464
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2026-07-23 05:19:45 -07:00
James M Snell b9ed467618 stream: update iterable streams to use budget backpressure
Updates the implementation to use the updated backpressure
model that landed here: https://github.com/WinterTC55/iter-streams/pull/23

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus
PR-URL: https://github.com/nodejs/node/pull/64464
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2026-07-23 05:19:44 -07:00
Tim Perry 82c823eefc test: fix flaky http2 socket proxy test
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64673
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-23 10:22:10 +00:00
Shivam S a609b172bd doc: fix dnsPromises.lookup verbatim default
The verbatim default flipped to true in v17 (#39987), but the
dnsPromises.lookup docs still say false. The order bullet right above
it and the dns.lookup section both already say the addresses are not
reordered by default, so this bullet was contradicting them.

Signed-off-by: BIGSUS24 <152616194+BIGSUS24@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64658
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2026-07-23 08:35:34 +00:00
Trivikram Kamat 0992f6b87e ffi: preserve uint8 semantics for bool fast calls
Normalize bool to kUint8 when creating Fast API metadata. This keeps
optimized calls consistent with generic FFI behavior, including numeric
return values and rejection of JavaScript Boolean values.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/64527
Fixes: https://github.com/nodejs/node/issues/64526
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-07-23 03:33:17 +00:00