40335 Commits

Author SHA1 Message Date
Daniel Meechan
a9a477812e
doc: update Crypto API doc for x509.keyUsage
PR-URL: https://github.com/nodejs/node/pull/50603
Refs: https://github.com/nodejs/node/issues/48727
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2023-11-20 15:48:07 +00:00
Mattias Buelens
e870941fa4
test: enable idlharness tests for encoding
TextDecoderStream and TextEncoderStream are now exposed as globals,
so we can run the entire Encoding idlharness test suite.

PR-URL: https://github.com/nodejs/node/pull/50778
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-11-20 12:07:55 +00:00
Keyhan Vakil
5b73da02e5 build: add configuration flag to enable Maglev
This adds a configuration flag to enable V8's Maglev compiler.

Unfortunately compilation fails unless you have clang-14+ or gcc-13+,
but I sent a patch for that upstream. Other than that, it builds and all
tests pass locally on my x86-64 Linux machine.

The gn scraper regexes were broken preventing the compilation from
linking. Fix them. As a drive-by, also add additional conditionals for
compilation on 32-bit arm.

Refs: https://github.com/nodejs/node/issues/50690
PR-URL: https://github.com/nodejs/node/pull/50692
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-20 04:10:40 +00:00
Yagiz Nizipli
4cfc188f87
inspector: use private fields instead of symbols
PR-URL: https://github.com/nodejs/node/pull/50776
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-11-19 22:35:19 +00:00
Michaël Zasso
4db94c5023
src: iterate on import attributes array correctly
The array's length is supposed to be a multiple of two for dynamic
import callbacks.

Fixes: https://github.com/nodejs/node/issues/50700
PR-URL: https://github.com/nodejs/node/pull/50703
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-19 21:22:49 +00:00
Honza Machala
96890f6f33
test: replace forEach in whatwg-encoding-custom-interop
PR-URL: https://github.com/nodejs/node/pull/50607
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-19 20:29:56 +00:00
Tobias Nießen
48f32d71a5
src: avoid copying strings in FSPermission::Apply
The use of string_view and subsequent copying to a string was supposed
to be a minor optimization in 640a7918, however, since 413c16e4, no
string splitting occurs anymore. Therefore, we can simply pass around
some references instead of using string_view or copying strings.

Refs: https://github.com/nodejs/node/pull/48491
Refs: https://github.com/nodejs/node/pull/49047
PR-URL: https://github.com/nodejs/node/pull/50662
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-19 20:21:35 +00:00
Tobias Nießen
2059913f31
src: remove erroneous default argument in RadixTree
This default argument can never benefit any potential caller because any
call site that occurs after this definition will result in a compiler
error due to RadixTree::Lookup(const std::string_view&) now being an
ambiguous call target.

PR-URL: https://github.com/nodejs/node/pull/50736
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-19 14:15:35 +00:00
Filip Skokan
e0bbe8fd52 test: update WPT files for WebIDL tests
PR-URL: https://github.com/nodejs/node/pull/50712
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-11-19 07:36:31 +00:00
Filip Skokan
2aff5cf638 stream: yield expected Error class on zlib errors
PR-URL: https://github.com/nodejs/node/pull/50712
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-11-19 07:36:30 +00:00
Filip Skokan
61b7846431 stream: add Symbol.toStringTag to Compression Streams
PR-URL: https://github.com/nodejs/node/pull/50712
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-11-19 07:36:30 +00:00
Lei Shi
bae7e3831d
benchmark: increase the iteration number to an appropriate value
Current iteration number is too small that fwrite occupies large
portion of execution time which made crypo execution time measured
inaccurate. The iteration above 1e5 makes 50% higher and stable
score.

PR-URL: https://github.com/nodejs/node/pull/50766
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-11-19 06:33:59 +00:00
Jan
59ebf6d397
test: replace forEach() with for-loop
PR-URL: https://github.com/nodejs/node/pull/50596
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-18 19:09:30 +00:00
Ryan Zimmerman
724a233026
doc: fix fs.writeFileSync return value documentation
In https://github.com/nodejs/node/pull/50009, the return value was accidentally made part of `flush` option bullet point.

