Commit Graph
46884 Commits
Author SHA1 Message Date
Adrián Estrada fe8fa45ff2 cli: style node --help output with util.styleText
Apply util.styleText to the `node --help` output for improved visual
hierarchy and scannability. Styling is applied only when the output
stream supports color (detected via util.styleText's built-in
shouldColorize), so piped/redirected output and NO_COLOR remain plain
text with no behavior change.

- Bold: Usage lines, Options:, Environment variables: headers
- Bold green: CLI option names (e.g. --inspect, -e, --eval)
- Bold magenta: environment variable names (e.g. NODE_PATH)
- Dim: "(currently set)" annotation
- Blue underline: documentation URL

Column-width math uses unstyled string lengths to preserve alignment
regardless of styling. The "(currently set)" annotation is styled via
post-processing after layout to avoid breaking the fold() width
calculation.

Signed-off-by: Adrian Estrada <edsadr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64484
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-08-06 15:35:09 +02:00
Matteo Collina e5278b7f7d timers: do not retain a reference to the async store after firing
After firing timers, we can clean them up by iterating over all active
stores and setting the relevant symbols to undefined.

Fixes #53408

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/53443
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2026-08-06 15:35:09 +02:00
Rich Trott a5ce44dd75 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-08-06 15:35:08 +02:00
Paul Bouchon 1822c0f335 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-08-06 15:35:08 +02:00
Matteo Collina b075b33429 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-08-06 15:35:08 +02:00
greenhead 329a2884fd 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-08-06 15:35:08 +02:00
bq e5af022302 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-08-06 15:35:08 +02:00
bq 224d2c7886 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-08-06 15:35:08 +02:00
Tim Perry da8508c5a0 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-08-06 15:35:08 +02:00
Donghoon Kang fab3f56aa1 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-08-06 15:35:08 +02:00
Antoine du Hamel 9ce72fd6fb 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-08-06 15:35:08 +02:00
한만욱 7cb3099907 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-08-06 15:35:07 +02:00
Jungwon Sohn 3650fabcb4 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-08-06 15:35:07 +02:00
Tim Perry cbc2bed4e8 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-08-06 15:35:07 +02:00
Stewart X Addison d66b7588ac 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-08-06 15:35:07 +02:00
Sebastian Beltran 50e639b578 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-08-06 15:35:07 +02:00
Matteo Collina de4ca2c962 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-08-06 15:35:07 +02:00
Kirill Saied 63321eeb11 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-08-06 15:35:07 +02:00
Trivikram Kamat 2a3babb8d7 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-08-06 15:35:07 +02:00
Trivikram Kamat 0ab8f269b0 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-08-06 15:35:06 +02:00
Guy Bedford f6bf3f8a5d 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-08-06 15:35:06 +02:00
한만욱 dada3ae60e 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-08-06 15:35:06 +02:00
Antoine du Hamel 14b710c415 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-08-06 15:35:06 +02:00
Antoine du Hamel 262e6545d1 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-08-06 15:35:06 +02:00
Harjoth Khara 71343b28aa 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-08-06 15:35:06 +02:00
Daijiro Wachi 0544ec1c78 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-08-06 15:35:06 +02:00
Jimmy Leung 50791fa8fa 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-08-06 15:35:06 +02:00
Livia Medeirosandlouiellan 6b09d30a76 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-08-06 15:35:06 +02:00
Kirill Saied 99b7382c6a 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-08-06 15:35:05 +02:00
Node.js GitHub Bot 2b8f1f27bd 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-08-06 15:35:05 +02:00
Node.js GitHub Bot 6da6ca730d 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-08-06 15:35:05 +02:00
Node.js GitHub Bot 73bf0f07f1 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-08-06 15:35:05 +02:00
Matteo Collina e8c153f3f4 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-08-06 15:35:05 +02:00
Matteo Collina 0ddfc6af91 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-08-06 15:35:05 +02:00
Efe KarasakalandHerrtian 8fe58078e7 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-08-06 15:35:05 +02:00
Samuel Kapust 06b3441ea2 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-08-06 15:35:05 +02:00
Filip Skokan d54fd03fa4 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-08-06 15:35:05 +02:00
Joyee Cheung 445bcce079 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-08-06 15:35:04 +02:00
Antoine du Hamel 5d90e48175 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-08-06 15:35:04 +02:00
Jungwon Sohn 1bdebecd41 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-08-06 15:35:04 +02:00
Matteo Collina 73e1701bad 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-08-06 15:35:04 +02:00
Trivikram Kamat 86bca58641 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-08-06 15:35:04 +02:00
Tim Perry 9a7ec52e6f test: fix flaky http2 maxOriginSetSize test
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64407
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-06 15:35:04 +02:00
Daijiro Wachi 8a07969e28 util: make MIMEParams accessors case-insensitive
MIME parameter names are case-insensitive and the parser already
ASCII-lowercases them, but MIMEParams.get(), has(), delete() and set()
compared against the raw argument. As a result a parsed parameter was
unreachable by the casing the caller used (e.g. params.get('Charset')
returned null for "Charset=utf-8"), and set() could create duplicate,
case-colliding parameters.

