Commit Graph
9520 Commits
Author SHA1 Message Date
Giovanni Bucci 24ed8da48e assert: make partialDeepStrictEqual work with urls and File prototypes
PR-URL: https://github.com/nodejs/node/pull/56231
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2025-01-09 17:35:54 +00:00
Chengzhong Wu 483e3d5e4b src: fix undefined script name in error source
PR-URL: https://github.com/nodejs/node/pull/56502
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-09 14:06:31 +00:00
Joyee Cheung 6b3937a072 src: refactor --trace-env to reuse option selection and handling
This reduces the duplication in the code base, also makes
makes the log messages more concise since the `[--trace-env]`
prefix should provide enough indication about the fact that
it's about environment variable access.

PR-URL: https://github.com/nodejs/node/pull/56293
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-01-09 12:46:22 +00:00
Daeyeon Jeong dc5d0f9bb4 fs: allow exclude option in globs to accept glob patterns
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/56489
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2025-01-08 23:12:27 +00:00
Chengzhong Wu 4f45acef19 inspector: add undici http tracking support
Add basic undici http tracking support via inspector protocol. This
allows tracking `fetch` calls with an inspector.

PR-URL: https://github.com/nodejs/node/pull/56488
Refs: https://github.com/nodejs/node/issues/53946
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-01-08 16:56:42 +00:00
Giovanni Bucci 799d9204f2 assert: show diff when doing partial comparisons
PR-URL: https://github.com/nodejs/node/pull/56211
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-01-08 09:58:33 +00:00
James M Snell ea493c18b2 crypto: make generatePrime/checkPrime interruptible
The `generatePrime` and `checkPrime` functions in the `crypto`
module are only somewhat interruptible. This change makes it
possible to interrupt these more reliably. Note that generating
overly large primes can still take a long time and may not be
interruptible as this mechanism relies on a callback to check
for stopping conditions but OpenSSL may perform a long running
operation without calling the callback right away.

Fixes: https://github.com/nodejs/node/issues/56449
PR-URL: https://github.com/nodejs/node/pull/56460
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-01-07 14:38:21 -08:00
Luigi Pinca 75b9c1cdd8 test: remove test-macos-app-sandbox flaky designation
Fixes: https://github.com/nodejs/node/issues/54811
Refs: https://github.com/nodejs/node/issues/54811#issuecomment-2334463112
PR-URL: https://github.com/nodejs/node/pull/56471
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2025-01-07 16:32:02 +00:00
James M Snell 062ae6f3cb src, quic: refine more of the quic implementation
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/56328
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-01-06 10:47:36 -08:00
Luigi Pinca 72537f5631 test: remove flaky test-pipe-file-to-http designation
The original issue is likely the same as other tests that time out.

Refs: https://github.com/nodejs/node/issues/54918
Refs: https://github.com/nodejs/node/pull/53595
Refs: https://github.com/nodejs/node/pull/53751
PR-URL: https://github.com/nodejs/node/pull/56472
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-06 08:14:40 -08:00
sebastianas 7895b8eae9 test: update error code in tls-psk-circuit for for OpenSSL 3.4
Update parallel/test-tls-psk-circuit.js to account for error code
changes in OpenSSL 3.4 and probably later.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
PR-URL: https://github.com/nodejs/node/pull/56420
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2025-01-06 15:58:13 +00:00
Luigi Pinca 984a472137 test: remove test-runner-watch-mode-complex flaky designation
Refs: https://github.com/nodejs/node/pull/55006
Refs: https://github.com/nodejs/node/issues/54807#issuecomment-2550896871
PR-URL: https://github.com/nodejs/node/pull/56470
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2025-01-06 15:23:37 +00:00
Matteo Collina b0c65bbe8a worker: flush stdout and stderr on exit
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/56428
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-01-06 07:22:27 +00:00
Chengzhong Wu 9400eae52e inspector: report loadingFinished until the response data is consumed
The `Network.loadingFinished` should be deferred until the response is
complete and the data is fully consumed. Also, report correct request
url with the specified port by retrieving the host from the request
headers.

PR-URL: https://github.com/nodejs/node/pull/56372
Refs: https://github.com/nodejs/node/issues/53946
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
2025-01-05 11:43:44 +00:00
Alex YangandAntoine du Hamel 08b7d38aa4 sqlite: support TypedArray and DataView in StatementSync
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/56385
Fixes: https://github.com/nodejs/node/issues/56384
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-01-05 11:18:36 +00:00
Eddie Abbondanzio 383e1a281b test_runner: differentiate test types in enqueue dequeue events
PR-URL: https://github.com/nodejs/node/pull/54049
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-01-05 08:35:35 +00:00
Colin Ihrig 338d70b752 sqlite: enable SQL math functions
This commit enables SQLite math functions.

