15977 Commits
Author SHA1 Message Date
Chengzhong Wu 9807ffd6a0 vm: expose import attributes on SourceTextModule.moduleRequests
PR-URL: https://github.com/nodejs/node/pull/58829
Backport-PR-URL: https://github.com/nodejs/node/pull/59962
Refs: https://github.com/nodejs/node/issues/37648
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-09-22 14:29:05 +00:00
Chengzhong Wu d302cb3bb2 esm: add experimental support for addon modules
PR-URL: https://github.com/nodejs/node/pull/55844
Backport-PR-URL: https://github.com/nodejs/node/pull/59961
Fixes: https://github.com/nodejs/node/issues/40541
Fixes: https://github.com/nodejs/node/issues/55821
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-09-22 14:28:01 +00:00
Chengzhong Wu 937e9bb1c6 src: track BaseObjects with an efficient list
PR-URL: https://github.com/nodejs/node/pull/55104
Backport-PR-URL: https://github.com/nodejs/node/pull/59959
Refs: https://github.com/nodejs/node/pull/54880
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-09-22 14:26:18 +00:00
Chengzhong Wu a2329895e7 lib: fix DOMException subclass support
PR-URL: https://github.com/nodejs/node/pull/59680
Backport-PR-URL: https://github.com/nodejs/node/pull/59957
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2025-09-22 12:41:35 +00:00
Haram Jeong b7b78fd565 assert: cap input size in myersDiff to avoid Int32Array overflow
PR-URL: https://github.com/nodejs/node/pull/59578
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-09-20 06:17:32 +00:00
sangwook f660943471 util: fix numericSeparator with negative fractional numbers
Fix util.inspect() formatting bug where negative fractional numbers
between -1 and 0 lost their minus sign when numericSeparator was true.
Fixed formatNumber function to preserve sign by using original string
representation. Also corrected test expectations for scientific notation
to not apply numeric separators.
Fixes: https://github.com/nodejs/node/issues/59376

PR-URL: https://github.com/nodejs/node/pull/59379
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-20 06:17:30 +00:00
Nicholas Paun 71038932d3 fs: fix wrong order of file names in cpSync error message
PR-URL: https://github.com/nodejs/node/pull/59775
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-20 06:17:09 +00:00
Ruben Bridgewater 7864ad13bb util: hide duplicated stack frames when using util.inspect
Long stack traces often have duplicated stack frames from recursive
calls. These make it difficult to identify important parts of the
stack. This hides the duplicated ones and notifies the user which
lines were hidden.

PR-URL: https://github.com/nodejs/node/pull/59447
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2025-09-20 06:16:59 +00:00
Joyee Cheung ba5b6597aa url: add err.input to ERR_INVALID_FILE_URL_PATH
Otherwise there's no information from the error about what exactly
is the invalid URL.

PR-URL: https://github.com/nodejs/node/pull/59730
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-09-20 06:16:57 +00:00
Richard Lau 903ebd373a test: skip more sea tests on Linux ppc64le
Theses tests are failing when compiled with clang. Skip for now to
avoid breaking the CI when we switch over to building with clang.

PR-URL: https://github.com/nodejs/node/pull/59755
Refs: https://github.com/nodejs/node/issues/59561
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-09-20 06:16:56 +00:00
Joyee Cheung 24e825f8f5 sea: implement sea.getAssetKeys()
This adds a new API to allow the bundled script in SEA to query
the list of assets.

PR-URL: https://github.com/nodejs/node/pull/59661
Refs: https://github.com/nodejs/single-executable/discussions/112
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-09-20 06:16:51 +00:00
Moshe Atlow fb4180e9f6 test_runner: fix todo inheritance
PR-URL: https://github.com/nodejs/node/pull/59721
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-09-20 06:16:44 +00:00
Nicholas Paun 5692dec451 fs: fix dereference: false on cpSync
PR-URL: https://github.com/nodejs/node/pull/59681
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-09-20 06:16:24 +00:00
Antoine du Hamel f334e2d539 wasi: fix clean target in test/wasi/Makefile
PR-URL: https://github.com/nodejs/node/pull/59576
Refs: https://www.gnu.org/software/make/manual/make.html#Cleanup
Refs: https://www.gnu.org/software/make/manual/make.html#Parallel-Disable
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-09-20 06:16:18 +00:00
Michaël Zasso e961060bb6 test: fix internet/test-dns
The `nodejs.org` domain has now two TXT records.
Do not verify the exact number of records returned (only their shape),
and check that one of them is the SPF.

