Yagiz Nizipli
769823e57c
src: add built-in .env file support
...
PR-URL: https://github.com/nodejs/node/pull/48890
Refs: https://github.com/orgs/nodejs/discussions/44975
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2023-08-17 14:08:05 +00:00
Guy Bedford
ee8b7f1f18
esm: unflag import.meta.resolve
...
PR-URL: https://github.com/nodejs/node/pull/49028
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2023-08-13 05:42:25 +00:00
Chengzhong Wu
c47ea21685
bootstrap: hide experimental web globals with flag kNoBrowserGlobals
...
Do not install experimental web globals when the environment is
initialized with embedder flag
`node::EnvironmentFlags::kNoBrowserGlobals`.
PR-URL: https://github.com/nodejs/node/pull/48545
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2023-07-05 07:02:59 +00:00
Raz Luvaton
99881304c4
test_runner: add shards support
...
PR-URL: https://github.com/nodejs/node/pull/48639
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-07-05 03:57:28 +00:00
Yagiz Nizipli
640a791831
src: refactor SplitString in util
...
PR-URL: https://github.com/nodejs/node/pull/48491
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-06-22 22:23:28 +00:00
cjihrig
b31d587dc8
test_runner: support combining coverage reports
...
This commit adds support for combining code coverage reports
in the test runner. This allows coverage to be collected for
child processes, and by extension, the test runner CLI.
PR-URL: https://github.com/nodejs/node/pull/47686
Fixes: https://github.com/nodejs/node/issues/47669
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-04-28 13:13:53 +00:00
Joyee Cheung
491a5c968f
sea: use JSON configuration and blob content for SEA
...
PR-URL: https://github.com/nodejs/node/pull/47125
Refs: https://github.com/nodejs/single-executable/discussions/58
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2023-04-09 18:31:15 +00:00
Paolo Insogna and Antoine du Hamel
8b51c1a869
net: enable autoSelectFamily by default
...
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/46790
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-04-05 08:31:56 -07:00
Michael Dawson
978b57d750
wasi: no longer require flag to enable wasi
...
- no longer require flag to enable experimental wasi feature
- wasi is still documented as experimental
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/47286
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2023-03-30 15:54:12 -04:00
Steve Herzog
334bb179df
test_runner: support defining test reporter in NODE_OPTIONS
...
Adds --test-reporter and --test-reporter-destination as
allowable options in NODE_OPTIONS. Also adds the CLI flag
--test-child-process to allow forcing the default
test-reporter for inter-process communication.
Fixes: https://github.com/nodejs/node/issues/46484
PR-URL: https://github.com/nodejs/node/pull/46688
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-03-14 16:59:35 +00:00
Rafael Gonzaga
00c222593e
src,process: add permission model
...
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
PR-URL: https://github.com/nodejs/node/pull/44004
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2023-02-23 18:11:51 +00:00
Darshan Sen
9bbde3d7ba
src: add initial support for single executable applications
...
Compile a JavaScript file into a single executable application:
```console
$ echo 'console.log(`Hello, ${process.argv[2]}!`);' > hello.js
$ cp $(command -v node) hello
$ npx postject hello NODE_JS_CODE hello.js \
--sentinel-fuse NODE_JS_FUSE_fce680ab2cc467b6e072b8b5df1996b2
$ npx postject hello NODE_JS_CODE hello.js \
--sentinel-fuse NODE_JS_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \
--macho-segment-name NODE_JS
$ ./hello world
Hello, world!
```
Signed-off-by: Darshan Sen <raisinten@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/45038
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2023-02-18 02:49:18 +00:00
Anna Henningsen
bfadee5e68
src: allow snapshotting from the embedder API
...
PR-URL: https://github.com/nodejs/node/pull/45888
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2023-02-03 20:48:24 +00:00
Anna Henningsen
02fad4f40a
src: make build_snapshot a per-Isolate option, rather than a global one
...
PR-URL: https://github.com/nodejs/node/pull/45888
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2023-02-03 20:48:23 +00:00
José Dapena Paz
b88628c7df
src: add support for ETW stack walking
...
V8 supports native stack walking in Windows by providing JIT code
information to ETW (Event Tracing for Windows). But the option to
enable it is not exposed in NodeJS.
Just add command line (and environment variable) support for
--enable-etw-stack-walking, that maps to V8 option of the same name.
Fixes: https://github.com/nodejs/node/issues/46202
PR-URL: https://github.com/nodejs/node/pull/46203
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2023-01-24 19:16:04 +00:00
cjihrig
1ecc03eccd
doc,lib,src,test: rename --test-coverage
...
Add experimental to the name as requested during review.
PR-URL: https://github.com/nodejs/node/pull/46017
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2023-01-08 16:10:00 -05:00
cjihrig
8c95cb012b
test_runner: add initial code coverage support
...
This commit adds code coverage functionality to the node:test
module. When node:test is used in conjunction with the new
--test-coverage CLI flag, a coverage report is created when
the test runner finishes. The coverage summary is forwarded to
any test runner reporters so that the display can be customized
as desired. This new functionality is compatible with the
existing NODE_V8_COVERAGE environment variable as well.
There are still several limitations, which will be addressed in
subsequent pull requests:
- Coverage is only reported for a single process. It is possible
to merge coverage reports together. Once this is done, the
--test flag will be supported as well.
- Source maps are not currently supported.
- Excluding specific files or directories from the coverage
report is not currently supported. Node core modules and
node_modules/ are excluded though.
PR-URL: https://github.com/nodejs/node/pull/46017
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2023-01-08 16:09:41 -05:00
Moshe Atlow
11e7858553
assert: remove assert.snapshot
...
PR-URL: https://github.com/nodejs/node/pull/46112
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-01-07 20:24:24 +00:00
Paolo Insogna
05975d1fb1
net: add autoSelectFamily global getter and setter
...
PR-URL: https://github.com/nodejs/node/pull/45777
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-12-24 14:44:11 +00:00
Moshe Atlow
a1b27b25bb
test_runner: add reporters
...
PR-URL: https://github.com/nodejs/node/pull/45712
Fixes: https://github.com/nodejs/node/issues/45648
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-12-19 17:35:57 +00:00
Debadree Chatterjee
79a977ae31
watch: add CLI flag to preserve output
...
Fixes: https://github.com/nodejs/node/issues/45713
PR-URL: https://github.com/nodejs/node/pull/45717
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2022-12-11 23:23:11 +01:00
legendecas
71ff89f929
src: rename internal module declaration as internal bindings
...
This is a continuation of the name reification on the internal bindings.
Renames NODE_MODULE_CONTEXT_AWARE_INTERNAL and
NODE_MODULE_EXTERNAL_REFERENCE to NODE_BINDING_CONTEXT_AWARE_INTERNAL
and NODE_BINDING_EXTERNAL_REFERENCE respectively.
PR-URL: https://github.com/nodejs/node/pull/45551
Refs: https://github.com/nodejs/node/issues/44036
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2022-11-29 00:23:08 +08:00
Emanuel Hoogeveen
0d8a782b4d
src: add --max-semi-space-size to the options allowed in NODE_OPTIONS
...
PR-URL: https://github.com/nodejs/node/pull/44436
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-11-15 13:27:54 +00:00
Moshe Atlow
97355c74e8
test_runner: support watch mode
...
PR-URL: https://github.com/nodejs/node/pull/45214
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-11-13 21:40:26 +00:00
Chengzhong Wu
68a3ce5246
src: clarify OptionEnvvarSettings member names
...
The term `Environment` in `kAllowedInEnvironment` and
`kDisallowedInEnvironment` has nothing to do with the commonly used
term `node::Environment`. Rename the member to `kAllowedInEnvvar`
and `kDisallowedInEnvvar` respectively to reflect they are options
of `OptionEnvvarSettings`.
As `OptionEnvvarSettings` is part of the public embedder APIs, the
legacy names are still preserved.
PR-URL: https://github.com/nodejs/node/pull/45057
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2022-10-27 16:26:29 +00:00
Moshe Atlow
c8264ad6ae
src: forbid running watch mode in REPL
...
PR-URL: https://github.com/nodejs/node/pull/45058
Fixes: https://github.com/nodejs/node/issues/45006
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-10-20 18:39:25 +00:00
Daeyeon Jeong
80270994d6
lib: enable global CustomEvent by default
...
Refs: https://github.com/nodejs/node/pull/43885
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/44860
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-10-10 00:41:55 +00:00
cjihrig
87170c3f92
test_runner: add --test-name-pattern CLI flag
...
This commit adds support for running tests that match a
regular expression.
Fixes: https://github.com/nodejs/node/issues/42984
2022-10-04 09:15:02 -04:00
Geoffrey Booth
f594cc85b7
esm: remove specifier resolution flag
...
PR-URL: https://github.com/nodejs/node/pull/44859
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2022-10-04 09:44:08 +00:00
Antoine du Hamel
6de2673a9f
lib: enable global WebCrypto by default
...
Enables `--experimental-global-webcrypto` by default, and ensures that
the classic `node:crypto` core module is still available in `--eval` or
`--print` contexts.
PR-URL: https://github.com/nodejs/node/pull/42083
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2022-09-17 15:54:33 +02:00
Moshe Atlow
a165193c5c
test_runner: support using --inspect with --test
...
PR-URL: https://github.com/nodejs/node/pull/44520
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-09-10 17:01:42 +00:00
Moshe Atlow
beb0520af7
cli: add --watch
...
PR-URL: https://github.com/nodejs/node/pull/44366
Fixes: https://github.com/nodejs/node/issues/40429
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-09-05 12:25:09 +03:00
Shohei YOSHIDA
4f4d39408f
doc: fix spacing issue in --build-snapshot help text
...
PR-URL: https://github.com/nodejs/node/pull/44435
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-08-30 00:18:38 +02:00
Chengzhong Wu
76cdef15cd
src: fix --heapsnapshot-near-heap-limit error hint
...
PR-URL: https://github.com/nodejs/node/pull/44216
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2022-08-14 02:17:28 +00:00
Moshe Atlow
8f9d1ab5ec
assert: add assert.Snapshot
...
PR-URL: https://github.com/nodejs/node/pull/44095
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-08-11 13:07:52 +00:00
Keyhan Vakil
6743d81da3
doc,worker: deprecate --trace-atomics-wait
...
V8 has asked if it possible to remove the functionality underlying
`--trace-atomics-wait`. Let's start with a documentation-only
deprecation.
PR-URL: https://github.com/nodejs/node/pull/44093
Refs: https://github.com/nodejs/node/issues/42982
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Feng Yu <F3n67u@outlook.com >
2022-08-04 07:37:59 +02:00
Joyee Cheung
172467191b
bootstrap: implement --snapshot-blob and --build-snapshot
...
This patch introduces `--build-snapshot` and `--snapshot-blob` options
for creating and using user land snapshots.
For the initial iteration, user land CJS modules and ESM are not yet
supported in the snapshot, so only one single file can be snapshotted
(users can bundle their applications into a single script with their
bundler of choice to build a snapshot though).
A subset of builtins should already work, and support for more builtins
are being added. This PR includes tests checking that the TypeScript
compiler and the marked markdown renderer (and the builtins they use)
can be snapshotted and deserialized.
To generate a snapshot using `snapshot.js` as entry point and write the
snapshot blob to `snapshot.blob`:
```
$ echo "globalThis.foo = 'I am from the snapshot'" > snapshot.js
$ node --snapshot-blob snapshot.blob --build-snapshot snapshot.js
```
To restore application state from `snapshot.blob`, with `index.js` as
the entry point script for the deserialized application:
```
$ echo "console.log(globalThis.foo)" > index.js
$ node --snapshot-blob snapshot.blob index.js
I am from the snapshot
```
Users can also use the `v8.startupSnapshot` API to specify an entry
point at snapshot building time, thus avoiding the need of an additional
entry script at deserialization time:
```
$ echo "require('v8').startupSnapshot.setDeserializeMainFunction(() => console.log('I am from the snapshot'))" > snapshot.js
$ node --snapshot-blob snapshot.blob --build-snapshot snapshot.js
$ node --snapshot-blob snapshot.blob
I am from the snapshot
```
Note that this patch only adds functionality to the `node` executable
for building run-time user-land snapshots, the generated snapshot is
stored into a separate file on disk. Building a single binary with both
Node.js and an embedded snapshot has already been possible with the
`--node-snapshot-main` option to the `configure` script if the user
compiles Node.js from source. It would be a different task to enable the
`node` executable to produce a single binary that contains both Node.js
and an embedded snapshot without building Node.js from source, which
should be layered on top of the SEA (Single Executable Apps) initiative.
Known limitations/bugs that are being fixed in the upstream:
- V8 hits a DCHECK when deserializing certain mutated globals, e.g.
`Error.stackTraceLimit` (it should work fine in the release build,
however): https://chromium-review.googlesource.com/c/v8/v8/+/3319481
- Layout of V8's read-only heap can be inconsistent after
deserialization, resulting in memory corruption:
https://bugs.chromium.org/p/v8/issues/detail?id=12921
PR-URL: https://github.com/nodejs/node/pull/38905
Refs: https://github.com/nodejs/node/issues/35711
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-08-03 00:41:40 +08:00
legendecas
a7e5b413ef
src: split property helpers from node::Environment
...
PR-URL: https://github.com/nodejs/node/pull/44056
Refs: https://github.com/nodejs/node/issues/42528
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Feng Yu <F3n67u@outlook.com >
2022-08-02 00:01:02 +08:00
Moshe Atlow
af0921d877
esm: add --import flag
...
PR-URL: https://github.com/nodejs/node/pull/43942
Fixes: https://github.com/nodejs/node/issues/40110
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-07-31 04:08:02 +01:00
Daeyeon Jeong
d29e78a780
events: expose CustomEvent on global with CLI flag
...
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/43885
Fixes: https://github.com/nodejs/node/issues/40678
Refs: https://github.com/nodejs/node/pull/43514
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
2022-07-23 14:39:08 +01:00
Daniel Bevenius
122c377eb9
src,doc,test: add --openssl-shared-config option
...
This commit adds a new command line option named
'--openssl-shared-config' intended to allow reverting to the old OpenSSL
configuration behavior where Node.js would use the configuration section
name (called appname in OpenSSL) 'openssl_conf' which could potentially
be used my other applications..
PR-URL: https://github.com/nodejs/node/pull/43124
Refs: https://github.com/nodejs/node/issues/40366
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
2022-05-31 13:42:13 +02:00
legendecas
681fb3a200
node-api: emit uncaught-exception on unhandled tsfn callbacks
...
PR-URL: https://github.com/nodejs/node/pull/36510
Fixes: https://github.com/nodejs/node/issues/36402
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-05-27 13:32:08 -04:00
Jacob Smith
d859e9e997
esm: add chaining to loaders
...
PR-URL: https://github.com/nodejs/node/pull/42623
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-05-04 16:51:12 +01:00
legendecas
e86a638305
src: add initial shadow realm support
...
Add initial shadow realm support behind an off-by-default flag
`--experimental-shadow-realm`.
PR-URL: https://github.com/nodejs/node/pull/42869
Refs: https://github.com/nodejs/node/issues/42528
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2022-05-02 18:46:31 +02:00
Antoine du Hamel
517fe9584a
esm: graduate top-level-await to stable
...
Removes the experimental label in the docs and makes the
`--experimental-top-level-await` flag a no-op.
V8 has removed the harmony flag in V8 9.1 and consider the feature
stable, there's no reason to keep it experimental in Node.js.
PR-URL: https://github.com/nodejs/node/pull/42875
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-04-28 18:54:29 +01:00
Joyee Cheung
9c60ae255c
src: make --no-node-snapshot a per-process option
...
We enable the shared read-only heap which currently requires that the
snapshot used in different isolates in the same process to be the same.
Therefore --no-node-snapshot is a per-process option.
PR-URL: https://github.com/nodejs/node/pull/42864
Refs: https://github.com/nodejs/node/pull/42809
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-04-28 16:08:26 +01:00
Colin Ihrig
adaf602405
test_runner: add initial CLI runner
...
This commit introduces an initial version of a CLI-based
test runner.
PR-URL: https://github.com/nodejs/node/pull/42658
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-04-15 18:37:28 +01:00
Colin Ihrig
54819f08e0
test_runner: support 'only' tests
...
This commit introduces a CLI flag and test runner functionality
to support running a subset of tests that are indicated by an
'only' option passed to the test.
PR-URL: https://github.com/nodejs/node/pull/42514
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-04-04 15:14:49 +01:00
Joyee Cheung
37aee80643
build: add --node-snapshot-main configure option
...
This adds a --build-snapshot runtime option which is currently only
supported by the node_mksnapshot binary, and a --node-snapshot-main
configure option that makes use it to run a custom script when
building the embedded snapshot. The idea is to have this experimental
feature in core as a configure-time feature for now, and investigate
the renaming V8 bugs before we make it available to more users via
making it a runtime option.
PR-URL: https://github.com/nodejs/node/pull/42466
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2022-03-31 19:29:12 +08:00
Joyee Cheung
de163d5db6
src: include internal/options in the snapshot
...
This patch enables internal/options to be included in the snapshot,
so that when lazy loading the run time options, the modules only
need to make sure that the options are queried lazily and do not
have to lazy load the internal/options module together. We can
still guarantee that no run time options are serialized into the
state-independent bootstrap snapshot with the assertion inside
GetCLIOptions().
PR-URL: https://github.com/nodejs/node/pull/42203
Refs: https://github.com/nodejs/node/issues/37476
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-03-11 17:15:12 +00:00