Commit Graph
996 Commits
Author SHA1 Message Date
sangwook 280c85c1d2 test: deflake test-net-listen-ipv6only
The test verified ipv6Only by connecting to the IPv4 side of an
ephemeral port and expecting ECONNREFUSED, but it never reserved that
IPv4 port. Under parallel execution another test could occupy it,
making the connection succeed instead of being refused.

Run the test sequentially with a fixed common.PORT so it no longer
competes with other tests for the same port, matching the fix already
applied to the sibling cluster variants.

Fixes: https://github.com/nodejs/node/issues/64172
Signed-off-by: sangwook <rewq5991@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64173
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-08-22 02:46:41 +00:00
Kamat, Trivikram 92ee8b7f50 test: avoid timer race in event loop delay test
An expired timer can run before the first complete event loop
iteration, disabling the histogram before it records any samples.

Drive a known number of iterations with setImmediate before checking
the histograms, and share the chain between resolution variants.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/64728
Refs: https://github.com/nodejs/reliability/issues?q=sort%3Aupdated-desc%20test-performance-eventloopdelay
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-08-17 17:21:10 -07:00
Paul Bouchon 1b2de5e052 module: fix --check on ambiguous ESM files
A `.js` file with no `"type"` in the nearest package.json has no format
of its own, and `defaultGetFormat()` reports it as null. `--check`
passed that null straight to `wrapSafe()`, which parses as CommonJS.
Module syntax makes that parse bail out early, so the file was reported
as valid and `--check` exited 0 even though it is not valid JavaScript
under either goal.

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

Fixes: https://github.com/nodejs/node/issues/65202
Signed-off-by: Paul Bouchon <mail@bitpshr.net>
PR-URL: https://github.com/nodejs/node/pull/65203
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-12 21:47:11 +00:00
Filip Skokan 45550ee0f3 test: update tests to run with OpenSSL >= 3.0 FIPS mode
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64960
Fixes: https://github.com/nodejs/node/issues/48379
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-05 15:38:11 +00:00
Matteo Collina 1576cb83b4 http2: increase default window sizes
Increase the default HTTP/2 stream window from 64KB (65535) to 4MB
(4194304) and the default local connection window to 32MB (33554432).

The default 64KB window limits throughput on high-latency connections
to window_size / RTT. With a 250ms RTT, throughput is limited to
256KB/s. The new defaults improve throughput to 16MB/s (128Mbps)
for the stream window and 128MB/s (1Gbps) for the connection window.

Fixes: https://github.com/nodejs/node/issues/38426
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64623
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-04 14:01:33 +00:00
Matteo Collina 219dbd6c71 test: unflake debugger and REPL tests
Run the debugger function-formatting checks against an auto-resumed,
long-lived target so they do not depend on initial-break rendering.

Use a synchronous VM evaluator for the REPL handleError test. Submit the
throwing input separately and wait for clean REPL teardown.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64718
Refs: https://github.com/nodejs/node/actions/runs/30080039199/job/89439279468?pr=64339
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-08-03 12:49:21 +00:00
Yagiz Nizipli 25c0c8e18a http: runtime deprecate instantiating without new
Promote DEP0195 from documentation-only to a runtime deprecation.
Calling node:http constructors without `new` now emits DEP0195 via
deprecateInstantiation. This covers Agent, Server, OutgoingMessage,
IncomingMessage, ServerResponse, and ClientRequest.

Update in-tree tests that called Server/Agent without `new` to use
the keyword, and add a dedicated DEP0195 coverage test.

