This commit refactors the CommonJS loader to remove TypeScript-specific
extensions from the require.extensions object for compatibility with
libraries that depended on it to initialize extenal TypeScript loaders.
PR-URL: https://github.com/nodejs/node/pull/58657
Refs: https://github.com/nodejs/typescript/issues/37
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Added serialization and deserialization support for `DOMException`.
Co-Authored-By: jazelly <xzha4350@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58649
Fixes: https://github.com/nodejs/node/issues/49181
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58669
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58602
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
PR-URL: https://github.com/nodejs/node/pull/58537
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
When --import is used, the ESM loader is used to handle even pure
CJS entry points, and it can run into CJS module facades in the
evaluating state when the parent CJS module is being evaluated.
In this case it should be allowed, since the ESM <-> CJS cycles
that are meant to be disallowed (for the time being) should
already be detected before evaluation and wouldn't get here,
and CJS <-> CJS cycles are fine.
PR-URL: https://github.com/nodejs/node/pull/58598
Fixes: https://github.com/nodejs/node/issues/58515
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Split indirect eval import tests as they depends on the JS stack to
resolve the referrer.
PR-URL: https://github.com/nodejs/node/pull/58637
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58580
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: https://github.com/nodejs/node/pull/58629
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Calling `url.parse()` with a URL that has a bad port
will now throw an error instead of emitting a deprecation
warning. It's been deprecated for ~ 3 years now.
PR-URL: https://github.com/nodejs/node/pull/58617
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
It's been "pending" deprecation since 6.12.0.
I think that's long enough.
PR-URL: https://github.com/nodejs/node/pull/58620
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/58614
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: https://github.com/nodejs/node/pull/58604
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This change skips asserting the exit code of the child process with the
corrupted async hooks stack only on those platforms where termination
via a signal has been observed.
Refs: https://github.com/nodejs/node/pull/58478#discussion_r2132170010
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58601
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58597
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Upstream libuv commits:
bb706f5fe7018363a163
libuv was updated to 1.51.0 in 0315283cbdb7745c7e35bb49ac48b0ebcadcb228.
v1.51.0 was the release updating from c90 to c11.
The standard was back then also updated from c89 to c90. and C89 was
never an official standard to begin with. So, I wonder how this managed
to stay without breaking anyone's builds for this long. This atleast
breaks the builds for Android using NDK r28b and r28a, as LLONG_MAX is
not defined by the Clang compiler for older C standards.
Fixes:
../../deps/uv/src/unix/linux.c:2331:36:
error: use of undeclared identifier 'LLONG_MAX'
2331 | constraint->quota_per_period = LLONG_MAX;
| ^
1 error generated.
PR-URL: https://github.com/nodejs/node/pull/58587
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
move the logic in `cpSync` that copies a directory from
src to dest from JavaScript to C++ increasing its performance
Note: this improvement is not applied if the filter option is
provided, such optimization will be looked into separately
PR-URL: https://github.com/nodejs/node/pull/58461
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit automatically includes in the allow-fs-read
list all the app's entrypoints.
`--require` and user entry point
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/58579
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57269
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>