Commit Graph

4946 Commits

Author SHA1 Message Date
Ethan Arrowood
e0ef622c54
fs: fix bufferSize option for opendir recursive
The bufferSize option was not respected in recursive mode. This PR
implements a naive solution to fix this issue until a better
implementation can be designed.

Fixes: https://github.com/nodejs/node/issues/48820
PR-URL: https://github.com/nodejs/node/pull/55744
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2024-11-08 16:03:55 +00:00
Antoine du Hamel
6af5c4e2b4
assert: differentiate cases where cause is undefined or missing
PR-URL: https://github.com/nodejs/node/pull/55738
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-11-08 01:01:09 +00:00
Antoine du Hamel
979526fd99
lib: prefer symbol to number in webidl type function
PR-URL: https://github.com/nodejs/node/pull/55737
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2024-11-07 23:21:50 +00:00
Gürgün Dayıoğlu
7788999ac1
lib: remove unnecessary optional chaining
PR-URL: https://github.com/nodejs/node/pull/55728
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-11-07 15:59:12 +00:00
Aviv Keller
0368f2f662
repl: runtime deprecate instantiating without new
PR-URL: https://github.com/nodejs/node/pull/54869
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2024-11-07 08:03:05 +00:00
Aviv Keller
c185e11623
util: do not catch on circular @@toStringTag errors
PR-URL: https://github.com/nodejs/node/pull/55544
Fixes: https://github.com/nodejs/node/issues/55539
Reviewed-By: James M Snell <jasnell@gmail.com>
Co-Authored-By: Colin Ihrig <cjihrig@gmail.com>
2024-11-06 10:57:15 +01:00
Edigleysson Silva (Edy)
4da8d110f3
assert: fix deepStrictEqual on errors when cause is not undefined
PR-URL: https://github.com/nodejs/node/pull/55406
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2024-11-06 00:45:05 +01:00
Jason Zhang
e53fe03a18
lib: implement webidl dictionary converter and use it in structuredClone
This commit provides a factory to generate `dictionaryConverter`
compliant with the spec. The implemented factory function is used for
the `structuredClone` algorithm with updated test cases.

PR-URL: https://github.com/nodejs/node/pull/55489
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-11-05 23:54:57 +01:00
Jason Zhang
270da88228
lib: prefer number to string in webidl type function
PR-URL: https://github.com/nodejs/node/pull/55489
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-11-05 23:54:56 +01:00
Joyee Cheung
8ab31402c1
module: simplify --inspect-brk handling
Previously in the CommonJS loader, --inspect-brk is implemented
checking whether the module points to the result of re-resolving
process.argv[1] to determine whether the module is the entry point.
This is unnecessarily complex, especially now that we store that
information in the module as kIsMainSymbol. This patch updates
it to simply check that symbol property instead.

PR-URL: https://github.com/nodejs/node/pull/55679
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-11-03 17:11:34 +00:00
Rod Vagg
7b01758ded
Revert "fs,win: fix bug in paths with trailing slashes"
This reverts commit 00b2f07f9d.

PR-URL: https://github.com/nodejs/node/pull/55527
Fixes: https://github.com/nodejs/node/issues/17801
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2024-11-02 16:24:29 +00:00
Stephen Belanger
51ae57673d
lib: make ALS default to AsyncContextFrame
PR-URL: https://github.com/nodejs/node/pull/55552
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-11-02 15:14:28 +00:00
Antoine du Hamel
c0db893f04
module: simplify findPackageJSON implementation
PR-URL: https://github.com/nodejs/node/pull/55543
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-11-02 15:13:23 +00:00
Giovanni Bucci
10cce655ca
assert: fix the string length check for printing the simple diff
PR-URL: https://github.com/nodejs/node/pull/55474
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2024-11-02 15:12:12 +00:00
Filip Skokan
4bf5731fa8
src: refactor ECDHBitsJob signature
PR-URL: https://github.com/nodejs/node/pull/55610
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2024-11-02 12:36:09 +00:00
RafaelGSS
2d6f9c613c src,lib: optimize nodeTiming.uvMetricsInfo
PR-URL: https://github.com/nodejs/node/pull/55614
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2024-11-01 13:35:12 -03:00
Aviv Keller
9b6cea6ebe
test_runner: pass options directly to TestCoverage
PR-URL: https://github.com/nodejs/node/pull/55578
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
2024-11-01 14:20:19 +00:00
Antoine du Hamel
e2bd64ddfe
url: refactor pathToFileURL to native
PR-URL: https://github.com/nodejs/node/pull/55476
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-10-31 21:11:27 +00:00
Orgad Shaneh
f67e45e070
http2: fix client async storage persistence
Create and store an AsyncResource for each stream, following a similar
approach as used in HttpAgent.