PR-URL: https://github.com/nodejs/node/pull/50760
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
2023-11-18 18:25:48 +00:00
Node.js GitHub Bot
a628ddaf9e
deps: update simdutf to 4.0.4
PR-URL: https://github.com/nodejs/node/pull/50772
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-18 13:47:21 +00:00
Joyee Cheung
4e23d6904c
benchmark: rewrite import.meta benchmark
This is a ESM benchmark, rewrite it so that we are directly
benchmarking the ESM import.meta paths and using number of
loads for op/s calculation, instead of doing it in startup
benchmarks and nesting number of process/workers spawn
for op/s calculation.

PR-URL: https://github.com/nodejs/node/pull/50683
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-11-18 00:46:42 +00:00
Joyee Cheung
8c7fe471fb
perf_hooks: implement performance.now() with fast API calls
PR-URL: https://github.com/nodejs/node/pull/50492
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2023-11-17 23:59:26 +00:00
Joyee Cheung
0e24f91457
test: improve test-bootstrap-modules.js
Divide builtins into two lists depending on whether
they are loaded before pre-execution or at run time,
and give clearer suggestions about how to deal with them
based on the category they are in.

This helps preventing regressions like the one reported
in https://github.com/nodejs/node/issues/45662.

PR-URL: https://github.com/nodejs/node/pull/50708
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-11-17 21:42:21 +00:00
Joyee Cheung
ce4642a5c2
test: skip parallel/test-macos-app-sandbox if disk space < 120MB
It needs to copy the Node.js binary which is currently almost
100MB. To be safe, skip the test when the available disk space
is smaller than 120MB.

PR-URL: https://github.com/nodejs/node/pull/50764
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-17 20:00:30 +00:00
Cheng Zhao
e5189cbf7e
build: fix GN configuration for deps/base64
PR-URL: https://github.com/nodejs/node/pull/50696
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2023-11-17 19:52:00 +00:00
Joyee Cheung
136742dff7 test: mark SEA tests as flaky on PowerPC
PR-URL: https://github.com/nodejs/node/pull/50750
Refs: https://github.com/nodejs/node/issues/50740
Refs: https://github.com/nodejs/reliability/issues/718
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-11-17 13:41:56 -05:00
Joyee Cheung
c5eb2c4190
test: give more time to GC in test-shadow-realm-gc-*
When --node-builtin-modules-path is used, we read and create
new strings for builtins in each realm which increases the memory
usage. As a result GC may not be able to keep up with the
allocation done in the loop in the test.

As a workaround, give GC a bit more time by waiting for a timer
in the loop.

PR-URL: https://github.com/nodejs/node/pull/50735
Refs: https://github.com/nodejs/node/issues/50726
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-11-17 16:09:30 +01:00
Jungku Lee
7a5c2d4be6
doc: update print results(detail) in PerformanceEntry
PR-URL: https://github.com/nodejs/node/pull/50723
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
2023-11-17 13:49:26 +00:00
Tobias Nießen
09c3bb15d7
permission: mark const functions as such
Otherwise, non-mutating functions such as is_tree_granted unnecessarily
require pointers to mutable data structures.

PR-URL: https://github.com/nodejs/node/pull/50705
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-11-17 12:04:45 +00:00
Chengzhong Wu
d1326e5b54
build: disable flag v8_scriptormodule_legacy_lifetime
Usages of `v8::ScriptOrModule` were removed in https://github.com/nodejs/node/pull/44198
so the flag can be disabled by default.