Fixes: https://github.com/nodejs/node/issues/56435
PR-URL: https://github.com/nodejs/node/pull/56447
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-05 05:35:54 +00:00
Colin Ihrig 221040b629 test: update test-set-http-max-http-headers to use node:test
This commit updates test/parallel/test-set-http-max-http-headers.js
to use node:test. This test already implemented a test runner, so
it makes sense to use the existing public API.

PR-URL: https://github.com/nodejs/node/pull/56439
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-04 18:41:05 +00:00
Colin Ihrig 4a7b8157b5 test_runner: add assert.register() API
This commit adds a top level assert.register() API to the test
runner. This function allows users to define their own custom
assertion functions on the TestContext.

Fixes: https://github.com/nodejs/node/issues/52033
PR-URL: https://github.com/nodejs/node/pull/56434
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2025-01-04 18:30:04 +00:00
Colin Ihrig 7e08ccad17 test: update test-child-process-windows-hide to use node:test
This commit updates test/parallel/test-child-process-windows-hide.js
to use node:test. This allows the test to use the built in mocking
functionality instead of managing spies manually. It also prevents
multiple child processes from being spawned in parallel, which can
be problematic in the CI.

PR-URL: https://github.com/nodejs/node/pull/56437
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-04 17:18:49 +00:00
Marco Ippolito 76b80b163d worker: add eval ts input
PR-URL: https://github.com/nodejs/node/pull/56394
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2025-01-03 09:49:21 +00:00
James M Snell 35742a2d0b process: add process.ref() and process.unref() methods
The `process.ref(...)` and `process.unref(...)` methods are intended
to replace the use of `ref()` and `unref()` methods defined directly
on individual API objects. The existing `ref()` and `unref()` methods
will be marked as legacy and won't be removed but new APIs should use
`process.ref()` and `process.unref()` instead.

Refs: https://github.com/nodejs/node/issues/53266
PR-URL: https://github.com/nodejs/node/pull/56400
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-12-31 10:54:29 -08:00
Jacob Smith 19d58c5181 module: fix async resolution error within the sync findPackageJSON
PR-URL: https://github.com/nodejs/node/pull/56382
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2024-12-31 12:07:23 +00:00
Marco Ippolito b3f82febf1 test: add ts eval snapshots
PR-URL: https://github.com/nodejs/node/pull/56358
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2024-12-30 16:49:49 +00:00
Marco Ippolito 0e04aea54f test: remove empty lines from snapshots
PR-URL: https://github.com/nodejs/node/pull/56358
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2024-12-30 16:49:48 +00:00
Antoine du Hamel d2af881997 test: use unusual chars in the path to ensure our tests are robust
PR-URL: https://github.com/nodejs/node/pull/48409
Reviewed-By: Jacob Smith <jacob@frende.me>
2024-12-30 00:17:44 +00:00
Marco Ippolito ecc9fb2f8e lib: add typescript support to STDIN eval
PR-URL: https://github.com/nodejs/node/pull/56359
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2024-12-29 22:42:51 +00:00
Bart Louwers 0dbbabab95 sqlite: pass conflict type to conflict resolution handler
PR-URL: https://github.com/nodejs/node/pull/56352
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-12-29 17:37:54 +00:00
Luigi Pinca cef15f8a03 test: remove flaky designation
Remove test-inspector-async-stack-traces-set-interval flaky designation.

Refs: https://github.com/nodejs/node/issues/50243
PR-URL: https://github.com/nodejs/node/pull/56369
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-12-28 22:15:32 +00:00
Giovanni 91c6b8a38e assert: make partialDeepStrictEqual throw when comparing [0] with [-0]
Fixes: https://github.com/nodejs/node/issues/56230
PR-URL: https://github.com/nodejs/node/pull/56237
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2024-12-28 16:50:20 +08:00
Luigi Pinca 7d7e2cec25 test: remove test-worker-arraybuffer-zerofill flaky designation
Refs: https://github.com/nodejs/node/pull/56053
PR-URL: https://github.com/nodejs/node/pull/56364
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-12-28 07:48:35 +00:00
Luigi Pinca 38cd81aea4 test: remove test-net-write-fully-async-hex-string flaky designation
The original issue is likely the same as other tests that time out.