PR-URL: https://github.com/nodejs/node/pull/59660
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-09-20 06:16:13 +00:00
theanarkh 9e2aa23be9 worker: add cpu profile APIs for worker
PR-URL: https://github.com/nodejs/node/pull/59428
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2025-09-20 06:16:09 +00:00
Joyee Cheung c2b22f50a8 test: mark test-inspector-network-fetch as flaky again
https://redirect.github.com/nodejs/node/pull/59104 did not fix it
and it's still flaky in the CI.

Refs: https://github.com/nodejs/reliability/blob/main/reports/2025-08-26.md
Refs: https://github.com/nodejs/node/issues/59090
PR-URL: https://github.com/nodejs/node/pull/59640
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-09-20 06:16:06 +00:00
Joyee Cheung 4ae958e59b test: skip test-fs-cp* tests that are constantly failing on Windows
These tests are likely actual regressions introduced when the
monolithic test-fs-cp.mjs was marked as flaky and got ignored due
to the flaky status. They are now constantly failing the Windows
CI and require the CI to always be re-run on Windows when the job
is resumed. Simply skip them until someone fixes them, as there's
no point keep running these known regressions on Windows anymore.

PR-URL: https://github.com/nodejs/node/pull/59637
Refs: https://github.com/nodejs/node/issues/59636
Refs: https://github.com/nodejs/node/pull/59408
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2025-09-20 06:16:04 +00:00
Luigi Pinca d5b0a64598 test: deflake test-http-keep-alive-empty-line
- Do not call `client.end()` to ensure that the socket is closed by the
  server.
- Remove the timer and send the empty line when the response is
  received.

Fixes: https://github.com/nodejs/node/issues/59577
PR-URL: https://github.com/nodejs/node/pull/59595
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-09-20 06:16:01 +00:00
Joyee Cheung c66af21e55 sea: allow using inspector command line flags with SEA
The inspector command line flags should be allowed via NODE_OPTIONS,
though it should not be consumed when passed directly to the SEA.
This patch allows it to consume inspector flags from NODE_OPTIONS
and add tests for different behaviors.

PR-URL: https://github.com/nodejs/node/pull/59568
Fixes: https://github.com/nodejs/node/issues/51688
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-09-20 06:15:59 +00:00
Darshan Sen b8066611c3 inspector: add http2 tracking support
This allows tracking HTTP/2 calls through the Network tab of
Chrome DevTools for Node.js.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/59611
Refs: https://github.com/nodejs/node/issues/53946
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
2025-09-20 06:15:54 +00:00
hotpineapple 76bf6b908d test_runner: set mock timer's interval undefined
prevent adding timer to execution queue if clearInterval() called

PR-URL: https://github.com/nodejs/node/pull/59479
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-09-20 06:15:48 +00:00
Joyee Cheung 9b7dd40da8 sea: implement execArgvExtension
This implements the execArgvExtension configuration field for SEA,
which takes one of three string values to specify whether and how
execution arguments can be extended for the SEA at run time:

* `"none"`: No extension is allowed. Only the arguments specified
  in `execArgv` will be used,
  and the `NODE_OPTIONS` environment variable will be ignored.
* `"env"`: _(Default)_ The `NODE_OPTIONS` environment variable can
  extend the execution arguments.
  This is the default behavior to maintain backward compatibility.
* `"cli"`: The executable can be launched with
  `--node-options="--flag1 --flag2"`, and those flags
  will be parsed as execution arguments for Node.js instead of being
  passed to the user script. This allows using arguments that are
  not supported by the `NODE_OPTIONS` environment variable.

PR-URL: https://github.com/nodejs/node/pull/59560
Fixes: https://github.com/nodejs/node/issues/55573
Fixes: https://github.com/nodejs/single-executable/issues/100
Refs: https://github.com/nodejs/node/issues/51688
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-09-20 06:10:38 +00:00
Alex Yang 5559456fe4 sqlite: add sqlite-type symbol for DatabaseSync
PR-URL: https://github.com/nodejs/node/pull/59405
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2025-09-20 06:10:28 +00:00
René 0a05d06fcc test_runner: do not error when getting fullName of root context
PR-URL: https://github.com/nodejs/node/pull/59377
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-09-20 06:10:26 +00:00
Sohyeon Kim eb311f1754 test: use mustSucceed in test-repl-tab-complete-import
Refactor test/parallel/test-repl-tab-complete-import.js to use
mustSucceed in places where no error is expected in the callback. This
clarifies the intent of the tests and improves assertion accuracy.