PR-URL: https://github.com/nodejs/node/pull/50616
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2023-11-17 03:55:33 +00:00
Yagiz Nizipli
416333fd50 module: merge config with package_json_reader
PR-URL: https://github.com/nodejs/node/pull/50322
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-11-17 00:16:39 +00:00
Yagiz Nizipli
f13dbfd43a src: move package resolver to c++
Co-authored-by: Daniel Lemire <daniel@lemire.me>
PR-URL: https://github.com/nodejs/node/pull/50322
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-11-17 00:16:38 +00:00
Yagiz Nizipli
4ec085b240 deps: add simdjson
PR-URL: https://github.com/nodejs/node/pull/50322
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-11-17 00:16:38 +00:00
kylo5aby
daf723affd
util: improve performance of normalizeEncoding
PR-URL: https://github.com/nodejs/node/pull/50721
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-11-16 20:53:38 +00:00
npm CLI robot
bfe32ec016
deps: upgrade npm to 10.2.4
PR-URL: https://github.com/nodejs/node/pull/50751
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2023-11-16 17:12:25 +00:00
Kumar Rishav
1e0b75c3df
tls: fix order of setting cipher before setting cert and key
Set the cipher list and cipher suite before anything else
because @SECLEVEL=<n> changes the security level and
that affects subsequent operations.

Fixes: https://github.com/nodejs/node/issues/36655
Fixes: https://github.com/nodejs/node/issues/49549
Refs: https://github.com/orgs/nodejs/discussions/49634
Refs: https://github.com/orgs/nodejs/discussions/46545
Refs: https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_security_level.html
PR-URL: https://github.com/nodejs/node/pull/50186
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2023-11-16 14:40:37 +00:00
Joyee Cheung
59b27d6990
benchmark: add misc/startup-cli-version benchmark
This benchmarks the startup of various CLI tools that are already
checked into the source code. We use --version because the output
tends to be minimal and fewer operations are done to generate
these so that the startup cost is still dominated by a more
indispensible part of the CLI.

PR-URL: https://github.com/nodejs/node/pull/50684
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-15 18:51:25 +00:00
Mert Can Altın
2d1bc3d130
doc: fix Buffer.allocUnsafe documentation
PR-URL: https://github.com/nodejs/node/pull/50686
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2023-11-15 14:51:25 +01:00
Michaël Zasso
86593e5267
tools: add workflow to update release links
Refs: https://github.com/nodejs/node/pull/50623
PR-URL: https://github.com/nodejs/node/pull/50710
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-11-15 13:36:43 +00:00
Markus Muschol
ff879cd493
test: replace foreach with for
PR-URL: https://github.com/nodejs/node/pull/50599
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-11-15 11:49:14 +00:00
Cheng Zhao
1d8483e713
tools: recognize GN files in dep_updaters
PR-URL: https://github.com/nodejs/node/pull/50693
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-11-15 04:37:09 +00:00
Joyee Cheung
5a94df4b53
benchmark: remove punycode from require-builtins fixture
It's now runtime-deprecated. Remove it from the benchmark. This
also gets rid of the warning emitted when the fixture is loaded.

PR-URL: https://github.com/nodejs/node/pull/50689
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-15 00:48:54 +00:00
github-actions[bot]
59a9e49f85
doc: run license-builder
PR-URL: https://github.com/nodejs/node/pull/50691
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-11-15 00:25:40 +00:00
Ulises Gascon
dfbca339b7 tools: remove unused file
PR-URL: https://github.com/nodejs/node/pull/50622
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-11-14 18:57:19 -05:00
Michaël Zasso
02db7fc2cd
2023-11-14, Version 21.2.0 (Current)
Notable changes:

doc:
  * add MrJithil to collaborators (Jithil P Ponnan) https://github.com/nodejs/node/pull/50666
  * add Ethan-Arrowood as a collaborator (Ethan Arrowood) https://github.com/nodejs/node/pull/50393
esm:
  * (SEMVER-MINOR) add import.meta.dirname and import.meta.filename (James Sumners) https://github.com/nodejs/node/pull/48740
fs:
  * add stacktrace to fs/promises (翠 / green) https://github.com/nodejs/node/pull/49849