Refs: https://github.com/nodejs/node/pull/58518
Assisted-by: Grok
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/64853
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-01 21:42:59 +00:00
James M Snell a7d16a8cc6 net: improve dtls cert verification
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
PR-URL: https://github.com/nodejs/node/pull/64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-01 06:15:08 +00:00
avivkeller 4f844f4380 repl: use inspector over vm
Signed-off-by: Aviv Keller <me@aviv.sh>
PR-URL: https://github.com/nodejs/node/pull/64034
Fixes: https://github.com/nodejs/node/issues/64523
Closes: https://github.com/nodejs/node/pull/64534
Fixes: https://github.com/nodejs/node/issues/39387
Closes: https://github.com/nodejs/node/pull/39392
Fixes: https://github.com/nodejs/node/issues/61390
Fixes: https://github.com/nodejs/node/issues/63126
Fixes: https://github.com/nodejs/node/issues/38503
Fixes: https://github.com/nodejs/node/issues/37445
Fixes: https://github.com/nodejs/node/issues/38145
Fixes: https://github.com/nodejs/node/issues/33369
Fixes: https://github.com/nodejs/node/issues/48131
Fixes: https://github.com/nodejs/node/issues/8309
Fixes: https://github.com/nodejs/node/issues/39689
Fixes: https://github.com/nodejs/node/issues/18931
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-07-18 12:59:37 -07:00
Kirill Saied 7360fadff4 test: unmark flaky http2-large-file for Win
Signed-off-by: Kirill Saied <sayed.kirill@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64255
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-07-09 11:24:20 +00:00
Ruben Bridgewater 1c12dd6347 dgram: skip dns.lookup() for literal IP addresses
Every unconnected send(), and the implicit bind on first send,
resolved the destination through dns.lookup() even when it was
already a literal IP. The address resolves to itself, so the call is
redundant, and tools that instrument dns.lookup() record a lookup for
every datagram sent to an IP.

Skip the resolver for a literal IP of the socket's family and report
it on the next tick, keeping dns.lookup()'s asynchronous contract. A
custom lookup function is still consulted for every address.

Refs: https://github.com/DataDog/dd-trace-js/issues/2984
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: https://github.com/nodejs/node/pull/64133
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-06-30 13:07:49 +00:00
Pablo Erhard c5635b82c9 perf_hooks: sample delay per event loop iteration
Add a samplePerIteration option to monitorEventLoopDelay that records
event loop delay from libuv event loop iterations instead of the timer
interval sampler. The default remains interval-based; existing uses of
monitorEventLoopDelay() keep behaving the same unless the
samplePerIteration option is passed through.

Signed-off-by: Pablo Erhard <pablo.erhardhernandez@datadoghq.com>
PR-URL: https://github.com/nodejs/node/pull/62935
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-06-24 23:50:06 +00:00
Marco ac6ee057fb watch: print name of changed file that triggers restart
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63781
Fixes: https://github.com/nodejs/node/issues/63767
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-06-22 05:55:19 +00:00
Trivikram Kamat cb8eebf218 watch: cancel pending restart on shutdown
Cancel any pending FilesWatcher debounce timer when watch mode clears
its watchers. This prevents a queued change event from restarting the
watched process after shutdown has started.

Keep the watched child exit handling attached for the lifetime of the
child so overlapping restart and shutdown paths do not remove each
other's exit listeners.

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/63383
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-06-04 23:20:48 +00:00
Trivikram Kamat e98f2ba5a5 test: reduce watch mode restart flakiness
Start waiting for each watch restart before writing the file, then wait
for a platform-scaled settling period before mutating it again.

This gives watch mode time to process filesystem events and dependency
reporting from the child process on slower CI machines.

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/63390
Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-05-16.md#jstest-failure
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-24 23:57:31 +00:00
James M Snell f835cc42da src,lib: add dtls interop tests
PR-URL: https://github.com/nodejs/node/pull/63182
Fixes: https://github.com/nodejs/node/issues/61630
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-05-21 14:13:07 -07:00
James M Snell 436748fc28 src,lib: implement experimental DTLS API
Decided to take a short break from the work on QUIC
to implement a DTLS API. Very experimental at this
point but the basic API is there (inspired by the
QUIC API work).

The implementation is based on OpenSSL's built-in
DTLS support and no other dependencies are required.

