Guy Bedford
fa9a9e9c69
esm: unflag --experimental-wasm-modules
...
PR-URL: https://github.com/nodejs/node/pull/57038
Backport-PR-URL: https://github.com/nodejs/node/pull/59179
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-08-27 00:55:20 +02:00
Guy Bedford
177ed3b3dd
esm: js-string Wasm builtins in ESM Integration
...
PR-URL: https://github.com/nodejs/node/pull/59020
Backport-PR-URL: https://github.com/nodejs/node/pull/59179
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-08-27 00:55:18 +02:00
Joyee Cheung
3375a6cfee
test: deflake sequential/test-tls-session-timeout
...
This patch:
- Splits the validation tests into a separate file and keep the
test focus on functional test of the sessionTimeout option.
- Increase the testing timeout to 5 seconds in case it takes too
long for the first connection to complete and the session is
already expired when the second connection is started.
- Use a specific `sessionIdContext` to ensure stable session ID.
- Fix the s_client arguments by specifying CA file and server name.
- Do not use the serialized session ticket for the first connection.
That was genearted years ago and may not work in different OpenSSL
versions. Let the first fresh connection generate the ticket.
- Use random port instead of the common port.
- Add a timeout before the second connection to ensure session ticket
is properly written.
- Log information to faciliate debugging.
PR-URL: https://github.com/nodejs/node/pull/59423
Fixes: https://github.com/nodejs/node/issues/26839
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com >
2025-08-26 11:22:42 +02:00
theanarkh
264a838779
lib: add trace-sigint APIs
...
PR-URL: https://github.com/nodejs/node/pull/59040
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-08-26 11:22:42 +02:00
Joyee Cheung
8e2076a24f
cli: add NODE_USE_SYSTEM_CA=1
...
Similar to how NODE_USE_ENV_PROXY complements --use-env-proxy, this
complements --use-system-ca. This will allow the setting to be
applied to workers individually in the future.
PR-URL: https://github.com/nodejs/node/pull/59276
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-08-26 11:22:41 +02:00
Joyee Cheung
3366e60bd9
src: use simdjson to parse SEA configuration
...
PR-URL: https://github.com/nodejs/node/pull/59323
Refs: https://github.com/nodejs/node/issues/59288
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2025-08-26 11:22:41 +02:00
Shelley Vohr
8dd09267e3
test,crypto: skip unsupported ciphers
...
PR-URL: https://github.com/nodejs/node/pull/59388
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2025-08-26 11:22:41 +02:00
Miguel Marcondes Filho
9254257fc0
lib: restructure assert to become a class
...
PR-URL: https://github.com/nodejs/node/pull/58253
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-08-26 11:22:39 +02:00
lluisemper
8e697d1884
zlib: add dictionary support to zstdCompress and zstdDecompress
...
Adds optional dictionary support to zlib’s zstdCompress and
zstdDecompress APIs. This enables better compression ratios when the
dictionary matches expected input structure or content patterns.
The implementation allows passing a `dictionary` buffer through the
options object. Support was added to both streaming and convenience
methods. Tests and documentation were also updated to reflect this new
capability.
Fixes: https://github.com/nodejs/node/issues/59105
PR-URL: https://github.com/nodejs/node/pull/59240
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-08-26 11:22:38 +02:00
Haram Jeong
390a9dc20b
http: add server.keepAliveTimeoutBuffer option
...
PR-URL: https://github.com/nodejs/node/pull/59243
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
2025-08-26 11:22:38 +02:00
Filip Skokan
438cb11a15
test: update WPT resources,WebCryptoAPI,webstorage
...
PR-URL: https://github.com/nodejs/node/pull/59311
Refs: https://github.com/nodejs/node/issues/58987
Refs: https://github.com/nodejs/node/issues/59310
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-08-26 11:22:38 +02:00
Rafael Gonzaga
946eab8d77
lib: handle superscript variants on windows device
...
Windows recognizes the 8-bit [ISO/IEC 8859-1](https://en.wikipedia.org/wiki/ISO/IEC_8859-1 )
superscript digits ¹, ², and ³ as digits and treats them as
valid parts of COM# and LPT# device names, making them reserved
in every directory.
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
PR-URL: https://github.com/nodejs/node/pull/59261
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-08-26 11:22:37 +02:00
James M Snell
68bec19f76
test: add known issue test for fs.cpSync dereference bug
...
Refs: https://github.com/nodejs/node/issues/58939
PR-URL: https://github.com/nodejs/node/pull/58941
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-08-26 11:22:37 +02:00
Ethan Arrowood and Luigi Pinca
a100cce379
test: deflake stream-readable-to-web test
...
Co-authored-by: Luigi Pinca <luigipinca@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/58948
Fixes: https://github.com/nodejs/node/issues/58949
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
2025-08-26 11:22:36 +02:00
Chengzhong Wu
a28e5f0938
lib: add type names in source mapped stack traces
...
The type name is determined by the constructor name of the receiver in a
call site.
PR-URL: https://github.com/nodejs/node/pull/58976
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-08-26 11:22:36 +02:00
Sylphy-0xd3ac
4619fe0e04
fs: fix glob TypeError on restricted dirs
...
When a directory cannot be read due to permission issues, the async
version of fs.glob() returns null from readdir(), while the sync
version returns an empty array. This causes a TypeError when trying
to access the 'length' property of null.
PR-URL: https://github.com/nodejs/node/pull/58674
Fixes: https://github.com/nodejs/node/issues/58670
Fixes: https://github.com/nodejs/node/issues/58276
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ethan-Arrowood <ethan@arrowood.dev >
Reviewed-By: Juan José <soyjuanarbol@gmail.com >
2025-08-26 11:22:36 +02:00
Alex Yang
ad2089e32d
fs: correct error message when FileHandle is transferred
...
PR-URL: https://github.com/nodejs/node/pull/59156
Fixes: https://github.com/nodejs/node/issues/59155
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2025-08-26 11:22:34 +02:00
Darshan Sen
659002359d
http2: set Http2Stream#sentHeaders for raw headers
...
When https://github.com/nodejs/node/pull/57917 added support for sending
raw header arrays, Http2Stream#sentHeaders was set only for header
objects. This change also sets it for raw headers by lazily
instantiating the property to avoid any performance impact on the fast
path.
Signed-off-by: Darshan Sen <raisinten@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/59244
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-08-26 11:22:34 +02:00
Yoo
409c66d328
doc: fix typo in test/common/README.md
...
Corrects the misspelling of "unmask" to "umask"
PR-URL: https://github.com/nodejs/node/pull/59180
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-08-25 17:02:57 +02:00
Shima Ryuhei
b7577d853b
test: make test-inspector-network-resource sequential
...
PR-URL: https://github.com/nodejs/node/pull/59104
Refs: https://github.com/nodejs/node/issues/59090
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com >
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com >
2025-08-25 17:02:56 +02:00
theanarkh
491f390515
worker: add cpuUsage for worker
...
PR-URL: https://github.com/nodejs/node/pull/59177
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com >
2025-08-25 17:02:56 +02:00
Paolo Insogna
035da74c31
process: add threadCpuUsage
...
PR-URL: https://github.com/nodejs/node/pull/56467
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-08-25 17:02:49 +02:00
Meghan Denny
667ee82443
test: don't use expose internals in test-http-outgoing-buffer.js
...
PR-URL: https://github.com/nodejs/node/pull/59219
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2025-08-20 17:19:09 +02:00
Joyee Cheung
0eec5cc492
module: fix conditions override in synchronous resolve hooks
...
1. Make sure that the conditions are converted into arrays when
being passed into user hooks.
2. Pass the conditions from user hooks into the ESM resolution
so that it takes effect.
PR-URL: https://github.com/nodejs/node/pull/59011
Fixes: https://github.com/nodejs/node/issues/59003
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2025-08-20 17:11:45 +02:00
Joyee Cheung
4acf7cd6d3
module: throw error when re-runing errored module jobs
...
Re-evaluating an errored ESM should lead to rejecting
the rejection again - this is also the case when importing
it twice. In the case of retrying with
require after import, just throw the cached error.
Drive-by: add some debug logs.
PR-URL: https://github.com/nodejs/node/pull/58957
Fixes: https://github.com/nodejs/node/issues/58945
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-08-20 16:23:54 +02:00
Sungwon
feec26d3bb
test: use mustSucceed in test-fs-read
...
This commit refactors the callback in test/parallel/test-fs-read.js
to use common.mustSucceed() instead of common.mustCall().
common.mustSucceed() is the preferred helper for standard error-first
callbacks that are expected to succeed, as it provides an explicit
check that the `err` argument is null. This improves the clarity
and robustness of the test.
PR-URL: https://github.com/nodejs/node/pull/59204
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-08-04 13:35:57 +02:00
Richard Lau
d7e23769ab
test: prepare test-crypto-rsa-dsa for newer OpenSSL
...
Update `parallel/test-crypto-rsa-dsa` to prepare for updating
`deps/openssl` to later versions of OpenSSL which support implicit
rejections with `RSA_PKCS1_PADDING`.
PR-URL: https://github.com/nodejs/node/pull/58100
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2025-08-04 13:35:56 +02:00
Alex Yang
3a9aca91c6
test: fix flaky test-worker-message-port-transfer-filehandle test
...
PR-URL: https://github.com/nodejs/node/pull/59158
Fixes: https://github.com/nodejs/node/issues/59145
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-08-04 13:35:56 +02:00
Allon Murienik
74e1aa4d06
process: make execve's args argument optional
...
Align the code with the documentation and similar methods used to
execute os commands - the `args` argument should be optional, and if
omitted, treated as an empty array (`[]`).
Fixes: https://github.com/nodejs/node/issues/58411
PR-URL: https://github.com/nodejs/node/pull/58412
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Richard Lau <richard.lau@ibm.com >
2025-08-04 13:35:56 +02:00
Haram Jeong
e592d739c2
cli: support ${pid} placeholder in --cpu-prof-name
...
PR-URL: https://github.com/nodejs/node/pull/59072
Fixes: https://github.com/nodejs/node/issues/57418
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-08-04 13:35:54 +02:00
Alex Yang and Jordan Harband
e22dddf859
util: respect nested formats in styleText
...
Co-authored-by: Jordan Harband <ljharb@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/59098
Fixes: https://github.com/nodejs/node/issues/59035
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2025-08-04 13:35:54 +02:00
Anna Henningsen
3aee7625b9
test: expand linting rules around assert w literal messages
...
Expands the existing restrictions around not using literal messages
to the `not` variants of `strictEqual` and `deepStrictEqual`, and
forbids `assert()` where the second argument is a non-string literal,
which almost always is a mis-typed `assert.strictEquals()`.
PR-URL: https://github.com/nodejs/node/pull/59147
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-08-04 13:35:53 +02:00
René
8d60602677
perf_hooks: do not expose SafeMap via Histogram wrapper
...
PR-URL: https://github.com/nodejs/node/pull/59094
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-08-04 13:35:52 +02:00
Node.js GitHub Bot
667c2ced38
test: update WPT for WebCryptoAPI to ab08796857
...
PR-URL: https://github.com/nodejs/node/pull/59129
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-08-04 13:35:52 +02:00
Node.js GitHub Bot
89ac344393
test: update WPT for WebCryptoAPI to 19d82c57ab
...
PR-URL: https://github.com/nodejs/node/pull/59129
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-08-04 13:35:51 +02:00
Abdirahim Musse
d332957ac6
test: skip tests that cause timeouts on IBM i
...
I missed marking a couple of test cases flaky in my previous PR:
https://github.com/nodejs/node/pull/58583
tests missed were:
- parallel.test-inspector-network-content-type
- benchmark.test-benchmark-websocket
After marking the above flaky I re-ran a test build and noticed
the build still failed.
Unfortuantely the build still fails because the build detects that
node process are left behind after the tests, presumably because tests
that spawn child processes are being timed out and only the parent
process is killed off, leaving the child processes behind.
see: https://github.com/nodejs/node/pull/59014#issuecomment-3057162303
We've decided to skip these tests until the underlying issue is
resolved.
The tests being skipped are:
- parallel.test-http-proxy-fetch
- parallel.test-https-proxy-fetch
- benchmark.test-benchmark-websocket
- parallel.test-inspector-network-fetch
- parallel.test-inspector-network-content-type
- es-module.test-wasm-web-api
- parallel.test-fetch
- parallel.test-without-async-context-frame
- report.test-report-exclude-network
PR-URL: https://github.com/nodejs/node/pull/59014
Reviewed-By: Richard Lau <richard.lau@ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2025-08-04 13:35:50 +02:00
Dario Piotrowicz
a23562ff72
test: update startCLI to set --port=0 by default
...
update the `startCLI` debugging testing utility to set by default
the port to use to `0` (i.e. a random port)
PR-URL: https://github.com/nodejs/node/pull/59042
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-08-04 13:35:50 +02:00
Joyee Cheung
cda1dab6e2
crypto: add tls.setDefaultCACertificates()
...
This API allows dynamically configuring CA certificates that
will be used by the Node.js TLS clients by default.
Once called, the provided certificates will become the default CA
certificate list returned by `tls.getCACertificates('default')` and
used by TLS connections that don't specify their own CA certificates.
This function only affects the current Node.js thread.
PR-URL: https://github.com/nodejs/node/pull/58822
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2025-08-04 13:29:04 +02:00
Joyee Cheung
4a12f5d83b
test: mark test-inspector-network-fetch as flaky on Windows
...
PR-URL: https://github.com/nodejs/node/pull/59091
Refs: https://github.com/nodejs/node/issues/59090
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2025-08-04 13:29:04 +02:00
Antoine du Hamel
d0f40f3a3a
tools,test: enforce best practices to detect never settling promises
...
PR-URL: https://github.com/nodejs/node/pull/58992
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-08-04 13:29:04 +02:00
Antoine du Hamel
cb08a5d43f
doc: add missing <code> blocks
...
PR-URL: https://github.com/nodejs/node/pull/58995
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2025-08-04 12:25:31 +02:00
theanarkh
1f184513e9
dns: support max timeout
...
PR-URL: https://github.com/nodejs/node/pull/58440
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-08-04 12:25:31 +02:00
Shima Ryuhei
d02831ef73
inspector: initial support for Network.loadNetworkResource
...
Fixes: https://github.com/nodejs/node/issues/57873
PR-URL: https://github.com/nodejs/node/pull/58077
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-08-04 12:25:23 +02:00
Dario Piotrowicz
ac4f7aa69c
test: add missing port=0 arg in test-debugger-extract-function-name
...
PR-URL: https://github.com/nodejs/node/pull/58977
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-08-04 11:54:30 +02:00
alphaleadership
f57ee3d71f
net: update net.blocklist to allow file save and file management
...
PR-URL: https://github.com/nodejs/node/pull/58087
Fixes: https://github.com/nodejs/node/issues/56252
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-08-04 11:54:30 +02:00
James M Snell
66fccc252b
test: add test for async disposable worker thread
...
PR-URL: https://github.com/nodejs/node/pull/58385
Backport-PR-URL: https://github.com/nodejs/node/pull/58455
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-07-28 11:07:46 +02:00
Joyee Cheung
a381b4d990
src: remove fast API for InternalModuleStat
...
There are several motivation for removing this:
1. The implementation does not align with InternalModuleStat,
most noticably it does not namespace the path or convert
it to UTF-16 before using it with std::filesystem::path
on Windows which could crash on non-English locale.
2. It needs the Environment - if not for decoding the string,
at least for env->exec_path() to resolve the path for
namespacing - and therefore needs a handle to the Context
which requires a handle scope which actually makes the
fast API version slower than the normal binding.
For simplicity this just removes the fast API to fix the bug and
improve the performance.
PR-URL: https://github.com/nodejs/node/pull/58489
Backport-PR-URL: https://github.com/nodejs/node/pull/59065
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-07-28 08:58:31 +02:00
Yagiz Nizipli
390654e996
src: fix internalModuleStat v8 fast path
...
PR-URL: https://github.com/nodejs/node/pull/58054
Backport-PR-URL: https://github.com/nodejs/node/pull/59065
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-07-28 08:58:22 +02:00
Marco Ippolito
2fc89892ab
module: fix typescript import.meta.main
...
PR-URL: https://github.com/nodejs/node/pull/58661
Backport-PR-URL: https://github.com/nodejs/node/pull/58693
Fixes: https://github.com/nodejs/node/issues/58660
Reviewed-By: Xuguang Mei <meixuguang@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-07-28 08:46:20 +02:00
Joe and Antoine du Hamel
430e66b9b8
esm: implement import.meta.main
...
Boolean value to check if an ES Module is the entrypoint of the
current process.
Implements: #57226
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/57804
Backport-PR-URL: https://github.com/nodejs/node/pull/58693
Fixes: https://github.com/nodejs/node/issues/57226
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2025-07-28 08:46:16 +02:00