Lowercase the name in the accessors to match the parser, consistent with
the whatwg-mimetype reference implementation.

Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64123
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-06 15:35:04 +02:00
Daijiro Wachi 21e24208dc buffer: normalize lone "\r" in Blob native line endings
`new Blob(parts, { endings: 'native' })` failed to normalize a
standalone carriage return. The replacement regex only matched
`\n` and `\r\n`, so a lone `\r` (and runs such as `\r\r`) were
left untouched instead of being converted to the platform's
native line ending.

The WHATWG "convert line endings to native" algorithm requires
`\r`, `\n`, and `\r\n` to all be normalized. Match `\r\n` before
a lone `\r` so that CRLF collapses to a single native ending.

Refs: https://w3c.github.io/FileAPI/#convert-line-endings-to-native

Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64115
Refs: https://w3c.github.io/FileAPI/#convert-line-endings-to-native
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2026-08-06 15:35:04 +02:00
Tim Perry 59af7e0ed9 test: fix 2nd flaky blob test case
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64391
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-06 15:35:04 +02:00
Matteo Collina fb8a7e15ca net: make TCP Server and Socket transferable across worker threads
Allow a listening net.Server or an accepted net.Socket to be moved to
another thread by listing it in the transferList of a worker_threads
postMessage() call. Unix only; Windows throws.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64225
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-08-06 15:35:03 +02:00
Stefano Baghino 55e2c2da8c http: fix perf_hooks detail.req.url port and proxied path
The perf_hooks HTTP client entry built the reported URL from the bare
hostname, dropping non-default ports and IPv6 brackets, and appended
the request path even after it had been rewritten to absolute-form for
proxying, duplicating the protocol and authority.

Report the connection authority captured at request creation and, for
proxied requests, use the rewritten absolute-form target as-is.

Fixes: https://github.com/nodejs/node/issues/59625
Signed-off-by: Stefano Baghino <stefano@baghino.me>
PR-URL: https://github.com/nodejs/node/pull/64311
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
2026-08-06 15:35:03 +02:00
Moshe Atlow d31c168740 test_runner: add context.log() and test:log event
Add a log(message[, data]) method to TestContext and SuiteContext that
emits a new test:log event. Unlike test:diagnostic, which is buffered
so it is emitted in the order tests are defined, test:log is emitted
immediately, in the order tests execute, including under process
isolation where it bypasses the per-file declaration order buffer.
This gives reporters that render the test tree unbuffered a live,
attributed logging channel that captured stdout cannot provide under
concurrency.

The event carries the message, an optional opaque structured payload
that the runner passes through untouched, and the emitting test's
name, testId, parentId, nesting, and location. Built-in reporters
render it the same way they render test:diagnostic.

Signed-off-by: Moses Atlow <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/64389
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-08-06 15:35:03 +02:00
Archkon bb24a88b99 src: fix some typo errors and rename some variables
Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64301
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-08-06 15:35:03 +02:00