DTLS is a datagram-based version of TLS that is used
for things like WebRTC and CoAP. It provides similar
security guarantees as TLS but is designed to work over
UDP instead of TCP.

This shouldn't be considered ready for production
but it is a good starting point for experimentation
and feedback.

```bash
./configure --experimental-dtls
make -j{nproc}
./node --experimental-dtls my-dtls-app.js
```

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode:Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/63182
Fixes: https://github.com/nodejs/node/issues/61630
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-05-21 14:13:04 -07:00
Trivikram Kamat 57ee68239c test: deflake watch mode worker test
Trigger watch restarts by appending whitespace instead of rewriting
watched modules. This avoids transient empty or partial ESM dependency
contents while the restarted worker is loading.

Use a separate temporary directory for each subtest so concurrent
subtests do not share worker and dependency file names.

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/63384
Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-05-17.md#jstest-failure
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-05-19 17:49:31 +00:00
Matteo Collina f2aaf63846 test: fix flaky test-watch-mode-inspect timeout
This test randomly times out (~120s) on CI due to a race condition
between child-process restart (triggered by touching the watched file)
and the second inspector-session connection.

The old code used an interval-based restart (write every 500ms) and
a 'gettingDebuggedPid' flag to pause writes during a session. This
still left a race window where getDebuggedPid() would attempt to
connect the inspector via HTTP GET /json/list + WebSocket upgrade
either before the new child was ready (empty target list) or after
the old session was being destroyed, causing the promise to hang.

Fix: Replace the interval with a single write that triggers exactly
one restart, then wait for the restarted child's 'safe to debug now'
stdout line before connecting the second inspector session. This
eliminates the race by ensuring the new child process and its
inspector session are fully ready before any connection attempt.

Removes the now-unused gettingDebuggedPid flag and the pending
setTimeout delay that was needed as a backstop for the interval.

Fixes: https://github.com/nodejs/node/issues/44898
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/63361
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-05-18 17:45:55 +00:00
Marco d6be71567e test: relax min assertion in test-performance-eventloopdelay
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63100
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-05-17 21:34:51 +00:00
Filip Skokan bbf51ad24c test: update tls/crypto behaviour expectations when using BoringSSL
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63161
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-05-08 19:27:18 +00:00
SudhansuBandha 746624951f watch: track worker entry files in watch mode
Currently, --watch mode only tracks dependencies from the main
module graph (require/import). Worker thread entry points created
via new Worker() are not included, so changes to worker files do
not trigger restarts.

This change hooks into Worker initialization and registers the
worker entry file with watch mode, ensuring restarts when worker
files change.

Fixes: https://github.com/nodejs/node/issues/62275
Signed-off-by: SudhansuBandha <sudhansu9.vssut@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62368
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-04-28 13:31:52 +00:00
Marco Ippolito 2071c44630 src: allow empty --experimental-config-file
PR-URL: https://github.com/nodejs/node/pull/61610
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-04-16 06:31:35 +00:00
Efe 726b22048a watch: fix --env-file-if-exists crashing on linux if the file is missing
PR-URL: https://github.com/nodejs/node/pull/61870
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-04-10 22:06:36 +00:00
Efe 65df9ad643 watch: get flags from execArgv
PR-URL: https://github.com/nodejs/node/pull/61779
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2026-02-14 19:06:30 +00:00
Matteo Collina 87e8e8bbde test: fix flaky test-performance-eventloopdelay
The test was flaky because the histogram sampling might not have
completed before the assertions ran. By using setImmediate before
disabling the histogram and checking values, we give the event loop
a chance to record final samples on slower systems.

Also added an explicit check for histogram.count > 0 to provide a
clearer error message if no samples are recorded.

Refs: https://github.com/nodejs/reliability/issues/1450
PR-URL: https://github.com/nodejs/node/pull/61629
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-02-05 08:28:56 +00:00
Matteo Collina 232dffef01 test: fix race condition in watch mode tests
The watch mode tests using runInBackground() had a race condition where
stdout "Failed running" message could arrive before stderr was fully
collected, causing assertions on stderr content to fail with empty
strings.