Refs: https://github.com/nodejs/node/pull/59204
PR-URL: https://github.com/nodejs/node/pull/59368
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-09-20 06:10:23 +00:00
Richard Lau 8e047e32be test: skip sea tests on Linux ppc64le
Theses tests are failing when compiled with clang. Skip for now to
avoid breaking the CI when we switch over to building with clang.

PR-URL: https://github.com/nodejs/node/pull/59563
Refs: https://github.com/nodejs/node/issues/59561
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-09-20 06:10:21 +00:00
Edy Silva 3478130da3 sqlite: handle ?NNN parameters as positional
PR-URL: https://github.com/nodejs/node/pull/59350
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2025-09-20 06:10:19 +00:00
Meghan Denny 4a250479d8 test: rename test-net-server-drop-connections-in-cluster.js to -http-
PR-URL: https://github.com/nodejs/node/pull/59532
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-09-20 06:10:11 +00:00
Tim Perry 062e837d5f http2: add support for raw header arrays in h2Stream.respond()
PR-URL: https://github.com/nodejs/node/pull/59455
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2025-09-20 06:09:57 +00:00
Khafra cf06e74076 stream: add brotli support to CompressionStream and DecompressionStream
Refs: https://github.com/whatwg/compression/issues/34
PR-URL: https://github.com/nodejs/node/pull/59464
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2025-09-20 04:32:47 +00:00
Pietro Marchini d22f113aaf test: lazy-load internalTTy
PR-URL: https://github.com/nodejs/node/pull/59517
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-09-20 04:32:45 +00:00
Antoine du Hamel 36dd856897 test: fix test-setproctitle status when ps is not available
PR-URL: https://github.com/nodejs/node/pull/59523
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-09-20 04:32:42 +00:00
Joyee Cheung d55c3e7f0b esm: link modules synchronously when no async loader hooks are used
When no async loader hooks are registered, perform the linking as
synchronously as possible to reduce the chance of races from the
the shared module loading cache.

PR-URL: https://github.com/nodejs/node/pull/59519
Fixes: https://github.com/nodejs/node/issues/59366
Refs: https://github.com/abejfehr/node-22.18-issue-repro
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-09-20 04:32:39 +00:00
Lee Jiho c5d68c4a0f benchmark, test: replace CRLF variable with string literal
PR-URL: https://github.com/nodejs/node/pull/59466
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2025-09-20 04:32:34 +00:00
Node.js GitHub Bot fd02295da6 test: update WPT for WebCryptoAPI to ff26d9b307
PR-URL: https://github.com/nodejs/node/pull/59497
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2025-09-20 03:33:59 +00:00
Ruben Bridgewater a2d2003daa util: fix error's namespaced node_modules highlighting using inspect
When inspecting errors, node_modules are highlighted with an
underscore. So far namespaced modules only highlighted the namespace
but not the rest of the module name. This is fixed by matching the
full name.
As drive-by it improves the performance slightly by removing the
regular expression in favor of indexOf to identify the right spot.

PR-URL: https://github.com/nodejs/node/pull/59446
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2025-09-20 03:33:55 +00:00
BCD1me cce938c5f9 test: make test-debug-process locale-independent
The test `test/parallel/test-debug-process.js` fails on non-English
Windows systems due to a locale-dependent error message string.

The test asserts that a call to `process._debugProcess()` on a
terminated process throws an error with the message
`'The system cannot find the file specified.'`.
While this holds true on an English Windows system,
the test fails on systems with a different display language.

The underlying `WinapiErrnoException` function correctly retrieves the
localized error message from the OS. For example, on a Korean system,
the message is "지정된 파일을 찾을 수 없습니다.". This mismatch causes
an `AssertionError`.

This behavior can be verified directly in PowerShell:

# On Windows with English (US) display language
PS> (New-Object System.ComponentModel.Win32Exception 2).Message
The system cannot find the file specified.

# On Windows with Korean display language
PS> (New-Object System.ComponentModel.Win32Exception 2).Message
지정된 파일을 찾을 수 없습니다.

To make the test robust and environment-agnostic, this commit changes
the assertion to check the language-independent `error.errno` property,
which is consistently `2` for this type of error, instead of the
localized `error.message`.

PR-URL: https://github.com/nodejs/node/pull/59254
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2025-09-20 03:33:52 +00:00
Joyee Cheung 5a8f03df9e test: mark test-wasi-pthread as flaky
It has been flaking the CI for two months with no one working on
a fix. Mark it as flaky.

PR-URL: https://github.com/nodejs/node/pull/59488
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-09-20 03:33:47 +00:00
Joyee Cheung 94f6d6b969 test: split test-wasi.js
There is a flake in the tests. Split them so that people stop
piling more test cases that flake the monolith.

