Marco Ippolito
167ef1a621
2024-06-20, Version 20.15.0 'Iron' (LTS)
...
Notable changes:
doc:
* add pimterry to collaborators (Tim Perry) https://github.com/nodejs/node/pull/52874
inspector:
* (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno) https://github.com/nodejs/node/pull/52734
test_runner:
* (SEMVER-MINOR) support test plans (Colin Ihrig) https://github.com/nodejs/node/pull/52860
tools:
* (SEMVER-MINOR) fix get_asan_state() in tools/test.py (Joyee Cheung) https://github.com/nodejs/node/pull/52766
* (SEMVER-MINOR) support max_virtual_memory test configuration (Joyee Cheung) https://github.com/nodejs/node/pull/52766
* (SEMVER-MINOR) support != in test status files (Joyee Cheung) https://github.com/nodejs/node/pull/52766
zlib:
* (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung) https://github.com/nodejs/node/pull/52692
PR-URL: https://github.com/nodejs/node/pull/53486
2024-06-20 17:55:41 +02:00
cjihrig
3d09e579d3
deps,lib,src: add experimental web storage
...
This commit introduces an experimental implementation of the Web
Storage API using SQLite as the backing data store.
PR-URL: https://github.com/nodejs/node/pull/52435
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2024-06-14 18:40:04 +00:00
Yagiz Nizipli
340cb6887d
doc: move node --run
stability to rc
...
PR-URL: https://github.com/nodejs/node/pull/53433
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-06-14 15:42:12 +00:00
RafaelGSS
d6c77ded0f
2024-06-11, Version 22.3.0 (Current)
...
Notable changes:
buffer:
* (SEMVER-MINOR) add .bytes() method to Blob (Matthew Aitken) https://github.com/nodejs/node/pull/53221
cli:
* (SEMVER-MINOR) add `NODE_RUN_PACKAGE_JSON_PATH` env (Yagiz Nizipli) https://github.com/nodejs/node/pull/53058
* (SEMVER-MINOR) add `NODE_RUN_SCRIPT_NAME` env to `node --run` (Yagiz Nizipli) https://github.com/nodejs/node/pull/53032
doc:
* (SEMVER-MINOR) add context.assert docs (Colin Ihrig) https://github.com/nodejs/node/pull/53169
* (SEMVER-MINOR) improve explanation about built-in modules (Joyee Cheung) https://github.com/nodejs/node/pull/52762
* add StefanStojanovic to collaborators (StefanStojanovic) https://github.com/nodejs/node/pull/53118
* add Marco Ippolito to TSC (Rafael Gonzaga) https://github.com/nodejs/node/pull/53008
fs:
* mark recursive cp methods as stable (Théo LUDWIG) https://github.com/nodejs/node/pull/53127
lib:
* (SEMVER-MINOR) add EventSource Client (Aras Abbasi) https://github.com/nodejs/node/pull/51575
* (SEMVER-MINOR) replace MessageEvent with undici's (Matthew Aitken) https://github.com/nodejs/node/pull/52370
module:
* (SEMVER-MINOR) print amount of load time of a cjs module (Vinicius Lourenço) https://github.com/nodejs/node/pull/52213
net:
* (SEMVER-MINOR) add new net.server.listen tracing channel (Paolo Insogna) https://github.com/nodejs/node/pull/53136
process:
* (SEMVER-MINOR) add process.getBuiltinModule(id) (Joyee Cheung) https://github.com/nodejs/node/pull/52762
src:
* (SEMVER-MINOR) traverse parent folders while running `--run` (Yagiz Nizipli) https://github.com/nodejs/node/pull/53154
src,permission:
* (SEMVER-MINOR) --allow-wasi & prevent WASI exec (Rafael Gonzaga) https://github.com/nodejs/node/pull/53124
test_runner:
* (SEMVER-MINOR) add snapshot testing (Colin Ihrig) https://github.com/nodejs/node/pull/53169
* (SEMVER-MINOR) add context.fullName (Colin Ihrig) https://github.com/nodejs/node/pull/53169
* (SEMVER-MINOR) support module mocking (Colin Ihrig) https://github.com/nodejs/node/pull/52848
PR-URL: https://github.com/nodejs/node/pull/53379
2024-06-11 15:50:45 -03:00
EhsanKhaki
3a7d8c8e9f
doc: fix typo
...
PR-URL: https://github.com/nodejs/node/pull/53397
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-06-10 22:34:38 +00:00
Yagiz Nizipli
5731e2b346
src: traverse parent folders while running --run
...
PR-URL: https://github.com/nodejs/node/pull/53154
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-06-07 21:20:52 +00:00
Joyee Cheung
673511f3bf
doc: mark --heap-prof and related flags stable
...
PR-URL: https://github.com/nodejs/node/pull/53343
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-06-07 13:48:28 +00:00
Joyee Cheung
206027b2de
doc: mark --cpu-prof and related flags stable
...
PR-URL: https://github.com/nodejs/node/pull/53343
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-06-07 13:48:27 +00:00
Juan José
b26a260ce5
cli: add --expose-gc
flag available to NODE_OPTIONS
...
This commits allows users to send `--expose-gc` via `NODE_OPTIONS`
environment variable.
Using `node --expose-gc` is possible but via `NODE_OPTIONS` won't
work.
```sh
NODE_OPTIONS='--expose-gc' node
node: --expose-gc is not allowed in NODE_OPTIONS
```
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/53078
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-06-04 17:07:29 +00:00
Rafael Gonzaga
3ab0499d43
src,permission: --allow-wasi & prevent WASI exec
...
PR-URL: https://github.com/nodejs/node/pull/53124
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-06-01 13:13:12 +00:00
cjihrig
9f6c12413c
test_runner: add snapshot testing
...
This commit adds a t.assert.snapshot() method that implements
snapshot testing. Serialization uses JSON.stringify() by default,
but users can configure the serialization to meet their needs.
PR-URL: https://github.com/nodejs/node/pull/53169
Fixes: https://github.com/nodejs/node/issues/48260
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2024-05-30 09:07:17 -04:00
Marco Ippolito
8c6d43cc4f
2024-05-28, Version 20.14.0 'Iron' (LTS)
...
Notable changes:
src,permission:
* throw async errors on async APIs (Rafael Gonzaga) https://github.com/nodejs/node/pull/52730
test_runner:
* (SEMVER-MINOR) support forced exit (Colin Ihrig) https://github.com/nodejs/node/pull/52038
PR-URL: https://github.com/nodejs/node/pull/53120
2024-05-28 18:39:46 +02:00
Rafael Gonzaga
b9ad94b6da
src: fix external module env and kDisableNodeOptionsEnv
...
PR-URL: https://github.com/nodejs/node/pull/52905
Fixes: https://github.com/nodejs/node/issues/51227
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2024-05-23 18:41:55 +00:00
Yagiz Nizipli
2aaeaa863c
cli: add NODE_RUN_PACKAGE_JSON_PATH
env
...
PR-URL: https://github.com/nodejs/node/pull/53058
Refs: https://github.com/nodejs/node/issues/52673
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
2024-05-21 13:59:35 +00:00
Colin Ihrig
a619789ef0
test_runner: support module mocking
...
This commit adds experimental module mocking to the test runner.
PR-URL: https://github.com/nodejs/node/pull/52848
Fixes: https://github.com/nodejs/node/issues/51164
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2024-05-19 05:09:09 +00:00
Yagiz Nizipli
cb90a316d0
cli: add NODE_RUN_SCRIPT_NAME
env to node --run
...
PR-URL: https://github.com/nodejs/node/pull/53032
Refs: https://github.com/nodejs/node/issues/52673
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-05-19 01:37:25 +00:00
Michaël Zasso
28b0a5826b
2024-05-15, Version 22.2.0 (Current)
...
Notable changes:
cli:
* (SEMVER-MINOR) allow running wasm in limited vmem with
--disable-wasm-trap-handler (Joyee Cheung)
https://github.com/nodejs/node/pull/52766
doc:
* add pimterry to collaborators (Tim Perry)
https://github.com/nodejs/node/pull/52874
fs:
* (SEMVER-MINOR) allow 'withFileTypes' to be used with globs
(Aviv Keller) https://github.com/nodejs/node/pull/52837
inspector:
* (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno)
https://github.com/nodejs/node/pull/52734
lib,src:
* remove --experimental-policy (Rafael Gonzaga)
https://github.com/nodejs/node/pull/52583
perf_hooks:
* (SEMVER-MINOR) add `deliveryType` and `responseStatus` fields
(Matthew Aitken) https://github.com/nodejs/node/pull/51589
test_runner:
* (SEMVER-MINOR) support test plans (Colin Ihrig)
https://github.com/nodejs/node/pull/52860
zlib:
* (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung)
https://github.com/nodejs/node/pull/52692
PR-URL: https://github.com/nodejs/node/pull/52971
2024-05-15 21:21:22 +02:00
Aras Abbasi
1d7d094a98
lib: add EventSource Client
...
PR-URL: https://github.com/nodejs/node/pull/51575
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-05-13 05:32:08 +00:00
Kohei Ueno
c0ae3b2373
inspector: introduce the --inspect-wait
flag
...
PR-URL: https://github.com/nodejs/node/pull/52734
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2024-05-11 18:48:30 +00:00
Joyee Cheung
77fabfb2ab
cli: allow running wasm in limited vmem with --disable-wasm-trap-handler
...
By default, Node.js enables trap-handler-based WebAssembly bound
checks. As a result, V8 does not need to insert inline bound checks
int the code compiled from WebAssembly which may speedup WebAssembly
execution significantly, but this optimization requires allocating
a big virtual memory cage (currently 10GB). If the Node.js process
does not have access to a large enough virtual memory address space
due to system configurations or hardware limitations, users won't
be able to run any WebAssembly that involves allocation in this
virtual memory cage and will see an out-of-memory error.
```console
$ ulimit -v 5000000
$ node -p "new WebAssembly.Memory({ initial: 10, maximum: 100 });"
[eval]:1
new WebAssembly.Memory({ initial: 10, maximum: 100 });
^
RangeError: WebAssembly.Memory(): could not allocate memory
at [eval]:1:1
at runScriptInThisContext (node:internal/vm:209:10)
at node:internal/process/execution:118:14
at [eval]-wrapper:6:24
at runScript (node:internal/process/execution:101:62)
at evalScript (node:internal/process/execution:136:3)
at node:internal/main/eval_string:49:3
```
`--disable-wasm-trap-handler` disables this optimization so that
users can at least run WebAssembly (with a less optimial performance)
when the virtual memory address space available to their Node.js
process is lower than what the V8 WebAssembly memory cage needs.
PR-URL: https://github.com/nodejs/node/pull/52766
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-05-10 16:32:34 +08:00
Rafael Gonzaga
951af83033
lib,src: remove --experimental-policy
...
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/52583
Refs: https://github.com/nodejs/node/issues/52575
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-05-07 16:25:45 +00:00
marco-ippolito
9a1df15ee7
2024-05-07, Version 20.13.0 'Iron' (LTS)
...
Notable changes:
benchmark:
* add AbortSignal.abort benchmarks (Raz Luvaton) https://github.com/nodejs/node/pull/52408
buffer:
* improve `base64` and `base64url` performance (Yagiz Nizipli) https://github.com/nodejs/node/pull/52428
crypto:
* deprecate implicitly shortened GCM tags (Tobias Nießen) https://github.com/nodejs/node/pull/52345
deps:
* (SEMVER-MINOR) update simdutf to 5.0.0 (Daniel Lemire) https://github.com/nodejs/node/pull/52138
* (SEMVER-MINOR) update undici to 6.3.0 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/51462
* (SEMVER-MINOR) update undici to 6.2.1 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/51278
dns:
* (SEMVER-MINOR) add order option and support ipv6first (Paolo Insogna) https://github.com/nodejs/node/pull/52492
doc:
* update release gpg keyserver (marco-ippolito) https://github.com/nodejs/node/pull/52257
* add release key for marco-ippolito (marco-ippolito) https://github.com/nodejs/node/pull/52257
* add UlisesGascon as a collaborator (Ulises Gascón) https://github.com/nodejs/node/pull/51991
* (SEMVER-MINOR) deprecate fs.Stats public constructor (Marco Ippolito) https://github.com/nodejs/node/pull/51879
events,doc:
* mark CustomEvent as stable (Daeyeon Jeong) https://github.com/nodejs/node/pull/52618
fs:
* add stacktrace to fs/promises (翠 / green) https://github.com/nodejs/node/pull/49849
lib, url:
* (SEMVER-MINOR) add a `windows` option to path parsing (Aviv Keller) https://github.com/nodejs/node/pull/52509
net:
* (SEMVER-MINOR) add CLI option for autoSelectFamilyAttemptTimeout (Paolo Insogna) https://github.com/nodejs/node/pull/52474
report:
* (SEMVER-MINOR) add `--report-exclude-network` option (Ethan Arrowood) https://github.com/nodejs/node/pull/51645
src:
* (SEMVER-MINOR) add `string_view` overload to snapshot FromBlob (Anna Henningsen) https://github.com/nodejs/node/pull/52595
* (SEMVER-MINOR) add C++ ProcessEmitWarningSync() (Joyee Cheung) https://github.com/nodejs/node/pull/51977
* (SEMVER-MINOR) add uv_get_available_memory to report and process (theanarkh) https://github.com/nodejs/node/pull/52023
* (SEMVER-MINOR) preload function for Environment (Cheng Zhao) https://github.com/nodejs/node/pull/51539
stream:
* (SEMVER-MINOR) support typed arrays (IlyasShabi) https://github.com/nodejs/node/pull/51866
test_runner:
* (SEMVER-MINOR) add suite() (Colin Ihrig) https://github.com/nodejs/node/pull/52127
* (SEMVER-MINOR) add `test:complete` event to reflect execution order (Moshe Atlow) https://github.com/nodejs/node/pull/51909
util:
* (SEMVER-MINOR) support array of formats in util.styleText (Marco Ippolito) https://github.com/nodejs/node/pull/52040
v8:
* (SEMVER-MINOR) implement v8.queryObjects() for memory leak regression testing (Joyee Cheung) https://github.com/nodejs/node/pull/51927
watch:
* mark as stable (Moshe Atlow) https://github.com/nodejs/node/pull/52074
PR-URL: https://github.com/nodejs/node/pull/52793
2024-05-07 17:32:24 +02:00
Antoine du Hamel
08c3256527
2024-05-02, Version 22.1.0 (Current)
...
Notable changes:
buffer:
* improve `base64` and `base64url` performance (Yagiz Nizipli) https://github.com/nodejs/node/pull/52428
dns:
* (SEMVER-MINOR) add order option and support ipv6first (Paolo Insogna) https://github.com/nodejs/node/pull/52492
events,doc:
* mark CustomEvent as stable (Daeyeon Jeong) https://github.com/nodejs/node/pull/52618
lib, url:
* (SEMVER-MINOR) add a `windows` option to path parsing (Aviv Keller) https://github.com/nodejs/node/pull/52509
module:
* (SEMVER-MINOR) implement NODE_COMPILE_CACHE for automatic on-disk code caching (Joyee Cheung) https://github.com/nodejs/node/pull/52535
net:
* (SEMVER-MINOR) add CLI option for autoSelectFamilyAttemptTimeout (Paolo Insogna) https://github.com/nodejs/node/pull/52474
src:
* (SEMVER-MINOR) add `string_view` overload to snapshot FromBlob (Anna Henningsen) https://github.com/nodejs/node/pull/52595
src,permission:
* throw async errors on async APIs (Rafael Gonzaga) https://github.com/nodejs/node/pull/52730
test_runner:
* (SEMVER-MINOR) add --test-skip-pattern cli option (Aviv Keller) https://github.com/nodejs/node/pull/52529
url:
* (SEMVER-MINOR) implement parse method for safer URL parsing (Ali Hassan) https://github.com/nodejs/node/pull/52280
PR-URL: https://github.com/nodejs/node/pull/52768
2024-05-02 16:01:20 +02:00
Marco Ippolito
8f37492b65
cli: move --trace-atomics-wait to eol
...
PR-URL: https://github.com/nodejs/node/pull/52747
Fixes: https://github.com/nodejs/node/issues/42982
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
2024-05-01 12:24:48 +00:00
Daeyeon Jeong
f7e73cd1f2
cli: remove --no-experimental-global-customevent flag
...
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52723
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@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: Yagiz Nizipli <yagiz.nizipli@sentry.io>
2024-04-29 15:15:40 +00:00
RafaelGSS
d40d21c6b4
2024-04-24, Version 22.0.0 (Current)
...
Semver-Major Commits:
build:
* (SEMVER-MAJOR) compile with C++20 support on Windows (StefanStojanovic) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) https://github.com/nodejs/node/pull/52293
* (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) https://github.com/nodejs/node/pull/50115
console:
* (SEMVER-MAJOR) treat non-strings as separate argument in console.assert() (Jacob Hummer) https://github.com/nodejs/node/pull/49722
crypto:
* (SEMVER-MAJOR) runtime deprecate hmac constructor (Marco Ippolito) https://github.com/nodejs/node/pull/52071
* (SEMVER-MAJOR) runtime deprecate Hash constructor (Marco Ippolito) https://github.com/nodejs/node/pull/51880
* (SEMVER-MAJOR) move createCipher and createDecipher to eol (Marco Ippolito) https://github.com/nodejs/node/pull/50973
deps:
* (SEMVER-MAJOR) V8: cherry-pick cd10ad7cdbe5 (Joyee Cheung) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) V8: revert CL 5331688 (Michaël Zasso) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) silence internal V8 deprecation warning (Michaël Zasso) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) remove usage of a C++20 feature from V8 (Michaël Zasso) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) avoid compilation error with ASan (Michaël Zasso) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) silence irrelevant V8 warning (Michaël Zasso) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) update V8 to 12.4.254.14 (Michaël Zasso) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) V8: cherry-pick cd10ad7cdbe5 (Joyee Cheung) https://github.com/nodejs/node/pull/52293
* (SEMVER-MAJOR) V8: backport c4be0a97f981 (Richard Lau) https://github.com/nodejs/node/pull/52293
* (SEMVER-MAJOR) silence internal V8 deprecation warning (Michaël Zasso) https://github.com/nodejs/node/pull/52293
* (SEMVER-MAJOR) patch V8 to support compilation with MSVC (Stefan Stojanovic) https://github.com/nodejs/node/pull/52293
* (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) https://github.com/nodejs/node/pull/52293
* (SEMVER-MAJOR) remove usage of a C++20 feature from V8 (Michaël Zasso) https://github.com/nodejs/node/pull/52293
* (SEMVER-MAJOR) avoid compilation error with ASan (Michaël Zasso) https://github.com/nodejs/node/pull/52293
* (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) https://github.com/nodejs/node/pull/52293
* (SEMVER-MAJOR) silence irrelevant V8 warning (Michaël Zasso) https://github.com/nodejs/node/pull/52293
* (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) https://github.com/nodejs/node/pull/52293
* (SEMVER-MAJOR) update V8 to 12.3.219.16 (Michaël Zasso) https://github.com/nodejs/node/pull/52293
* (SEMVER-MAJOR) V8: backport c4be0a97f981 (Richard Lau) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) V8: cherry-pick f8d5e576b814 (Richard Lau) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) remove usage of a C++20 feature from V8 (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) avoid compilation error with ASan (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) silence irrelevant V8 warning (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) update V8 to 12.2.281.27 (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) V8: cherry-pick de611e69ad51 (Keyhan Vakil) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) V8: cherry-pick 0fd478bcdabd (Joyee Cheung) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) V8: cherry-pick 0f9ebbc672c7 (Chengzhong Wu) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) V8: cherry-pick 8f0b94671ddb (Lu Yahan) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) V8: cherry-pick f7d000a7ae7b (Luke Albao) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) V8: cherry-pick 25902244ad1a (Joyee Cheung) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) remove usage of a C++20 feature from V8 (Michaël Zasso) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) avoid compilation error with ASan (Michaël Zasso) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) silence irrelevant V8 warning (Michaël Zasso) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) update V8 to 11.9.169.7 (Michaël Zasso) https://github.com/nodejs/node/pull/50115
doc:
* (SEMVER-MAJOR) runtime deprecate flag --trace-atomics-wait (marco-ippolito) https://github.com/nodejs/node/pull/51179
* (SEMVER-MAJOR) bump FreeBSD experimental support to 13.2 (Michaël Zasso) https://github.com/nodejs/node/pull/51231
* (SEMVER-MAJOR) add migration paths for deprecated utils (Marco Ippolito) https://github.com/nodejs/node/pull/50488
fs:
* (SEMVER-MAJOR) runtime deprecate fs.Stats constructor (Marco Ippolito) https://github.com/nodejs/node/pull/52067
* (SEMVER-MAJOR) use private fields instead of symbols for `Dir` (Jungku Lee) https://github.com/nodejs/node/pull/51037
* (SEMVER-MAJOR) make stats date fields lazy (Yagiz Nizipli) https://github.com/nodejs/node/pull/50908
http:
* (SEMVER-MAJOR) preserve raw header duplicates in writeHead after setHeader calls (Tim Perry) https://github.com/nodejs/node/pull/50394
lib:
* (SEMVER-MAJOR) enable WebSocket by default (Aras Abbasi) https://github.com/nodejs/node/pull/51594
lib,test:
* (SEMVER-MAJOR) handle new Iterator global (Michaël Zasso) https://github.com/nodejs/node/pull/51362
process:
* (SEMVER-MAJOR) wait for `'exit'` before printing result (Antoine du Hamel) https://github.com/nodejs/node/pull/52172
src:
* (SEMVER-MAJOR) update NODE_MODULE_VERSION to 127 (Michaël Zasso) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) update NODE_MODULE_VERSION to 126 (Michaël Zasso) https://github.com/nodejs/node/pull/52293
* (SEMVER-MAJOR) use supported API to get stalled TLA messages (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) update default V8 platform to override functions with location (Etienne Pierre-Doray) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) add missing TryCatch (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) update NODE_MODULE_VERSION to 124 (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) use non-deprecated v8::Uint8Array::kMaxLength (Michaël Zasso) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) adapt to v8::Exception API change (Michaël Zasso) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) use non-deprecated version of CreateSyntheticModule (Michaël Zasso) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) update NODE_MODULE_VERSION to 122 (Michaël Zasso) https://github.com/nodejs/node/pull/50115
stream:
* (SEMVER-MAJOR) bump default highWaterMark (Robert Nagy) https://github.com/nodejs/node/pull/52037
test:
* (SEMVER-MAJOR) mark test-worker-arraybuffer-zerofill as flaky (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) mark some GC-related tests as flaky (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) allow slightly more diff in memory leak test (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) replace always-opt flag with alway-turbofan (Michaël Zasso) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) remove tests that create very large buffers (Michaël Zasso) https://github.com/nodejs/node/pull/50115
* (SEMVER-MAJOR) adapt to new V8 trusted memory spaces (Michaël Zasso) https://github.com/nodejs/node/pull/50115
test_runner:
* (SEMVER-MAJOR) omit filtered test from output (Colin Ihrig) https://github.com/nodejs/node/pull/52221
* (SEMVER-MAJOR) improve `--test-name-pattern` to allow matching single test (Michał Drobniak) https://github.com/nodejs/node/pull/51577
tools:
* (SEMVER-MAJOR) update V8 gypfiles for 12.4 (Michaël Zasso) https://github.com/nodejs/node/pull/52465
* (SEMVER-MAJOR) roughly port v8_abseil to gyp (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) update V8 gypfiles for 12.2 (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) update V8 gypfiles for 12.1 (Michaël Zasso) https://github.com/nodejs/node/pull/51362
* (SEMVER-MAJOR) update V8 gypfiles for 12.0 (Michaël Zasso) https://github.com/nodejs/node/pull/51362
trace_events:
* (SEMVER-MAJOR) use private fields instead of symbols for `Tracing` (Jungku Lee) https://github.com/nodejs/node/pull/51180
util:
* (SEMVER-MAJOR) runtime deprecate util.log (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecate util.isUndefined (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecate util.isSymbol (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecate util.isString (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecate util.isRegExp (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecate util.isPrimitive (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecate util.isObject (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecate util.isNumber (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecate util.isNullOrUndefined (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecate util.isNull (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecate util.isFunction (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecate util.isError (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecate util.isDate (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecation util.isBuffer (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecation util.isBoolean (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecate util.isArray (Marco Ippolito) https://github.com/nodejs/node/pull/50488
* (SEMVER-MAJOR) runtime deprecation util._extend (Marco Ippolito) https://github.com/nodejs/node/pull/50488
v8:
* (SEMVER-MAJOR) enable maglev on supported architectures (Keyhan Vakil) https://github.com/nodejs/node/pull/51360
PR-URL: https://github.com/nodejs/node/pull/52505
Co-Authored-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-04-24 15:20:02 -03:00
Filip Skokan
311504125f
cli: remove --no-experimental-fetch flag
...
PR-URL: https://github.com/nodejs/node/pull/52611
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-04-22 15:43:58 +00:00
RafaelGSS
01c281fa9f
doc: deprecate --experimental-policy
...
PR-URL: https://github.com/nodejs/node/pull/52602
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 10:46:10 -03:00
Filip Skokan
a30ae50860
cli: remove --no-experimental-global-webcrypto flag
...
PR-URL: https://github.com/nodejs/node/pull/52564
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-04-19 13:02:01 +00:00
Aviv Keller
e9c233cd6b
test_runner: add --test-skip-pattern cli option
...
PR-URL: https://github.com/nodejs/node/pull/52529
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-04-18 20:59:50 +00:00
Joyee Cheung
87abd023aa
module: implement NODE_COMPILE_CACHE for automatic on-disk code caching
...
This patch implements automatic on-disk code caching that can be enabled
via an environment variable NODE_COMPILE_CACHE.
When set, whenever Node.js compiles a CommonJS or a ECMAScript Module,
it will use on-disk [V8 code cache][] persisted in the specified
directory to speed up the compilation. This may slow down the first
load of a module graph, but subsequent loads of the same module graph
may get a significant speedup if the contents of the modules do not
change. Locally, this speeds up loading of
test/fixtures/snapshot/typescript.js from ~130ms to ~80ms.
To clean up the generated code cache, simply remove the directory.
It will be recreated the next time the same directory is used for
`NODE_COMPILE_CACHE`.
Compilation cache generated by one version of Node.js may not be used
by a different version of Node.js. Cache generated by different versions
of Node.js will be stored separately if the same directory is used
to persist the cache, so they can co-exist.
Caveat: currently when using this with V8 JavaScript code coverage, the
coverage being collected by V8 may be less precise in functions that are
deserialized from the code cache. It's recommended to turn this off when
running tests to generate precise coverage.
Implementation details:
There is one cache file per module on disk. The directory layout
is:
- Compile cache directory (from NODE_COMPILE_CACHE)
- 8b23c8fe: CRC32 hash of CachedDataVersionTag + NODE_VERESION
- 2ea3424d:
- 10860e5a: CRC32 hash of filename + module type
- 431e9adc: ...
- ...
Inside the cache file, there is a header followed by the actual
cache content:
```
[uint32_t] code size
[uint32_t] code hash
[uint32_t] cache size
[uint32_t] cache hash
... compile cache content ...
```
When reading the cache file, we'll also check if the code size
and code hash match the code that the module loader is loading
and whether the cache size and cache hash match the file content
read. If they don't match, or if V8 rejects the cache passed,
we'll ignore the mismatch cache, and regenerate the cache after
compilation succeeds and rewrite it to disk.
PR-URL: https://github.com/nodejs/node/pull/52535
Refs: https://github.com/nodejs/node/issues/47472
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2024-04-17 23:39:45 +02:00
Paolo Insogna
7e89369166
dns: add order option and support ipv6first
...
PR-URL: https://github.com/nodejs/node/pull/52492
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-04-17 15:24:28 +00:00
Paolo Insogna
833e342f15
net: add CLI option for autoSelectFamilyAttemptTimeout
...
PR-URL: https://github.com/nodejs/node/pull/52474
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-04-17 09:06:12 +00:00
Yagiz Nizipli
128c60d906
cli: implement node --run <script-in-package-json>
...
Co-authored-by: Daniel Lemire <daniel@lemire.me>
PR-URL: https://github.com/nodejs/node/pull/52190
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
2024-04-08 00:49:14 +00:00
Daeyeon Jeong
ba07e4e5e6
doc: fix typo in cli.md
...
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52388
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-04-06 18:49:45 +00:00
Richard Lau
6d2d3f17ba
2024-03-26, Version 20.12.0 'Iron' (LTS)
...
Notable changes:
build:
* (SEMVER-MINOR) build opt to set local location of headers (Michael Dawson) https://github.com/nodejs/node/pull/51525
crypto:
* (SEMVER-MINOR) implement crypto.hash() (Joyee Cheung) https://github.com/nodejs/node/pull/51044
* update root certificates to NSS 3.98 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/51794
doc:
* add lemire to collaborators (Daniel Lemire) https://github.com/nodejs/node/pull/51572
* add zcbenz to collaborators (Cheng Zhao) https://github.com/nodejs/node/pull/51812
lib:
* (SEMVER-MINOR) move encodingsMap to internal/util (Joyee Cheung) https://github.com/nodejs/node/pull/51044
sea:
* (SEMVER-MINOR) support sea.getRawAsset() (Joyee Cheung) https://github.com/nodejs/node/pull/50960
* (SEMVER-MINOR) support embedding assets (Joyee Cheung) https://github.com/nodejs/node/pull/50960
src:
* (SEMVER-MINOR) print string content better in BlobDeserializer (Joyee Cheung) https://github.com/nodejs/node/pull/50960
util:
* (SEMVER-MINOR) add styleText API to text formatting (Rafael Gonzaga) https://github.com/nodejs/node/pull/51850
vm:
* (SEMVER-MINOR) support using the default loader to handle dynamic import() (Joyee Cheung) https://github.com/nodejs/node/pull/51244
PR-URL: https://github.com/nodejs/node/pull/52212
2024-03-26 17:42:38 +00:00
Gabriel Bota
305375ac16
doc: fix --env-file
docs for valid quotes for defining values
...
PR-URL: https://github.com/nodejs/node/pull/52157
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-03-23 19:33:07 +00:00
Michael Dawson
3fcaf7b900
doc: clarify what is supported in NODE_OPTIONS
...
Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/52076
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-03-22 18:02:21 -04:00
Joyee Cheung
5f7fad2605
module: support require()ing synchronous ESM graphs
...
This patch adds `require()` support for synchronous ESM graphs under
the flag `--experimental-require-module`
This is based on the the following design aspect of ESM:
- The resolution can be synchronous (up to the host)
- The evaluation of a synchronous graph (without top-level await) is
also synchronous, and, by the time the module graph is instantiated
(before evaluation starts), this is is already known.
If `--experimental-require-module` is enabled, and the ECMAScript
module being loaded by `require()` meets the following requirements:
- Explicitly marked as an ES module with a `"type": "module"` field in
the closest package.json or a `.mjs` extension.
- Fully synchronous (contains no top-level `await`).
`require()` will load the requested module as an ES Module, and return
the module name space object. In this case it is similar to dynamic
`import()` but is run synchronously and returns the name space object
directly.
```mjs
// point.mjs
export function distance(a, b) {
return (b.x - a.x) ** 2 + (b.y - a.y) ** 2;
}
class Point {
constructor(x, y) { this.x = x; this.y = y; }
}
export default Point;
```
```cjs
const required = require('./point.mjs');
// [Module: null prototype] {
// default: [class Point],
// distance: [Function: distance]
// }
console.log(required);
(async () => {
const imported = await import('./point.mjs');
console.log(imported === required); // true
})();
```
If the module being `require()`'d contains top-level `await`, or the
module graph it `import`s contains top-level `await`,
[`ERR_REQUIRE_ASYNC_MODULE`][] will be thrown. In this case, users
should load the asynchronous module using `import()`.
If `--experimental-print-required-tla` is enabled, instead of throwing
`ERR_REQUIRE_ASYNC_MODULE` before evaluation, Node.js will evaluate the
module, try to locate the top-level awaits, and print their location to
help users fix them.
PR-URL: https://github.com/nodejs/node/pull/51977
Reviewed-By: Chengzhong Wu <legendecas@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: Geoffrey Booth <webadmin@geoffreybooth.com>
2024-03-18 18:10:06 +08:00
Moshe Atlow
4f68c7c1c9
watch: mark as stable
...
PR-URL: https://github.com/nodejs/node/pull/52074
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-03-15 13:09:48 +00:00
Colin Ihrig
84de97a61e
test_runner: support forced exit
...
This commit updates the test runner to allow a forced exit once
all known tests have finished running.
Fixes: https://github.com/nodejs/node/issues/49925
PR-URL: https://github.com/nodejs/node/pull/52038
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-03-13 10:49:15 +00:00
Geoffrey Booth
63d04d4d80
module: fix detect-module not retrying as esm for cjs-only errors
...
PR-URL: https://github.com/nodejs/node/pull/52024
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-03-12 13:37:51 +00:00
Aras Abbasi
999c6b34fb
doc: test for cli options
...
PR-URL: https://github.com/nodejs/node/pull/51623
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2024-03-07 18:00:11 +00:00
marco-ippolito
2246cd9735
2024-03-06, Version 21.7.0 (Current)
...
Notable changes:
build:
* (SEMVER-MINOR) build opt to set local location of headers (Michael Dawson) https://github.com/nodejs/node/pull/51525
crypto:
* (SEMVER-MINOR) implement crypto.hash() (Joyee Cheung) https://github.com/nodejs/node/pull/51044
* update root certificates to NSS 3.98 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/51794
doc:
* add zcbenz to collaborators (Cheng Zhao) https://github.com/nodejs/node/pull/51812
* add lemire to collaborators (Daniel Lemire) https://github.com/nodejs/node/pull/51572
http2:
* (SEMVER-MINOR) add h2 compat support for appendHeader (Tim Perry) https://github.com/nodejs/node/pull/51412
* (SEMVER-MINOR) add server handshake utility (snek) https://github.com/nodejs/node/pull/51172
* (SEMVER-MINOR) receive customsettings (Marten Richter) https://github.com/nodejs/node/pull/51323
lib:
* (SEMVER-MINOR) move encodingsMap to internal/util (Joyee Cheung) https://github.com/nodejs/node/pull/51044
sea:
* (SEMVER-MINOR) support sea.getRawAsset() (Joyee Cheung) https://github.com/nodejs/node/pull/50960
* (SEMVER-MINOR) support embedding assets (Joyee Cheung) https://github.com/nodejs/node/pull/50960
src:
* (SEMVER-MINOR) print string content better in BlobDeserializer (Joyee Cheung) https://github.com/nodejs/node/pull/50960
* (SEMVER-MINOR) support multi-line values for .env file (IlyasShabi) https://github.com/nodejs/node/pull/51289
* (SEMVER-MINOR) add `process.loadEnvFile` and `util.parseEnv` (Yagiz Nizipli) https://github.com/nodejs/node/pull/51476
* (SEMVER-MINOR) do not coerce dotenv paths (Tobias Nießen) https://github.com/nodejs/node/pull/51425
stream:
* (SEMVER-MINOR) implement `min` option for `ReadableStreamBYOBReader.read` (Mattias Buelens) https://github.com/nodejs/node/pull/50888
util:
* (SEMVER-MINOR) add styleText API to text formatting (Rafael Gonzaga) https://github.com/nodejs/node/pull/51850
vm:
* (SEMVER-MINOR) support using the default loader to handle dynamic import() (Joyee Cheung) https://github.com/nodejs/node/pull/51244
PR-URL: https://github.com/nodejs/node/pull/51932
2024-03-06 15:35:16 -03:00
Ethan Arrowood
009665fb56
report: add --report-exclude-network
option
...
New option `--report-exclude-network`, also available as
`report.excludeNetwork`, enables the user to exclude
networking interfaces in their diagnostic report.
On some systems, this can cause the report to take minutes
to generate so this option can be used to optimize that.
Fixes: https://github.com/nodejs/node/issues/46060
PR-URL: https://github.com/nodejs/node/pull/51645
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2024-03-01 21:50:04 +00:00
Ameet Kaustav
123dc51c6c
doc: change ExperimentalWarnings
to ExperimentalWarning
...
PR-URL: https://github.com/nodejs/node/pull/51741
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
2024-02-26 13:14:36 +00:00
Tobias Nießen
6d14352c51
src,deps: disable setuid() etc if io_uring enabled
...
Within Node.js, attempt to determine if libuv is using io_uring. If it
is, disable process.setuid() and other user identity setters.
We cannot fully prevent users from changing the process's user identity,
but this should still prevent some accidental, dangerous scenarios.
PR-URL: https://github.com/nodejs-private/node-private/pull/528
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
CVE-ID: CVE-2024-22017
2024-02-14 14:27:34 -03:00
Tobias Nießen
42e659cb9d
deps: disable io_uring support in libuv by default
...
setuid() does not affect libuv's internal io_uring operations if
initialized before the call to setuid(). This potentially allows the
process to perform privileged operations despite presumably having
dropped such privileges through a call to setuid(). Similar concerns
apply to other functions that modify the process's user identity.
This commit changes libuv's io_uring behavior from opt-out (through
UV_USE_IO_URING=0) to opt-in (through UV_USE_IO_URING=1) until we figure
out a better long-term solution.
PR-URL: https://github.com/nodejs-private/node-private/pull/528
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
CVE-ID: CVE-2024-22017
2024-02-14 14:27:34 -03:00
Aras Abbasi
c975384264
lib: enable WebSocket by default
...
PR-URL: https://github.com/nodejs/node/pull/51594
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-02-04 14:03:39 +00:00
IlyasShabi
8b2836611e
src: support multi-line values for .env file
...
PR-URL: https://github.com/nodejs/node/pull/51289
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2024-01-31 13:09:13 +00:00