Fixes: https://github.com/nodejs/node/issues/55376
PR-URL: https://github.com/nodejs/node/pull/55460
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2024-10-31 17:08:45 +00:00
Joyee Cheung
d080f0db1f
module: unify TypeScript and .mjs handling in CommonJS
This refactors the CommonJS loading a bit to create a center point
that handles source loading (`loadSource`) and make format detection
more consistent to pave the way for future synchronous hooks.

- Handle .mjs in the .js handler, similar to how .cjs has been handled.
- Generate the legacy ERR_REQUIRE_ESM in a getRequireESMError() for
  both .mts and require(esm) handling (when it's disabled).

PR-URL: https://github.com/nodejs/node/pull/55590
Refs: https://github.com/nodejs/loaders/pull/198
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2024-10-31 15:43:57 +00:00
Joyee Cheung
8aac7da7d6
module: fix error thrown from require(esm) hitting TLA repeatedly
This tracks the asynchronicity in the ModuleWraps when they turn out to
contain TLA after instantiation, and throw the right error
(ERR_REQUIRE_ASYNC_MODULE) when it's required again. It removes
the freezing of ModuleWraps since it's not meaningful to freeze
this when the rest of the module loader is mutable, and we
can record the asynchronicity in the ModuleWrap right after
compilation after we get a V8 upgrade that contains
v8::Module::HasTopLevelAwait() instead of searching through
the module graph repeatedly which can be slow.

PR-URL: https://github.com/nodejs/node/pull/55520
Fixes: https://github.com/nodejs/node/issues/55516
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2024-10-29 21:15:19 +00:00
Joyee Cheung
3b3a95ac0c module: trim off internal stack frames for require(esm) warnings
Trim off irrelevant internal stack frames for require(esm) warnings
so it's easier to locate where the call comes from when
--trace-warnings is used.

PR-URL: https://github.com/nodejs/node/pull/55496
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2024-10-29 18:29:27 +01:00
Joyee Cheung
7cb3a662da
module: allow ESM that failed to be required to be re-imported
When a ESM module cannot be loaded by require due to the presence
of TLA, its module status would be stopped at kInstantiated. In
this case, when it's imported again, we should allow it to be
evaluated asynchronously, as it's also a common pattern for users
to retry with dynamic import when require fails.

PR-URL: https://github.com/nodejs/node/pull/55502
Fixes: https://github.com/nodejs/node/issues/55500
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-28 12:21:22 +00:00
Antoine du Hamel
7270f84596
fs: make dirent.path writable
PR-URL: https://github.com/nodejs/node/pull/55547
Refs: https://github.com/nodejs/node/issues/55538
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-28 08:33:39 +00:00
Jacob Smith
e312d60e3f
module: add findPackageJSON util
PR-URL: https://github.com/nodejs/node/pull/55412
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-10-25 20:40:54 +00:00
Marco Ippolito
53b1050e6f
module: add module.stripTypeScriptTypes
PR-URL: https://github.com/nodejs/node/pull/55282
Fixes: https://github.com/nodejs/node/issues/54300
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-10-24 18:27:58 +00:00
Pietro Marchini
025d8ada5f
lib: ensure FORCE_COLOR forces color output in non-TTY environments
PR-URL: https://github.com/nodejs/node/pull/55404
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-10-23 06:51:50 +00:00
Joyee Cheung
dacbfb1657
module: include module information in require(esm) warning
When emitting the experimental warning for `require(esm)`, include
information about the parent module and the module being require()-d
to help users locate and update them.

PR-URL: https://github.com/nodejs/node/pull/55397
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-10-22 16:51:45 +00:00
Marvin ROGER
4a00f9a1c4
stream: propagate AbortSignal reason
PR-URL: https://github.com/nodejs/node/pull/55473
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-10-22 16:14:02 +00:00
Antoine du Hamel
603e55d94d
esm: add a fallback when importer in not a file
PR-URL: https://github.com/nodejs/node/pull/55471
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-10-22 18:09:32 +02:00
Aviv Keller
7ae73b90d4
fs: pass correct path to DirentFromStats during glob
PR-URL: https://github.com/nodejs/node/pull/55071
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2024-10-22 11:38:09 +00:00
Aviv Keller
ee46d2297c
Revert "path: fix bugs and inconsistencies"
This reverts commit efbba60e5b.

PR-URL: https://github.com/nodejs/node/pull/55414
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-21 07:10:47 +00:00
Marco Ippolito
b0ffe9ed35
module: simplify ts under node_modules check
PR-URL: https://github.com/nodejs/node/pull/55440
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-10-20 09:09:56 +00:00
Juan José
61e52c8bd3
src,lib: introduce util.getSystemErrorMessage(err)
This patch adds a new utility function which provides human-readable
string description of the given system error code.

Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-10-19 23:15:16 +00:00
Gürgün Dayıoğlu
8ed50bcbe5
lib: remove startsWith/endsWith primordials for char checks
PR-URL: https://github.com/nodejs/node/pull/55407
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2024-10-19 10:18:10 +00:00
Yagiz Nizipli
bb8cc65edb
lib: replace createDeferredPromise util with Promise.withResolvers
PR-URL: https://github.com/nodejs/node/pull/54836
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-10-19 10:13:58 +02:00
Antoine du Hamel
7ae193d19f
url: handle "unsafe" characters properly in pathToFileURL
Co-authored-by: EarlyRiser42 <tkfydtls464@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54545
Fixes: https://github.com/nodejs/node/issues/54515
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-10-18 07:20:43 +00:00
Erick Wendel
f772040507 test_runner: mark mockTimers as stable
PR-URL: https://github.com/nodejs/node/pull/55398
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-17 21:24:40 +00:00
Giovanni Bucci
4d6d7d644b
assert: make assertion_error use Myers diff algorithm
Fixes: https://github.com/nodejs/node/issues/51733

Co-Authored-By: Pietro Marchini <pietro.marchini94@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54862
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-10-17 16:02:54 +00:00
theanarkh
cf7406927f
lib: add flag to drop connection when running in cluster mode
PR-URL: https://github.com/nodejs/node/pull/54927
Refs: https://github.com/nodejs/node/issues/54882
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-10-17 15:11:41 +00:00
Erick Wendel
2545b9e02c
test_runner: add support for scheduler.wait on mock timers
This adds support for nodetimers.promises.scheduler.wait on Mocktimers

Refs: https://github.com/nodejs/node/pull/55244
PR-URL: https://github.com/nodejs/node/pull/55244
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-10-15 20:36:09 +00:00
Wei Zhu
c0aebed4b3
esm: fix inconsistency with importAssertion in resolve hook
As the documentation states, the `context.importAssertion` should be
still supported and emit a warning. This is true for the `load` hook,
but not correct for context of the `resolve` hook.

This commit fixes the inconsistency.

PR-URL: https://github.com/nodejs/node/pull/55365
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-10-15 21:02:07 +02:00
BadKey
5e76c40b27
lib: test_runner#mock:timers respeced timeout_max behaviour
PR-URL: https://github.com/nodejs/node/pull/55375
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
2024-10-15 13:43:24 +00:00
Edigleysson Silva (Edy)
7a7c2b3d09
lib: remove settled dependant signals when they are GCed
PR-URL: https://github.com/nodejs/node/pull/55354
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-14 20:33:41 +00:00
Aviv Keller
10addb0a20
test_runner: require --enable-source-maps for sourcemap coverage
PR-URL: https://github.com/nodejs/node/pull/55359
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-10-14 13:19:17 +00:00
Robert Nagy
488ce99d76
events: optimize EventTarget.addEventListener
PR-URL: https://github.com/nodejs/node/pull/55312
Fixes: https://github.com/nodejs/node/issues/55311
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-10-14 10:24:32 +00:00
Jason Zhang
50b4ada551
lib: convert transfer sequence to array in js
This commit lets `tranfer` passed to `structuredClone` get validated at
JS layer by doing webidl conversion. This avoids the C++ to JS function
call overhead in the native implementaiton of `structuredClone`

PR-URL: https://github.com/nodejs/node/pull/55317
Fixes: https://github.com/nodejs/node/issues/55280
Refs: https://github.com/nodejs/node/pull/50330
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2024-10-13 18:11:21 +00:00
Xuguang Mei
ac49b20c75
assert: fix deepEqual always return true on URL
PR-URL: https://github.com/nodejs/node/pull/50853
Fixes: https://github.com/nodejs/node/issues/50836
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2024-10-13 14:01:47 +00:00
Nicolò Ribaudo
d881fcba86
esm: mark import attributes and JSON module as stable
The two proposals reached stage 4 at the October 2024 meeting.

PR-URL: https://github.com/nodejs/node/pull/55333
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-12 11:21:09 +00:00
Marco Ippolito
90f56dbad9
module: throw ERR_NO_TYPESCRIPT when compiled without amaro
PR-URL: https://github.com/nodejs/node/pull/55332
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-10-11 15:41:38 +00:00