PR-URL: https://github.com/nodejs/node/pull/59488
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-09-20 03:33:46 +00:00
Joyee Cheung 48bfbd3dca sea: support execArgv in sea config
The `execArgv` field can be used to specify Node.js-specific
arguments that will be automatically applied when the single
executable application starts. This allows application developers
to configure Node.js runtime options without requiring end users
to be aware of these flags.

PR-URL: https://github.com/nodejs/node/pull/59314
Refs: https://github.com/nodejs/node/issues/51688
Refs: https://github.com/nodejs/node/issues/55573
Refs: https://github.com/nodejs/single-executable/issues/100
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-09-20 03:33:36 +00:00
Darshan Sen 4d4fb51b89 http2: report sent headers object in client stream dcs
This change improves diagnosis by reporting the headers object that is
actually sent rather than the original input headers in the following
diagnostics channels:
- 'http2.client.stream.created'
- 'http2.client.stream.start'

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/59419
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-09-20 03:33:34 +00:00
Joyee Cheung 162ac9393c test: use case-insensitive path checking on Windows in fs.cpSync tests
In certain machine configurations on Windows, fs.readlinkSync() may
return a path with upper case drive letter while the other paths may be
constructed from a base path with a lower case drive letter (e.g.
from process.cwd()). Checking path mismatch in a case-sensitive
manner can lead to failure in some tests, specifically with the
Windows machine configurations in the Jenkins CI. Since paths
are case-insensitive on Windows anyway, compare them in a
case-insensitive manner in the tests.

PR-URL: https://github.com/nodejs/node/pull/59475
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2025-09-20 03:33:32 +00:00
Shima Ryuhei ce9d6776c9 test: add missing hasPostData in test-inspector-emit-protocol-event
PR-URL: https://github.com/nodejs/node/pull/59412
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-09-20 03:33:29 +00:00
Shima Ryuhei 61171c7756 module: correctly detect top-level await in ambiguous contexts
Fixes: https://github.com/nodejs/node/issues/58331
PR-URL: https://github.com/nodejs/node/pull/58646
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-09-20 03:33:27 +00:00
Chengzhong Wu b2bf620c7b src: internalize v8::ConvertableToTraceFormat in traces
`v8::ConvertableToTraceFormat` is only available in legacy V8 tracing
API and no longer supported in perfetto. This internalize
`node::tracing::TracedValue` and `v8::ConvertableToTraceFormat` by
defining specialized trace argument classes.

The newly defined structured trace argument classes can be easily
converted to `perfetto::TracedValue` by perfetto traced value protocol.
For example, when adding perfetto support, `CastTracedValue` will be a
no-op and these classes can add a new conversion method like:

```cpp
class Foo {
  void WriteIntoTrace(TracedValue context) const {
    auto dict = std::move(context).WriteDictionary();
    dict->Add("key", 42);
    dict->Add("foo", "bar");
    dict->Add("member", member_);
  }
};
```

PR-URL: https://github.com/nodejs/node/pull/57866
Refs: https://github.com/nodejs/diagnostics/issues/654
Refs: https://github.com/google/perfetto/blob/9ddf987d48cdfd9129987a3af1e85052c377756f/include/perfetto/tracing/traced_value.h#L46
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-09-20 03:33:24 +00:00
Sohyeon Kim 717ea2866d test: refactor error checks to use assert.ifError/mustSucceed
Replace manual `if (err) assert.fail(err)` and `assert.ok(!err)` with
`assert.ifError()` or `common.mustSucceed()` in a few tests to clarify
intent and follow project conventions.

- test/parallel/test-child-process-send-returns-boolean.js
- test/parallel/test-dgram-blocklist.js
- test/parallel/test-fs-watchfile.js

PR-URL: https://github.com/nodejs/node/pull/59424
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-09-20 03:33:22 +00:00
theanarkh c5a93a3355 worker: fix worker name with \0
PR-URL: https://github.com/nodejs/node/pull/59214
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-09-20 03:33:17 +00:00
Lee Jiho b1c3e4a17c test: fix typos
PR-URL: https://github.com/nodejs/node/pull/59330
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2025-09-20 03:33:12 +00:00
Sungwon 3fdfb187d6 test_runner: fix isSkipped check in junit
The `isSkipped` function in the JUnit reporter was incorrectly
checking for `node?.attrs.failures` instead of `node?.attrs.skipped`.

PR-URL: https://github.com/nodejs/node/pull/59414
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2025-09-20 03:33:10 +00:00