Fix by waiting for stderr 'data' event if stderr is empty when "Failed
running" is detected. This is an event-driven approach rather than
timing-based.

Refs: https://github.com/nodejs/reliability/issues/1450
PR-URL: https://github.com/nodejs/node/pull/61615
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-02-03 15:46:31 +00:00
Xavier Stouder 1654684633 esm: ensure watch mode restarts after syntax errors
Move watch dependency reporting earlier in module resolution to ensure
file dependencies are tracked even when parsing fails.

Fixes: https://github.com/nodejs/node/issues/61153
PR-URL: https://github.com/nodejs/node/pull/61232
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2026-01-15 16:33:26 +00:00
Ryuhei Shima 903f64796e cluster: fix port reuse between cluster
Fixes: https://github.com/nodejs/node/issues/60086
PR-URL: https://github.com/nodejs/node/pull/60141
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-01-14 10:39:15 +00:00
Antoine du Hamel 0457bfee2c test: forbid use of named imports for fixtures
PR-URL: https://github.com/nodejs/node/pull/61228
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-01-01 23:48:26 +00:00
Antoine du Hamel e50cbc1abd test: enforce better never-settling-promise detection
Tests should be explicit regarding whether a promise is expected to
settle, and the test should fail when the behavior does not meet
expectations.

PR-URL: https://github.com/nodejs/node/pull/60976
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
2025-12-10 23:55:36 +00:00
Antoine du Hamel 441027af47 tools: enforce trailing commas in test/sequential
PR-URL: https://github.com/nodejs/node/pull/60892
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2025-12-03 14:17:37 +01:00
Antoine du Hamel f1f6f3df84 test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60641
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-11-11 09:56:18 +00:00
Marco Ippolito 4e7f9c997d watch: fix interaction with multiple env files
PR-URL: https://github.com/nodejs/node/pull/60605
Fixes: https://github.com/nodejs/node/issues/60599
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-08 14:35:07 +00:00
Joyee Cheung c9578dc557 crypto: fix argument validation in crypto.timingSafeEqual fast path
A regression introduced by
https://github.com/nodejs/node/commit/0136bb0ee807b9789bf69e8d87e7a98e1b15f217
made it possible for the fast path to be hit with non-array-buffer
arguments despite that the fast paths could only deal with array
buffer arguments, so that it can crash with invalid arguments
once crypto.timingSafeEqual is optimized instead of throwing
validation errors as usual. This adds validation to the fast path
so that it throws correctly.

PR-URL: https://github.com/nodejs/node/pull/60538
Fixes: https://github.com/nodejs/node/issues/60537
Refs: https://github.com/nodejs-private/node-private/pull/749
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-11-03 22:18:51 +00:00
Joyee Cheung be3fc1f729 test: spin longer on flaky platforms for test-worker-prof
Try spinning longer to get more ticks on flaky platforms
and reduce flakiness.

PR-URL: https://github.com/nodejs/node/pull/60492
Refs: https://github.com/nodejs/reliability/blob/main/reports/2025-10-29.md
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-11-03 21:43:30 +00:00
Antoine du Hamel 646e19e2b4 test: ensure assertions are reachable in test/sequential
PR-URL: https://github.com/nodejs/node/pull/60412
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-10-29 16:29:39 +01:00
Chengzhong Wu 51a57f2b36 perf_hooks: move non-standard performance properties to perf_hooks
`performance.eventLoopUtilization` and `performance.timerify` are not
part of the Web API. Expose these two functions directly on the
`perf_hooks` module.