lib:
  * (SEMVER-MINOR) add `--no-experimental-global-navigator` CLI flag (Antoine du Hamel) https://github.com/nodejs/node/pull/50562
  * (SEMVER-MINOR) add navigator.language & navigator.languages (Aras Abbasi) https://github.com/nodejs/node/pull/50303
  * (SEMVER-MINOR) add navigator.platform (Aras Abbasi) https://github.com/nodejs/node/pull/50385
stream:
  * (SEMVER-MINOR) add support for `deflate-raw` format to webstreams compression (Damian Krzeminski) https://github.com/nodejs/node/pull/50097
  * use Array for Readable buffer (Robert Nagy) https://github.com/nodejs/node/pull/50341
  * optimize creation (Robert Nagy) https://github.com/nodejs/node/pull/50337
test_runner:
  * (SEMVER-MINOR) adds built in lcov reporter (Phil Nash) https://github.com/nodejs/node/pull/50018
  * (SEMVER-MINOR) add Date to the supported mock APIs (Lucas Santos) https://github.com/nodejs/node/pull/48638
test_runner, cli:
  * (SEMVER-MINOR) add --test-timeout flag (Shubham Pandey) https://github.com/nodejs/node/pull/50443

PR-URL: https://github.com/nodejs/node/pull/50681
2023-11-14 19:00:59 +01:00
Keyhan Vakil
09f4aa9489
src: fix JSONParser leaking internal V8 scopes
JSONParser uses V8's JSON.parse (for now), meaning that its uses handles
and contexts. JSONParser was leaking its internal HandleScope and
Context::Scope.

Move the scope construction to the member functions to prevent those
scopes from leaking.

Refs: https://github.com/nodejs/node/pull/50680#discussion_r1390363367
PR-URL: https://github.com/nodejs/node/pull/50688
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-11-14 16:20:53 +00:00
Michaël Zasso
36ecf8ca65
deps: escape Python strings correctly
Fixes: https://github.com/nodejs/node/issues/50671
PR-URL: https://github.com/nodejs/node/pull/50695
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Jithil P Ponnan <jithil@outlook.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-14 14:19:00 +00:00
Jithil P Ponnan
eb46e09570
test: test streambase has already has a consumer
test: test streambase has already has a consumer
PR-URL: https://github.com/nodejs/node/pull/48059
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-14 21:05:18 +11:00
Ardi Nugraha
996d198101
src: return error --env-file if file is not found
PR-URL: https://github.com/nodejs/node/pull/50588
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-11-14 04:05:57 +00:00
Chengzhong Wu
fc2862b7f5
module: bootstrap module loaders in shadow realm
This bootstraps ESM loaders in the ShadowRealm with
`ShadowRealm.prototype.importValue` as its entry point and enables
loading ESM and CJS modules in the ShadowRealm. The module is imported
without a parent URL and resolved with the current process's working
directory.

PR-URL: https://github.com/nodejs/node/pull/48655
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-11-13 22:09:47 +08:00
legendecas
6b7197cb2b
module: remove useCustomLoadersIfPresent flag
The flag is always true and can be determined by isLoaderWorker solely.

PR-URL: https://github.com/nodejs/node/pull/48655
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-11-13 22:09:32 +08:00
legendecas
996239b0be
src: create per isolate proxy env template
PR-URL: https://github.com/nodejs/node/pull/48655
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-11-13 22:09:25 +08:00
legendecas
ddad46f4ac
src: create fs_dir per isolate properties
PR-URL: https://github.com/nodejs/node/pull/48655
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-11-13 22:09:22 +08:00
legendecas
1fcb461b27
src: create worker per isolate properties
PR-URL: https://github.com/nodejs/node/pull/48655
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-11-13 22:09:19 +08:00
legendecas
33dabbbd3d
src: make process binding data weak
Avoid the realm being strongly referenced by the process binding data.

PR-URL: https://github.com/nodejs/node/pull/48655
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-11-13 22:09:16 +08:00