Commit Graph
47759 Commits
Author SHA1 Message Date
Mahin Anowar 39f427d3cc stream: resume flow when an errored pipe destination is removed
When a source is piped to multiple destinations and one destination
errors synchronously in `_write()`, `write()` returns false without
setting `needDrain` (since the "avoid unnecessary drain for sync
stream" change). The pipe cleanup only re-invoked the source's drain
handler when the destination still had `needDrain` set, so the errored
destination was never removed from the source's `awaitDrainWriters`
set. The source stayed paused forever and any remaining healthy
destination stopped receiving data.

Always invoke the drain handler during cleanup. `pipeOnDrain` only
removes this destination from the awaiting-drain set and resumes the
source once nothing else is awaiting a drain, so it is safe to call
unconditionally and no-ops when this destination was not awaiting a
drain.

Fixes: https://github.com/nodejs/node/issues/53185
Signed-off-by: Mahin Anowar <86069420+MahinAnowar@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64310
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-18 19:08:26 +00:00
Rich Trott 8dc337dfbd test: apply correction to comment
The subsequent test checks for an invalid groupAddress, not
sourceAddress as the comment say. Adjust the comment to correctly
reflect what the test does.

Signed-off-by: Rich Trott <rtrott@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64524
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-18 18:17:49 +00:00
Paul Bouchon 9df0e9b4d4 assert,util: fix TypeError on Maps with null keys
`assert.deepStrictEqual`, `assert.notDeepStrictEqual`, and
`util.isDeepStrictEqual` threw a `TypeError` instead of returning a
result when one Map had a `null` key with an object value, the other
had an object key with a deeply-equal value but no `null` key, and
both maps were the same size.

In that case `mapObjectEquiv` skipped its primitive and `null` key
handling, which was gated on `array.length !== a.size`, and passed
the `null` key (which is `typeof 'object'`) to the object comparator.
That comparator reads `key.constructor` without a null guard, so it
threw. Handle primitive and `null` keys unconditionally, resolving
them directly against the other map.

Fixes: https://github.com/nodejs/node/issues/64433
Signed-off-by: Paul Bouchon <mail@bitpshr.net>
PR-URL: https://github.com/nodejs/node/pull/64441
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-07-18 16:38:07 +00:00
Matteo Collina fb5d01f2d1 http2: don't throw when destroying socket proxy
Calling destroy() on the http2session.socket proxy now destroys the
session instead of throwing ERR_HTTP2_NO_SOCKET_MANIPULATION.

Refs: https://github.com/nodejs/undici/issues/5525
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64427
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-18 12:27:51 +02:00
greenhead 3c88785f34 doc: fix typo in embedding.md
Signed-off-by: greenhead <shren0812@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64425
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-18 10:18:51 +00:00
bq b8f81e9760 fs: add pattern cache for matchGlobPattern()
Signed-off-by: Adam Haglund <adam@haglund.dev>
PR-URL: https://github.com/nodejs/node/pull/63915
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-17 21:34:39 +00:00
bq 0a32b56f82 path: add benchmarks for path.matchesGlob()
Signed-off-by: Adam Haglund <adam@haglund.dev>
PR-URL: https://github.com/nodejs/node/pull/63915
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-17 21:34:38 +00:00
Trivikram Kamat 1d4e86ec7f vfs: make lchmod update symlink mode
Use a non-following provider operation for lchmod so it updates the
symbolic link metadata instead of changing the target file mode.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/64350
Fixes: https://github.com/nodejs/node/issues/64349
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-17 20:47:53 +00:00
Tim Perry 89df046a21 test: keep finalization before-exit ref alive
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64521
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-17 16:39:25 +00:00
Donghoon Kang 050fc39882 doc: fix typos in contributing docs
Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/64520
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-07-17 15:01:35 +00:00
esgor 46de80de88 http2: avoid uaf while receiving and sending rst_stream
Mark the session as receiving around nghttp2_session_mem_recv() and
defer RST_STREAM handling while receive is in progress. This prevents
closing a stream while nghttp2 still processes it and avoids
heap-use-after-free in nghttp2_session_mem_recv2().

Fixes: https://github.com/nodejs/node/issues/64113
Signed-off-by: Evgeniy Gorbanev <gorbanev.es@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64166
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-07-17 12:39:42 +00:00
Antoine du Hamel 5520388f3b lib: use assignFunctionName util where it makes sense
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64515
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2026-07-17 11:00:54 +00:00
한만욱 c1bd1c4c7e quic: preserve session stats after close
Signed-off-by: manNomi <hanmw110@naver.com>
PR-URL: https://github.com/nodejs/node/pull/64489
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-17 11:00:41 +00:00
Jungwon Sohn 358adc80e2 src: fix comment typos
Correct typos in builtin, platform, and QUIC source comments.

Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64509
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-17 09:36:11 +00:00
Tim Perry ed2d7f4528 doc: document TLS alpnProtocol and servername fields
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64362
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-17 09:35:56 +00:00
Y1D7NG a27fe2198a vfs: fix VirtualReadStream race with async iteration
Fixes: https://github.com/nodejs/node/issues/64377
Signed-off-by: y1d7ng <y1d7ng@yeah.net>
PR-URL: https://github.com/nodejs/node/pull/64394
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-16 18:52:19 +00:00
Stewart X Addison 61b8e12451 tools: reference 'git node land' in PR-URL: error message in merge.sh
Signed-off-by: Stewart X Addison <sxa@ibm.com>
PR-URL: https://github.com/nodejs/node/pull/64495
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-07-16 19:13:41 +01:00
Sebastian Beltran cc8594a9b1 quic: add support for TLS certificate compression
Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64434
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-07-16 17:10:24 +00:00
Matteo Collina cf882a7904 stream: fold desired-size check into WHATWG backpressure update
writableStreamUpdateBackpressure ran two release-mode assertions and
took a precomputed backpressure value that every caller derived with a
separate GetBackpressure/GetDesiredSize call pair. All callers already
hold the 'writable', not-close-queued invariant the assertions checked,
so derive the backpressure from the desired size inside the function and
drop the assertions and the helper. This runs up to twice per write.

writer.write() loop: +10%, pipe-to: +4.6% avg over 16 configs (local
harness / benchmark, all configs positive).

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64451
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-07-16 13:34:09 +02:00
Kirill Saied 75692197e6 fs: fix cp symlink and EEXIST handling on Windows
Fixes: https://github.com/nodejs/node/issues/59636
Signed-off-by: Kirill Saied <sayed.kirill@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64353
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2026-07-16 11:27:35 +00:00
Trivikram Kamat 874e96ee4c stream: validate writer options signal
Validate options.signal for stream/iter writer write(), writev(),
and end() methods across push, broadcast, and fromWritable.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/64385
Fixes: https://github.com/nodejs/node/issues/64384
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-16 06:41:15 +00:00
Trivikram Kamat 608112affa stream: reject push iterator.throw() with error
Keep the existing consumer cancellation side effects, but
reject the iterator.throw() call with the supplied error
instead of resolving with done: true.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/64380
Fixes: https://github.com/nodejs/node/issues/64378
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-16 03:43:34 +00:00
René f2ba101259 build: extract temporal_capi crate directory name into gyp variable
This is a no-op for current builds, but will allow the crate updater in
node-core-utils to update the include path with the new crate location,
as the crate directory names will include a version string.

Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/64482
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-07-16 00:56:52 +00:00
Guy Bedford 39ed68cd7c net: support sync connect for BoundSocket
When a net.Socket is constructed from a net.BoundSocket, support
synchronous connect().

Signed-off-by: Guy Bedford <guybedford@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64375
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-16 00:56:40 +00:00
Matteo Collina 34c28d5a69 Revert "http: do not emit socket errors after complete response"
This reverts commit 17163ead33.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64511
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-15 14:04:02 +00:00
한만욱 b4dfc784f9 doc: fix spelling in devcontainer guide
Signed-off-by: manNomi <hanmw110@naver.com>
PR-URL: https://github.com/nodejs/node/pull/64459
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-15 13:18:14 +00:00
Antoine du Hamel 824bc6616f test: copyedit test-tls-psk-alpn-callback-exception-handling
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63485
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-15 10:59:57 +00:00
Antoine du Hamel bf5c221704 stream: simplify nested PromisePrototypeThens
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64470
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-07-15 08:42:05 +00:00
Harjoth Khara 5d68eb44ba doc: clarify PEM format for signing keys
Signed-off-by: harjoth <harjoth.khara@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64404
Fixes: https://github.com/nodejs/node/issues/35331
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-15 08:41:50 +00:00
Sebastian Beltran 7a11a9b2db tls: move _tls_* to end-of-life
Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/60658
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-07-14 21:40:40 +00:00
Node.js GitHub Bot 56387dda0f tools: update nixpkgs pins
- Unstable to 2065d53daf2c81ed7b57947e2e56682ded62723a
- 26.05 to 572a2c2b6faebd71246e3162e4217d7ca63a9300

PR-URL: https://github.com/nodejs/node/pull/64463
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-07-14 21:16:28 +00:00
Daijiro Wachi f7702431de doc: fix typo in tls.md
Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64458
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
2026-07-14 16:52:12 +00:00
Jimmy Leung 3ac95f2d0c doc,test: widen fsPromises.appendFile()'s data type, add missing tests
From lib/internal/fs/promises.js, one can see fsPromises.appendFile() is
simply a wrapper on fsPromises.writeFile(). Hence if writeFile() can
take non-buffer data argument, so can appendFile() too.

To justify the doc change, I have also restuctured the relevant tests,
to enhance the test coverage. They now includes the below test cases
consistently.

- await do(Append|Write)Buffer();
- await do(Append|Write)BufferAndCancel();
- await do(Append|Write)String();
- await do(Append|Write)Stream();
- await do(Append|Write)StreamWithCancel();
- await do(Append|Write)Iterable();
- await do(Append|Write)InvalidIterable();
- await do(Append|Write)IterableWithEncoding();
- await do(Append|Write)BufferIterable();
- await do(Append|Write)AsyncIterable();
- await do(Append|Write)LargeIterable();
- await do(Append|Write)InvalidValues();
- await do(Append|Write)TypedArrays();

Note that test/parallel/test-fs-promises-writefile-typedarray.js is
subsumed by test/parallel/test-fs-promises-file-handle-writeFile.js, and
test/parallel/test-fs-promises-writefile-with-fd.js becomes a subcase in
test/parallel/test-fs-promises-file-handle-writeFile.js.

Refs: https://github.com/nodejs/node/pull/41677
Signed-off-by: Jimmy Leung <mingfamily@hotmail.com.hk>
PR-URL: https://github.com/nodejs/node/pull/64279
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-07-14 15:49:57 +00:00
Livia Medeirosandlouiellan 727e2bce8e lib,tools: add node-core/func-name-matching lint rule
And rename functions accordingly.

Signed-off-by: LiviaMedeiros <livia@cirno.name>
Co-authored-by: louiellan <louie.lou.llaneta@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57901
Refs: https://github.com/nodejs/node/issues/57899
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-07-14 15:30:56 +02:00
René 7b2c63c0dd deps: V8: cherry-pick 1158ae719749
Original commit message:

    [wasm] Fix jump table slot overflow on x64 with CET enabled

    JumpTableAssembler::EmitJumpSlot for x64 was advancing the PC before
    checking if the target was reachable via a 32-bit displacement when CET
    was enabled. This caused a slot overflow when the far-jump fallback was
    triggered, as the second attempt to emit the slot would start at an
    incorrect offset.

    This CL ensures that the displacement check is performed before any
    instructions are emitted, making the function side-effect-free on
    failure. It also introduces kJumpTableSlotEntryMarkerSize to clarify
    the displacement calculation, following the pattern used on ARM64.

    Reported-by: Fabien Romano <fabienromano@gmail.com>

    TAG=agy
    R=jkummerow@chromium.org

    Fixed: 532112743
    Change-Id: Iaf6f15b51a66a45711e8556972ac0d353e6117c7
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8063803
    Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#108556}

Refs: https://github.com/v8/v8/commit/1158ae71974987dc6492c7f407e8a7c005756ffc
PR-URL: https://github.com/nodejs/node/pull/64432
Fixes: https://github.com/nodejs/node/issues/64424
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-07-14 12:07:16 +00:00
Kirill Saied 61896fe563 test: fix stale async-context-frame status entries
Signed-off-by: Kirill Saied <sayed.kirill@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64141
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2026-07-14 09:36:15 +00:00
Node.js GitHub Bot ed63b195cd deps: update googletest to 8240fa7d62f73e01c7af27d61ed965d6d66698fa
PR-URL: https://github.com/nodejs/node/pull/64439
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-14 01:31:28 +00:00
Node.js GitHub Bot ed6c3ac32b deps: update libffi to 3.7.1
PR-URL: https://github.com/nodejs/node/pull/64438
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-14 01:31:17 +00:00
Node.js GitHub Bot 84ee0a3113 test: update WPT for urlpattern to 5847ee5cfa
PR-URL: https://github.com/nodejs/node/pull/64436
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-14 00:55:40 +00:00
Node.js GitHub Bot fd3f870219 test: update WPT for WebCryptoAPI to ec2fee39a4
PR-URL: https://github.com/nodejs/node/pull/64435
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-14 00:55:29 +00:00
Matteo Collina 35115c05ad events: avoid retaining removed event names
Restore shape mode for preallocated EventEmitters while deleting dynamic
names from ordinary EventEmitters. Keeping every removed name as an
undefined property causes unbounded memory growth when event names are
unstructured.

Refs: https://github.com/nodejs/node/pull/64373
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64475
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-13 23:32:39 +00:00
Matteo Collina ace91de608 stream: use the ring buffer for WHATWG stream request queues
The [[queue]] backing the controllers became a ring buffer, but the
read and write request queues (readRequests, readIntoRequests,
writeRequests) were left as plain arrays consumed with
ArrayPrototypeShift, which is O(n) and, even for the single pending
request of the await-each regime, far slower than an indexed head
advance. Back them with the same Queue, materialized lazily from the
shared empty queue so acquiring a reader or constructing a writer
allocates no request storage until a read or write actually parks.

pipe-to: +4.7% to +9.4% (all 16 configs, ***)
readable-read type=byob: +2.3% (**)
parked read loop: +15%, write loop: +11% (local harness)

Follow-up to https://github.com/nodejs/node/pull/64312.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64431
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-07-13 20:07:12 +00:00
Efe KarasakalandHerrtian e84b517d67 doc: document net Socket server property
Based on #63458.

Co-authored-by: Herrtian <70463940+Herrtian@users.noreply.github.com>
Signed-off-by: Efe Karasakal <hi@efe.dev>
Signed-off-by: Herrtian <70463940+Herrtian@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64364
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-13 18:58:47 +00:00
Samuel Kapust e7864e609c src: zero-initialize cap_data in node_credentials.cc
zero-initialize the cap_data array to prevent
MSan warnings about using uninitialized memory

Signed-off-by: Sam Kapust <samkapust@google.com>
PR-URL: https://github.com/nodejs/node/pull/64347
Reviewed-By: Jan Martin <jan.krems@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-13 17:44:52 +00:00
Filip Skokan fc92e9119d doc: update a Dispatcher undici doc link
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64358
Refs: https://github.com/nodejs/undici-website/pull/7
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-07-13 17:01:04 +00:00
Joyee Cheung 8c6cbb8e0a inspector: add --cond to node inspect probe mode
On a hot path, the probe can record every hit and require
filtering afterwards. This patch adds a per-probe `--cond <expr>`
option that allows limiting the hit to only when the expression
is truthy at the probe location. V8 evaluates it as the breakpoint's
native condition, so the target is not paused when it does not hold,
and a condition that throws is treated as false. Since in CDP,
a location can only carry one breakpoint per URL pattern,
probes sharing a location must share one condition (or none).
Conflicting conditions are rejected.

Example:

```js
// app.js
let total = 0;
for (let i = 0; i < 10; i++) {
  total += i;  // line 4
}
```

```
$ out/Release/node inspect --probe app.js:4 --expr 'total' \
                           --cond 'i % 3 === 0' app.js
```

```
Hit 1 at file:///path/to/app.js:3:3
  total = 0
Hit 2 at file:///path/to/app.js:3:3
  total = 3
Hit 3 at file:///path/to/app.js:3:3
  total = 15
Hit 4 at file:///path/to/app.js:3:3
  total = 36
Completed
```

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64328
Refs: https://github.com/nodejs/node/issues/63646
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-13 17:00:51 +00:00
Antoine du Hamel f90b0218b5 tools: disable zipping tarballs on GHA
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64423
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-07-13 11:12:48 +00:00
Jungwon Sohn 1314579f8c doc: fix typos in documentation
Fix typographical errors in API, contributor, and crypto docs.

Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64466
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2026-07-13 12:34:05 +02:00
Matteo Collina 384d7a40ce events: optimize once() and removeListener()
Use a closure instead of a bound state object for the once() wrapper,
keep the events object shape in removeListener() by storing undefined
instead of deleting keys or reallocating the object, and outline the
cold unhandled 'error' path from emit() and the max-listeners warning
from _addListener() so both fit within V8 inlining budgets.

ee-once +25%, ee-add-remove +12-22%, ee-listen-unique +7-15%,
streams/pipe +13.9%.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64373
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-07-13 08:50:08 +00:00
Trivikram Kamat e631709909 doc: clarify fixes and refs trailer guidance
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64421
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-07-13 07:47:09 +00:00