PR-URL: https://github.com/nodejs/node/pull/60370
Fixes: https://github.com/nodejs/node/issues/60368
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-10-28 00:23:50 +01:00
Marco Ippolito cec1bd5498 src: add watch config namespace
PR-URL: https://github.com/nodejs/node/pull/60178
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-10-20 13:53:29 +02:00
Joyee Cheung 649d73a043 test: fix incorrect calculation in test-perf-hooks.js
After https://redirect.github.com/nodejs/node/pull/46588,
Date.now() - performance.timeOrigin and process.uptime()
are no longer similar - the former measures uptime from
process initilaization, while the latter measures uptime from
the main context initialization. Account for the differences
in the test.

PR-URL: https://github.com/nodejs/node/pull/60271
Refs: https://github.com/nodejs/reliability/blob/main/reports/2025-10-15.md
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-10-18 12:21:44 +00:00
Joyee Cheung 70c04c7fd8 test: parallelize test-without-async-context-frame correctly
It previously re-einvented the pattern matching that's already
supported by test.py, and was running the tests one by one,
which can lead to time out on slower machines.
This move it to sequential and use wildcard
support in test.py to correctly parallelize the tests.

PR-URL: https://github.com/nodejs/node/pull/60273
Fixes: https://github.com/nodejs/node/issues/60268
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-10-17 22:40:34 +00:00
Joyee Cheung 8429d9a40b test: make test-worker-prof more tolerant
It seems after the recent V8 upgrade, it's no longer safe to assume
there'll be 15 ticks per 1500ms. Lower it to 10 ticks.

PR-URL: https://github.com/nodejs/node/pull/60272
Refs: https://github.com/nodejs/reliability/blob/main/reports/2025-10-15.md
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2025-10-17 22:40:23 +00:00
Joyee Cheung 64bbb979de test: move sea tests into test/sea
This makes skipping/running these tests easier to manage with a
dedicated test runner that can be tweaked for SEA.

PR-URL: https://github.com/nodejs/node/pull/60250
Refs: https://github.com/nodejs/node/issues/59553
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-10-17 12:51:59 +02:00
Michaël Zasso 7dd49d7da4 test: spin longer for sequential/test-worker-prof
On Windows with V8 14.1, we are just below the current threshold.

PR-URL: https://github.com/nodejs/node/pull/59805
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-10-04 18:48:41 +02:00
Richard Lau f304bc2833 test: mark sea tests flaky on macOS x64
PR-URL: https://github.com/nodejs/node/pull/60068
Refs: https://github.com/nodejs/node/issues/59553
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-09-30 19:23:49 +00:00
theanarkh 24ded11b66 worker: add heap profile API
PR-URL: https://github.com/nodejs/node/pull/59846
Refs: https://github.com/nodejs/node/pull/59428
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-23 12:41:47 +00:00
Gürgün Dayıoğlu c85460b0ad zlib: implement fast path for crc32
PR-URL: https://github.com/nodejs/node/pull/59813
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-09-14 00:39:58 +00:00
Ruben Bridgewater 0319ba51d8 util: fix debuglog.enabled not being present with callback logger
The method returned by the callback is missing the .enabled property.
This is added in a consistent way that it also verifies that it's a
getter.

Fixes: https://github.com/nodejs/node/issues/56676
PR-URL: https://github.com/nodejs/node/pull/59858
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-14 00:06:57 +00:00
Ruben Bridgewater fdef0725de util,console: colorize regexp groups, character classes, etc
This adds a parser to parse the regular expression and to highlight
different parts of a regular expression in case colors are active.

It is a one time pass algorithm and should therefore not cause too
much overhead during parsing.

As side effect, it is now possible to create individual styles to
colorize inspected values values as a user likes. This might for
example be expanded to numbers with numeric separators, highlighting
the separators or decimal points different.

It would in theory also be possible to return a changed string.
That is however not the intention for this API as it is only
triggered in case colors are active.

PR-URL: https://github.com/nodejs/node/pull/59710
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2025-09-05 14:29:21 +00:00
Richard Lau 12bb03bacb 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-05 12:39:32 +00:00