Refs: https://github.com/nodejs/node/issues/54918
Refs: https://github.com/nodejs/node/commit/84c2e712ebcd0f32dc0e
RefS: https://github.com/nodejs/node/pull/52959
PR-URL: https://github.com/nodejs/node/pull/56365
Refs: https://github.com/nodejs/node/pull/52959
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2024-12-28 04:31:17 +00:00
Marco Ippolito ba5992831b module: unflag --experimental-strip-types
PR-URL: https://github.com/nodejs/node/pull/56350
Fixes: https://github.com/nodejs/typescript/issues/17
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2024-12-26 18:46:06 +00:00
Edy Silva c94a9dbc40 test: improve abort signal dropping test
PR-URL: https://github.com/nodejs/node/pull/56339
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2024-12-26 14:57:17 +00:00
Luigi Pinca d00710dd8d test: deflake test-watch-file-shared-dependency
Delay dependency file modification on macOS.

Refs: https://github.com/nodejs/node/pull/51842
PR-URL: https://github.com/nodejs/node/pull/56344
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-12-25 08:54:37 +00:00
jakecastelliandjazelly 5ea6fa711e test: add coverage for pipeline
co-authored-by: jazelly <xzha4350@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/56278
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-12-24 13:30:55 +00:00
jakecastelli 6156f8a6d5 Revert "stream: handle generator destruction from Duplex.from()"
This reverts commit 55413004c8.

PR-URL: https://github.com/nodejs/node/pull/56278
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-12-24 13:30:54 +00:00
Yiyun Lei a9e65f61d4 test: migrate message eval tests from Python to JS
Migrate the eval tests in the `test/message` folder from Python to JS.

PR-URL: https://github.com/nodejs/node/pull/50482
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2024-12-24 09:03:50 +01:00
Antoine du Hamel 48c75bc02b tools: fix require-common-first lint rule from subfolder
PR-URL: https://github.com/nodejs/node/pull/56325
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2024-12-22 18:44:20 +00:00
Chengzhong Wu 4fd5db479a module: use buffer.toString base64
`btoa` only supports latin-1 charset and produces invalid source
mapping urls.

PR-URL: https://github.com/nodejs/node/pull/56315
Refs: https://github.com/nodejs/node/issues/56296
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-12-21 11:02:30 +00:00
Colin Ihrig 219b900384 test_runner,cli: mark test isolation as stable
This commit stabilizes test isolation configuration in the
test runner.

PR-URL: https://github.com/nodejs/node/pull/56298
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-12-20 02:10:26 +00:00
Chengzhong Wu a33ec1248b lib: suppress source map lookup exceptions
When the source map data are invalid json strings, skip construct
`SourceMap` on it. Additionally, suppress exceptions on source map
lookups and fix test runners crash on invalid source maps.

PR-URL: https://github.com/nodejs/node/pull/56299
Refs: https://github.com/nodejs/node/issues/56296
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2024-12-20 01:12:55 +01:00
Luigi Pinca 990497c514 test: deflake test-esm-loader-hooks-inspect-brk
Refs: https://github.com/nodejs/node/pull/54827
Refs: https://github.com/nodejs/node/pull/51560
PR-URL: https://github.com/nodejs/node/pull/56050
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-12-19 22:30:28 +00:00
origranot a85ef6a04a test: add test case for listeners
PR-URL: https://github.com/nodejs/node/pull/56282
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-12-19 18:16:49 +01:00
Antoine du Hamel ec6e6b534c test: make test-permission-sqlite-load-extension more robust
PR-URL: https://github.com/nodejs/node/pull/56295
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
2024-12-19 17:11:19 +00:00
jakecastelli fd8de670da stream: catch and forward error from dest.write
PR-URL: https://github.com/nodejs/node/pull/55270
Fixes: https://github.com/nodejs/node/issues/54945
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-12-19 11:49:34 +00:00
Edigleysson Silva (Edy) a73c41c51e sqlite: aggregate constants in a single property
PR-URL: https://github.com/nodejs/node/pull/56213
Fixes: https://github.com/nodejs/node/issues/56193
Refs: https://github.com/nodejs/node/issues/56193
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-12-17 17:36:58 +00:00
Luigi Pinca ca96c8dcbe deps: update libuv to 1.49.2
Fixes: https://github.com/nodejs/node/issues/56137
Refs: https://github.com/nodejs/node/pull/56223
PR-URL: https://github.com/nodejs/node/pull/56224
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-12-17 13:06:51 +00:00
Luigi Pinca 6536978726 test: remove test-sqlite-statement-sync flaky designation
The issue is likely the same as other tests that time out.

Refs: https://github.com/nodejs/node/issues/54918
Refs: https://github.com/nodejs/node/pull/54802
PR-URL: https://github.com/nodejs/node/pull/56051
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2024-12-17 13:06:23 +00:00
Pietro Marchini 5ad2ca920c test_runner: exclude test files from coverage by default
PR-URL: https://github.com/nodejs/node/pull/56060
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-12-17 11:10:17 +00:00