Aditi
a274b28857
module: fix require.resolve() crash on non-string paths
...
Previously, `require.resolve()` could crash when:
- The first parameter was a relative path and
- The `paths` array contained non-string entries
This commit fixes the issue by adding a check in
`Module._findPath` to ensure all elements in `paths`
are strings, and adding a validation in `stat` before
calling `InternalModuleStat` to guard against
non-string filenames.
PR-URL: https://github.com/nodejs/node/pull/56942
Fixes: https://github.com/nodejs/node/issues/47698
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-02-12 09:34:56 +01:00
dependabot[bot]
b5a8a812fb
tools: bump eslint version
...
Bumps the eslint group in /tools/eslint with 5 updates:
| Package | From | To |
| --- | --- | --- |
| `@babel/core` | `7.26.0` | `7.26.7` |
| `@babel/eslint-parser` | `7.25.9` | `7.26.5` |
| `@stylistic/eslint-plugin-js` | `2.12.1` | `3.0.1` |
| `eslint` | `9.17.0` | `9.19.0` |
| `eslint-plugin-jsdoc` | `50.6.1` | `50.6.3` |
Signed-off-by: dependabot[bot] <support@github.com >
PR-URL: https://github.com/nodejs/node/pull/56869
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-02-11 15:03:29 +01:00
Yagiz Nizipli
8e6c191601
zlib: use modern class syntax for zstd classes
...
PR-URL: https://github.com/nodejs/node/pull/56965
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-02-11 08:46:56 +01:00
Ian Kerins
ccaf7fe737
fs: make FileHandle.readableWebStream always create byte streams
...
The original implementation of the experimental
`FileHandle.readableWebStream` API created non-`type: 'bytes'` streams,
which prevented callers from creating `mode: 'byob'` readers from the
returned stream, which means they could not achieve the associated
"zero-copy" performance characteristics.
Then, #46933 added a parameter allowing callers to pass the `type`
parameter down to the ReadableStream constructor, exposing the same
semantics to callers of `FileHandle.readableWebStream`.
But there is no point to giving callers this choice: FileHandle-derived
streams are by their very nature byte streams. We should not require
callers to explicitly opt in to having byte stream semantics. Moreover,
I do not see a situation in which callers would ever want to have a
non-bytes stream: bytes-streams only do anything differently than normal
ones if `mode: 'byob'` is passed to `getReader`.
So, remove the `options` parameter and always create a ReadableStream
with `type: 'bytes'`.
Fixes #54041 .
PR-URL: https://github.com/nodejs/node/pull/55461
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-02-10 15:16:06 +01:00
Pietro Marchini
0c3ae25aec
test_runner: print formatted errors on summary
...
PR-URL: https://github.com/nodejs/node/pull/56911
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-02-10 15:16:05 +01:00
Chengzhong Wu
be00058712
inspector: add Network.Initiator in inspector protocol
...
Add initiator stack trace in inspector network events, reflecting
the location where the script created the request.
The `http.client.request.created` event is closer to where user code
creates the http request, and correctly reflects which script
initiated the request.
PR-URL: https://github.com/nodejs/node/pull/56805
Refs: https://github.com/nodejs/node/issues/53946
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-02-10 15:15:04 +01:00
Jan Krems
4cc7907738
zlib: add zstd support
...
Fixes: https://github.com/nodejs/node/issues/48412
PR-URL: https://github.com/nodejs/node/pull/52100
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-02-10 15:15:04 +01:00
RafaelGSS
3579143630
src: set worker thread name using worker.name
...
Set the worker thread name using worker.name value
and changing the default to "WorkerThread"
PR-URL: https://github.com/nodejs/node/pull/56416
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2025-02-07 13:12:46 +01:00
James M Snell
3b305f25f2
lib: filter node:quic from builtinModules when flag not used
...
PR-URL: https://github.com/nodejs/node/pull/56870
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-02-05 10:35:24 +01:00
Yagiz Nizipli and Daniel Lemire
bc97a90176
url: add URLPattern implementation
...
Co-authored-by: Daniel Lemire <daniel@lemire.me >
PR-URL: https://github.com/nodejs/node/pull/56452
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2025-02-02 17:37:04 +01:00
ywave620
974cec7a0a
http: be more generational GC friendly
...
Avoid any potential ref to Buffer in new generation
from old generation
PR-URL: https://github.com/nodejs/node/pull/56767
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-02-02 17:37:04 +01:00
Khafra
bab9c4d331
events: getMaxListeners detects 0 listeners
...
PR-URL: https://github.com/nodejs/node/pull/56807
Refs: https://github.com/nodejs/undici/issues/4032
Refs: https://github.com/nodejs/node/commit/c1ccade02f29fd5585601bd496d4fb615a55b682
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-02-02 17:37:02 +01:00
Daniel Venable
dfc61f7bb7
readline: fix unresolved promise on abortion
...
Fixes: https://github.com/nodejs/node/issues/53497
PR-URL: https://github.com/nodejs/node/pull/54030
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-02-02 17:37:02 +01:00
Marco Ippolito
77294d8918
util: enforce shouldColorize in styleText array arg
...
PR-URL: https://github.com/nodejs/node/pull/56722
Fixes: https://github.com/nodejs/node/issues/56717
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2025-02-02 17:36:59 +01:00
Michael Dawson
60039a2c36
crypto: add api to get openssl security level
...
Distros may compile with a different openssl security level than the
default. In addition there has been some discussion with respect
to shipping with a different default security security level in
different Node.js versions in order to main stabilty. Exposing the
default openssl security level with let us have tests that work in
these situations as well as allow applications to better cope with
the avialable crypto algorithms.
- add API to get openssl security level
- modify one test to use security level instead
of openssl version as an example
Signed-off-by: Michael Dawson <midawson@redhat.com >
PR-URL: https://github.com/nodejs/node/pull/56601
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2025-02-02 17:36:58 +01:00
James M Snell
a9d80d43cb
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-02-02 17:36:56 +01:00
Pietro Marchini and Llorx
e2668c0e00
test_runner: print failing assertion only once with spec reporter
...
Co-authored-by: Llorx <dallorx@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/56662
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-01-30 10:44:38 +01:00
Dario Piotrowicz
59510ab819
module: fix bad require.resolve with option paths for . and ..
...
this change fixes `require.resolve` used with the `paths` option
not considering `.` and `..` as relative
Fixes: https://github.com/nodejs/node/issues/47000
PR-URL: https://github.com/nodejs/node/pull/56735
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-01-30 10:44:36 +01:00
Jonas
e1b0f44d19
watch: reload env file for --env-file-if-exists
...
PR-URL: https://github.com/nodejs/node/pull/56643
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-01-30 10:44:36 +01:00
Joyee Cheung
58d2dad67d
module: integrate TypeScript into compile cache
...
This integrates TypeScript into the compile cache by caching
the transpilation (either type-stripping or transforming) output
in addition to the V8 code cache that's generated from the
transpilation output.
Locally this speeds up loading with type stripping of
`benchmark/fixtures/strip-types-benchmark.ts` by ~65% and
loading with type transforms of
`fixtures/transform-types-benchmark.ts` by ~128%.
When comparing loading .ts and loading pre-transpiled .js on-disk
with the compile cache enabled, previously .ts loaded 46% slower
with type-stripping and 66% slower with transforms compared to
loading .js files directly.
After this patch, .ts loads 12% slower with type-stripping and
22% slower with transforms compared to .js.
(Note that the numbers are based on microbenchmark fixtures and
do not necessarily represent real-world workloads, though with
bigger real-world files, the speed up should be more significant).
PR-URL: https://github.com/nodejs/node/pull/56629
Fixes: https://github.com/nodejs/node/issues/54741
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-01-30 10:44:34 +01:00
Jordan Harband
a9d332a16f
util: inspect: do not crash on an Error stack that contains a Symbol
...
See #56570
PR-URL: https://github.com/nodejs/node/pull/56573
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-01-30 10:44:33 +01:00
Chengzhong Wu
2fb007fdce
lib: allow skipping source maps in node_modules
...
Files in `node_modules` are not authored by the user directly and the
original sources are less relevant to the user.
Skipping source maps in `node_modules` improves the general
performance. Add `module.setSourceMapsSupport(enabled, options)` to
skip source maps in `node_modules` if it is needed. This moves
all source maps related API to `node:module` and this a step to
promote the source maps API to stable.
PR-URL: https://github.com/nodejs/node/pull/56639
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-01-30 10:44:33 +01:00
Antoine du Hamel
9f99a6acb5
module: use more defensive code when handling SWC errors
...
PR-URL: https://github.com/nodejs/node/pull/56646
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-01-30 10:44:32 +01:00
Matteo Collina
538e19489f
worker: refactor stdio to improve performance
...
Signed-off-by: Matteo Collina <hello@matteocollina.com >
PR-URL: https://github.com/nodejs/node/pull/56630
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-01-30 10:44:32 +01:00
Vitalii Akimov
7347d34053
module: fixing url change in load sync hook chain
...
Fixes: https://github.com/nodejs/node/issues/56376
PR-URL: https://github.com/nodejs/node/pull/56402
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-01-30 10:44:32 +01:00
islandryu
4202045673
http2: omit server name when HTTP2 host is IP address
...
Fixes: https://github.com/nodejs/node/issues/56189
PR-URL: https://github.com/nodejs/node/pull/56530
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-01-30 10:44:31 +01:00
Maksim Gorkov
8bbdb1203e
child_process: fix parsing messages with splitted length field
...
Fixes: https://github.com/nodejs/node/issues/55834
PR-URL: https://github.com/nodejs/node/pull/56106
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-01-30 10:44:31 +01:00
Colin Ihrig
21362cc4f4
punycode: limit deprecation warning
...
DEP0040 is an extremely annoying warning. Most of the people
seeing it cannot do anything about it. This commit updates the
warning logic to only emit outside of node_modules. This is
similar to other warnings such as the Buffer() constructor
warning.
Ideally, this should be backported to Node 22.
Refs: https://github.com/nodejs/node/pull/47202
PR-URL: https://github.com/nodejs/node/pull/56632
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2025-01-30 10:44:31 +01:00
Marco Ippolito
9c5c3b3115
module: add ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX
...
PR-URL: https://github.com/nodejs/node/pull/56610
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-01-30 10:44:30 +01:00
Pietro Marchini
f97cd5b02b
test_runner: remove unused errors
...
PR-URL: https://github.com/nodejs/node/pull/56607
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2025-01-30 10:44:30 +01:00
Colin Ihrig
13bdd9c961
test_runner: add TestContext.prototype.waitFor()
...
This commit adds a waitFor() method to the TestContext class in
the test runner. As the name implies, this method allows tests to
more easily wait for things to happen.
PR-URL: https://github.com/nodejs/node/pull/56595
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2025-01-30 10:44:29 +01:00
Jordan Harband
6a16012fd7
util: inspect: do not crash on an Error with a regex name
...
See #56570
PR-URL: https://github.com/nodejs/node/pull/56574
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-01-30 10:44:29 +01:00
Chengzhong Wu
c7f16192f4
util: rename CallSite.column to columnNumber
...
Align the property names `lineNumber` and `columnNumber`.
PR-URL: https://github.com/nodejs/node/pull/56584
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-01-30 10:44:29 +01:00
pacexy
afd1f91a1e
module: fix jsdoc for format parameter in cjs/loader
...
PR-URL: https://github.com/nodejs/node/pull/56501
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
Reviewed-By: Qingyu Deng <i@ayase-lab.com >
2025-01-30 10:44:28 +01:00
Marco Ippolito
86d783fa51
module: rethrow amaro error message
...
PR-URL: https://github.com/nodejs/node/pull/56568
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2025-01-30 10:44:28 +01:00
Jordan Harband
e652781934
util: do not crash on inspecting function with Symbol name
...
Refs: https://github.com/nodejs/node/issues/56570
PR-URL: https://github.com/nodejs/node/pull/56572
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-01-30 10:44:28 +01:00
Carlos Espa
cf16123785
src,worker: add isInternalWorker
...
PR-URL: https://github.com/nodejs/node/pull/56469
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Bryan English <bryan@bryanenglish.com >
2025-01-30 10:44:15 +01:00
Jacob Smith
f54118c84a
doc: correct customization hook types & clarify descriptions
...
PR-URL: https://github.com/nodejs/node/pull/56454
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-01-30 10:44:15 +01:00
Mattias Buelens
df78515664
stream: fix typo in ReadableStreamBYOBReader.readIntoRequests
...
PR-URL: https://github.com/nodejs/node/pull/56560
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-01-30 10:44:14 +01:00
Stephen Belanger
c9a211ae29
diagnostics_channel: capture console messages
...
PR-URL: https://github.com/nodejs/node/pull/56292
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-01-30 10:44:14 +01:00
Giovanni Bucci
334a3ac7c6
assert: make myers_diff function more performant
...
PR-URL: https://github.com/nodejs/node/pull/56303
Refs: https://github.com/nodejs/node/pull/54862
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Xuguang Mei <meixuguang@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-01-30 10:44:12 +01:00
Antoine du Hamel
7b6df4a97a
process: fix symbol key and mark experimental new node:process methods
...
PR-URL: https://github.com/nodejs/node/pull/56517
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-01-30 10:44:12 +01:00
Jacob Smith and Carlos Espa
dd3f94873e
esm: fix jsdoc type refs to ModuleJobBase in esm/loader
...
Co-Authored-By: Carlos Espa <43477095+Ceres6@users.noreply.github.com >
PR-URL: https://github.com/nodejs/node/pull/56499
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-01-30 10:44:12 +01:00
Colin Ihrig
00a1943858
test_runner: add t.assert.fileSnapshot()
...
This commit adds a t.assert.fileSnapshot() API to the test runner.
This is similar to how snapshot tests work in core, as well as
userland options such as toMatchFileSnapshot().
PR-URL: https://github.com/nodejs/node/pull/56459
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2025-01-30 10:44:11 +01:00
Giovanni Bucci
eb2bf460b7
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-30 10:44:11 +01:00
Daeyeon Jeong
9414d3cbf1
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-30 10:44:10 +01:00
Chengzhong Wu
9a954fbf4a
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-30 10:44:10 +01:00
Giovanni Bucci
d184453b90
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-30 10:44:10 +01:00
Matteo Collina
aab53e6965
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-21 13:37:29 -03:00
Chengzhong Wu
f185e8a34a
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-21 13:37:28 -03:00