haykam821
44c5718476
module: fix incorrect formatting in require(esm) cycle error message
...
Fixes: https://github.com/nodejs/node/issues/57451
PR-URL: https://github.com/nodejs/node/pull/57453
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-05-19 12:13:55 +02:00
Gürgün Dayıoğlu
f7e2902861
lib: use Map primordial for ActiveAsyncContextFrame
...
PR-URL: https://github.com/nodejs/node/pull/57670
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2025-05-19 12:13:54 +02:00
Rich Trott
8f643471ef
fs: improve globSync performance
...
PR-URL: https://github.com/nodejs/node/pull/57725
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2025-05-19 12:13:53 +02:00
Jason Zhang and Jake Yuesong Li
7229a29b47
watch: check parent and child path properly
...
Co-authored-by: Jake Yuesong Li <jake.yuesong@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/57425
Fixes: https://github.com/nodejs/node/issues/57422
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2025-05-19 12:13:52 +02:00
Dario Piotrowicz
bb09b4d4ae
module: improve getPackageType performance
...
PR-URL: https://github.com/nodejs/node/pull/57599
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
2025-05-19 12:13:52 +02:00
Dario Piotrowicz
9e6054e715
module: remove unnecessary readPackage function
...
PR-URL: https://github.com/nodejs/node/pull/57596
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2025-05-19 12:13:52 +02:00
Shima Ryuhei
b8189242b2
http2: skip writeHead if stream is closed
...
Fixes: https://github.com/nodejs/node/issues/57416
PR-URL: https://github.com/nodejs/node/pull/57686
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
2025-05-19 12:13:51 +02:00
Guy Bedford
832640c35e
esm: support top-level Wasm without package type
...
PR-URL: https://github.com/nodejs/node/pull/57610
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-05-19 12:13:50 +02:00
Ruben Bridgewater
696b5f85ca
assert,util: improve unequal number comparison performance
...
This improves the performance to compare unequal numbers while doing
a deep equal comparison. Comparing for NaN is faster by checking
`variable !== variable` than by using `Number.isNaN()`.
PR-URL: https://github.com/nodejs/node/pull/57619
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2025-05-19 12:13:48 +02:00
Ruben Bridgewater
775ee4d40f
assert,util: improve array comparison
...
Sparse arrays and arrays containing undefined are now compared faster
using assert.deepStrictEqual() or util.isDeepStrictEqual().
PR-URL: https://github.com/nodejs/node/pull/57619
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2025-05-19 12:13:48 +02:00
Paolo Insogna
2ce79787de
process: add execve
...
PR-URL: https://github.com/nodejs/node/pull/56496
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Bryan English <bryan@bryanenglish.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-04-17 10:51:51 -03:00
Demian Parkhomenko
1b5418eeea
lib: add warning when binding inspector to public IP
...
Add `isLoopback` function to `internal/net` module to check if a given
host is a loopback address.
Add a warning when binding the inspector to a public IP with an open
port, as it allows external hosts to connect to the inspector.
Fixes: https://github.com/nodejs/node/issues/23444
Refs: https://nodejs.org/api/cli.html#--inspecthostport
PR-URL: https://github.com/nodejs/node/pull/55736
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2025-04-17 10:51:51 -03:00
fengmk2
e301098854
util: avoid run debug when enabled is false
...
it can improve performace 700x faster
PR-URL: https://github.com/nodejs/node/pull/57494
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
2025-04-17 10:51:50 -03:00
Gürgün Dayıoğlu
44aa13990a
timers: remove unnecessary allocation of _onTimeout
...
PR-URL: https://github.com/nodejs/node/pull/57497
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2025-04-17 10:51:49 -03:00
Giovanni Bucci
17016d7722
util: expose diff function used by the assertion errors
...
fix: https://github.com/nodejs/node/issues/51740
PR-URL: https://github.com/nodejs/node/pull/57462
Fixes: https://github.com/nodejs/node/issues/51740
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-04-17 10:51:49 -03:00
Ruben Bridgewater
ea70a379c3
assert: improve partialDeepStrictEqual performance
...
This implements fast paths for typed arrays, array buffers and sets
and maps that contain only objects as keys.
PR-URL: https://github.com/nodejs/node/pull/57509
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2025-04-17 10:51:48 -03:00
Dario Piotrowicz and Xuguang Mei
caf81ca549
debugger: fix behavior of plain object exec in debugger repl
...
Co-authored-by: Xuguang Mei <meixuguang@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/57498
Fixes: https://github.com/nodejs/node/issues/46808
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Xuguang Mei <meixuguang@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-04-17 10:51:47 -03:00
Gürgün Dayıoğlu
cc4d33842b
lib: limit split function calls to prevent excessive array length
...
PR-URL: https://github.com/nodejs/node/pull/57501
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2025-04-17 10:51:46 -03:00
Filip Skokan
ada572b733
crypto: ensure expected JWK alg in SubtleCrypto.importKey RSA imports
...
PR-URL: https://github.com/nodejs/node/pull/57450
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-04-17 10:51:45 -03:00
Rich Trott
2de27787b4
fs: apply exclude function to root path
...
In at least some situations, the root path was
being added to the results of globbing even if
it matched the optional exclude function.
In the relevant test file, a variable was renamed
for consistency. (There was a patterns and pattern2,
rather than patterns2.) The test case is added to
patterns2.
Fixes: https://github.com/nodejs/node/issues/56260
PR-URL: https://github.com/nodejs/node/pull/57420
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-04-17 10:51:44 -03:00
Gürgün Dayıoğlu
401b965977
timers: remove unused parameter from insertGuarded
...
PR-URL: https://github.com/nodejs/node/pull/57251
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-04-17 10:51:40 -03:00
Ruben Bridgewater
2b419d7e79
assert: implement partial error comparison
...
assert.partialDeepStrictEqual now also handled error properties as
expected. On top of that, the main implementation also handles
non-string `name` and `message` properties and the comparison is a
tad faster by removing duplicated comparison steps.
As a drive-by fix this also cleans up some code by abstracting code
and renaming variables for clarity.
PR-URL: https://github.com/nodejs/node/pull/57370
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2025-04-17 10:51:39 -03:00
Ruben Bridgewater
01cf5fb871
assert,util: improve performance
...
This improves the performance for array comparison by making the
sparse array detection simpler. On top of that it adds a fast path
for sets and maps that only contain objects as key.
PR-URL: https://github.com/nodejs/node/pull/57370
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2025-04-17 10:51:39 -03:00
Ruben Bridgewater
d817c17fd7
assert: improve partialDeepStrictEqual
...
This significantly improves the assert.partialDeepStrictEqual
implementation by reusing the already existing algorithm.
It is significantly faster and handles edge cases like symbols
identical as the deepStrictEqual algorithm. This is crucial to
remove the experimental status from the implementation.
PR-URL: https://github.com/nodejs/node/pull/57370
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2025-04-17 10:51:38 -03:00
Pietro Marchini
1b33b976ec
test_runner: refactor testPlan counter increse
...
PR-URL: https://github.com/nodejs/node/pull/56765
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-04-17 10:51:37 -03:00
Eddie Abbondanzio
d860f2bf42
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-04-17 10:51:37 -03:00
Pietro Marchini
993bab646c
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-04-17 10:51:36 -03:00
Deokjin Kim
7a10b01e97
dns: remove redundant code using common variable
...
`validFamilies` variable is defined 2 times, so remove
redundant code by defining `validFamilies` in util. Plus,
apply the same approach to `validDnsOrders` because it's
also used multiple times.
PR-URL: https://github.com/nodejs/node/pull/57386
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2025-04-17 10:51:33 -03:00
Node.js GitHub Bot
ccb3df70be
test: update WPT for WebCryptoAPI to edd42c005c
...
PR-URL: https://github.com/nodejs/node/pull/57365
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-04-17 10:51:30 -03:00
Dario Piotrowicz
854370a06c
src: fix process exit listeners not receiving unsettled tla codes
...
fix listeners registered via `process.on('exit', ...` not receiving
error code 13 when an unsettled top-level-await is encountered in
the code
PR-URL: https://github.com/nodejs/node/pull/56872
Fixes: https://github.com/nodejs/node/issues/53551
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-04-17 10:51:29 -03:00
Gürgün Dayıoğlu
9eac9c02c9
timers: simplify the compareTimersLists function
...
PR-URL: https://github.com/nodejs/node/pull/57110
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-04-17 10:51:29 -03:00
Filip Skokan
f7fb259193
src: refactor SubtleCrypto algorithm and length validations
...
PR-URL: https://github.com/nodejs/node/pull/57319
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-04-17 10:51:28 -03:00
Giovanni Bucci
7af0440073
assert: improve myers diff performance
...
fix: https://github.com/nodejs/node/issues/57242
PR-URL: https://github.com/nodejs/node/pull/57279
Fixes: https://github.com/nodejs/node/issues/57242
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2025-04-17 10:51:24 -03:00
Daeyeon Jeong
e41b1735f1
stream: fix sizeAlgorithm validation in WritableStream
...
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/57280
Fixes: https://github.com/nodejs/node/issues/57272
Refs: https://github.com/nodejs/node/pull/56067
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
2025-04-17 10:51:22 -03:00
Antoine du Hamel
712db2232c
readline: add support for Symbol.dispose
...
PR-URL: https://github.com/nodejs/node/pull/57276
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com >
2025-04-17 10:51:21 -03:00
Filip Skokan
65b8e12689
src: refactor SubtleCrypto algorithm and length validations
...
PR-URL: https://github.com/nodejs/node/pull/57273
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
Reviewed-By: Mattias Buelens <mattias@buelens.com >
2025-04-17 10:51:21 -03:00
Joyee Cheung
3ceda2a035
module: handle cached linked async jobs in require(esm)
...
This handles two cases caused by using Promise.all() with
multiple dynamic import() that can make an asynchronously
linked module job that has finished/failed linking but
has not yet started actual evaluation appear in the load
cache when another require request is in turn to handle
it.
- When the cached async job has finished linking but has not
started its evaluation because the async run() task would be
later in line, start the evaluation from require() with
runSync().
- When the cached async job have already encountered a linking
error that gets wrapped into a rejection, but is still later
in line to throw on it, just unwrap and throw the linking error
from require().
PR-URL: https://github.com/nodejs/node/pull/57187
Fixes: https://github.com/nodejs/node/issues/57172
Refs: https://github.com/shufo/prettier-plugin-blade/issues/311
Refs: https://github.com/fisker/prettier-plugin-blade-311
Refs: https://github.com/mochajs/mocha/issues/5290
Refs: https://github.com/JoshuaKGoldberg/repros/tree/mocha-missing-module-cyclic
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-04-17 10:51:19 -03:00
Gürgün Dayıoğlu
d7d54e6bf3
lib: optimize priority queue
...
PR-URL: https://github.com/nodejs/node/pull/57100
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-04-17 10:51:13 -03:00
James M Snell
62761c73a1
lib: fixup incorrect argument order in assertEncoding
...
PR-URL: https://github.com/nodejs/node/pull/57177
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-04-17 10:51:09 -03:00
Joyee Cheung
6dcad868bb
inspector: skip promise hook in the inspector async hook
...
Instead of filtering out promises in the async hooks added
for async task tracking, add an internal path to skip adding
the promise hook completely for the inspector async hook.
The actual user-land promise tracking is already handled by
V8 inspector. This prevents the internal promise hook from
showing up and creating unnecessary noise when stepping into
async execution in the inspector.
PR-URL: https://github.com/nodejs/node/pull/57148
Refs: https://issues.chromium.org/issues/390581540
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2025-04-17 10:51:06 -03:00
Chengzhong Wu
6dab980fab
typings: fix ImportModuleDynamicallyCallback return type
...
PR-URL: https://github.com/nodejs/node/pull/57160
Refs: https://github.com/nodejs/node/pull/56919/files#r1955336054
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-04-17 10:51:03 -03:00
Joyee Cheung
d1845edd21
module: improve error message from asynchronicity in require(esm)
...
- Improve the error message that shows up when there is a race
from doing require(esm) and import(esm) at the same time.
- Improve error message of ERR_REQUIRE_ASYNC_MODULE by showing
parent and target file names, if available.
Drive-by: split the require(tla) tests since we are modifying
the tests already.
PR-URL: https://github.com/nodejs/node/pull/57126
Refs: https://github.com/fisker/prettier-issue-17139
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-04-17 10:51:02 -03:00
Carlos Espa
3ed3ba438f
test_runner: allow special characters in snapshot keys
...
Fixes: https://github.com/nodejs/node/issues/56836
PR-URL: https://github.com/nodejs/node/pull/57017
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-04-17 10:51:00 -03:00
Antoine du Hamel
0fe60b478d
src: port defineLazyProperties to native code
...
This allows us to have getters not observable from JS side.
PR-URL: https://github.com/nodejs/node/pull/57081
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2025-04-17 10:50:59 -03:00
Rithvik Vibhu
bc2603f086
dns: add TLSA record query and parsing
...
PR-URL: https://github.com/nodejs/node/pull/52983
Refs: https://github.com/nodejs/node/issues/39569
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2025-04-17 10:50:59 -03:00
Joyee Cheung
41fa7d3c21
module: allow omitting context in synchronous next hooks
...
This aligns the behavior of synchronous hooks with asynchronous
hooks by allowing omission of the context parameter in the
invocation of next hooks. The contexts are merged along the
chain.
PR-URL: https://github.com/nodejs/node/pull/57056
Fixes: https://github.com/nodejs/node/issues/57030
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-04-17 10:50:58 -03:00
koooge
dfcd9b1ac2
sea: suppress builtin warning with disableExperimentalSEAWarning option
...
Signed-off-by: koooge <koooooge@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/57086
Refs: https://github.com/nodejs/single-executable/issues/107
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-04-17 10:50:58 -03:00
Aditi
deddecce3a
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-04-17 10:50:47 -03:00
dependabot[bot]
998b2ae3cd
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-04-17 10:50:47 -03:00
Ian Kerins
14b2d496a0
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-04-16 03:29:18 -03:00