RafaelGSS
1d526a47af
2024-04-03, Version 18.20.1 'Hydrogen' (LTS)
...
This is a security release.
Notable changes:
* CVE-2024-27983 - Assertion failed in node::http2::Http2Session::\~Http2Session() leads to HTTP/2 server crash- (High)
* CVE-2024-27982 - HTTP Request Smuggling via Content Length Obfuscation - (Medium)
* llhttp version 9.2.1
* undici version 5.28.4
PR-URL: https://github.com/nodejs-private/node-private/pull/573
2024-04-02 17:07:29 -03:00
Matteo Collina
60d24938de
deps: update undici to v5.28.4
...
Signed-off-by: Matteo Collina <hello@matteocollina.com >
PR-URL: https://github.com/nodejs-private/node-private/pull/577
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-04-02 17:05:53 -03:00
RafaelGSS and Anna Henningsen
0fb816dbcc
src: ensure to close stream when destroying session
...
Co-Authored-By: Anna Henningsen <anna@addaleax.net >
PR-URL: https://github.com/nodejs-private/node-private/pull/561
Fixes: https://hackerone.com/reports/2319584
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
CVE-ID: CVE-2024-27983
2024-04-02 17:05:53 -03:00
Richard Lau
8c8961da05
Working on v18.20.1
...
PR-URL: https://github.com/nodejs/node/pull/52165
2024-03-26 17:22:01 +00:00
Richard Lau
f75dc4193e
2024-03-26, Version 18.20.0 'Hydrogen' (LTS)
...
Notable changes:
Added support for import attributes:
Support has been added for import attributes, to replace the old import
assertions syntax. This will aid migration by making the new syntax
available across all currently supported Node.js release lines.
For more details, see
* [#50134 ](https://github.com/nodejs/node/issues/50134 )
* [#51622 ](https://github.com/nodejs/node/issues/51622 )
Doc deprecation for `dirent.path`:
Please use newly added `dirent.parentPath` instead.
Experimental node-api feature flags
Introduces an experimental feature to segregate finalizers that affect GC state.
A new type called `node_api_nogc_env` has been introduced as the const version
of `napi_env` and `node_api_nogc_finalize` as a variant of `napi_finalize` that
accepts a `node_api_nogc_env` as its first argument.
This feature can be turned off by defining
`NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT`.
Root certificates updated to NSS 3.98:
Certificates added:
* Telekom Security TLS ECC Root 2020
* Telekom Security TLS RSA Root 2023
Certificates removed:
* Security Communication Root CA
Updated dependencies:
* ada updated to 2.7.6.
* base64 updated to 0.5.2.
* c-ares updated to 1.27.0.
* corepack updated to 0.25.2.
* ICU updated to 74.2. Includes CLDR 44.1 and Unicode 15.1.
* npm updated to 10.5.0. Fixes a regression in signals not being passed onto child processes.
* simdutf8 updated to 4.0.8.
* Timezone updated to 2024a.
* zlib updated to 1.3.0.1-motley-40e35a7.
vm: fix V8 compilation cache support for vm.Script:
Previously repeated compilation of the same source code using `vm.Script`
stopped hitting the V8 compilation cache after v16.x when support for
`importModuleDynamically` was added to `vm.Script`, resulting in a performance
regression that blocked users (in particular Jest users) from upgrading from
v16.x.
The recent fixes allow the compilation cache to be hit again
for `vm.Script` when `--experimental-vm-modules` is not used even in the
presence of the `importModuleDynamically` option, so that users affected by the
performance regression can now upgrade. Ongoing work is also being done to
enable compilation cache support for `vm.CompileFunction`.
PR-URL: https://github.com/nodejs/node/pull/52165
2024-03-23 18:56:11 +00:00
Gabriel Schulhof
32906ddcac
node-api: segregate nogc APIs from rest via type system
...
We define a new type called `node_api_nogc_env` as the `const` version
of `napi_env` and `node_api_nogc_finalize` as a variant of
`napi_finalize` that accepts a `node_api_nogc_env` as its first
argument.
We then modify those APIs which do not affect GC state as accepting a
`node_api_nogc_env`. APIs accepting finalizer callbacks are modified to
accept `node_api_nogc_finalize` callbacks. Thus, the only way to attach
a `napi_finalize` callback, wherein Node-APIs affecting GC state may be
called is to call `node_api_post_finalizer` from a
`node_api_nogc_finalize` callback.
In keeping with the process of introducing new Node-APIs, this feature
is guarded by `NAPI_EXPERIMENTAL`. Since this feature modifies APIs
already marked as stable, it is additionally guared by
`NODE_API_EXPERIMENTAL_NOGC_ENV`, so as to provide a further buffer to
adoption. Nevertheless, both guards must be removed upon releasing a
new version of Node-API.
PR-URL: https://github.com/nodejs/node/pull/50060
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/51804
(cherry picked from commit 7a216d5fd6 )
2024-03-22 16:04:52 +00:00
Gabriel Schulhof
1aa71c26ff
node-api: factor out common code into macros
...
* Create macro for checking new string arguments.
* Create macro for combining env check and inside-gc check.
PR-URL: https://github.com/nodejs/node/pull/50664
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/51804
(cherry picked from commit 5e250bd726 )
2024-03-22 16:04:43 +00:00
Gabriel Schulhof
3d0b233f52
node-api: introduce experimental feature flags
...
Add a flag for each experimental feature to indicate its presence.
That way, if we compile with `NAPI_EXPERIMENTAL` turned on, we'll be
able to distinguish between what `NAPI_EXPERIMENTAL` used to mean on an
old version of the headers when compiling against such an old version,
and what it means on a new version of Node.js.
PR-URL: https://github.com/nodejs/node/pull/50991
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/51804
(cherry picked from commit 727dd28e47 )
2024-03-22 16:04:36 +00:00
Node.js GitHub Bot
16d28a883a
deps: update base64 to 0.5.2
...
PR-URL: https://github.com/nodejs/node/pull/51455
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
2024-03-20 13:45:45 +00:00
Node.js GitHub Bot
13a9e81cb6
deps: update base64 to 0.5.1
...
PR-URL: https://github.com/nodejs/node/pull/50629
Fixes: https://github.com/nodejs/node/issues/50561
Fixes: https://github.com/nodejs/node/pull/45091
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-03-20 13:45:25 +00:00
Node.js GitHub Bot
8fdea67694
crypto: update root certificates to NSS 3.98
...
This is the certdata.txt[0] from NSS 3.98, released on 2024-02-15.
This is the version of NSS that will ship in Firefox 124 on
2024-03-19.
Certificates added:
- Telekom Security TLS ECC Root 2020
- Telekom Security TLS RSA Root 2023
Certificates removed:
- Security Communication Root CA
[0] https://hg.mozilla.org/projects/nss/raw-file/NSS_3_98_RTM/lib/ckfw/builtins/certdata.txt
PR-URL: https://github.com/nodejs/node/pull/51794
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-03-19 17:15:18 +00:00
Michaël Zasso
96514a8b9f
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
Backport-PR-URL: https://github.com/nodejs/node/pull/51136
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 >
2024-03-18 16:33:12 +00:00
Antoine du Hamel
a193be3dc2
esm: use import attributes instead of import assertions
...
The old import assertions proposal has been
renamed to "import attributes" with the follwing major changes:
1. The keyword is now `with` instead of `assert`.
2. Unknown assertions cause an error rather than being ignored,
This commit updates the documentation to encourage folks to use the new
syntax, and add aliases for module customization hooks.
PR-URL: https://github.com/nodejs/node/pull/50140
Backport-PR-URL: https://github.com/nodejs/node/pull/51136
Fixes: https://github.com/nodejs/node/issues/50134
Refs: https://github.com/v8/v8/commit/159c82c5e6392e78b9bba7161b1bed6e23758984
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-03-18 16:31:27 +00:00
Joyee Cheung
fe66e9d06e
vm: reject in importModuleDynamically without --experimental-vm-modules
...
Users cannot access any API that can be used to return a module or
module namespace in this callback without --experimental-vm-modules
anyway, so this would eventually lead to a rejection. This patch
rejects in this case with our own error message and use a constant
host-defined option for the rejection, so that scripts with the
same source can still be compiled using the compilation cache
if no `import()` is actually called in the script.
PR-URL: https://github.com/nodejs/node/pull/50137
Backport-PR-URL: https://github.com/nodejs/node/pull/51004
Refs: https://github.com/nodejs/node/issues/35375
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-03-15 17:56:10 +00:00
Joyee Cheung
9f7899ed0a
vm: unify host-defined option generation in vm.compileFunction
...
Set a default host-defined option for vm.compileFunction so that
it's consistent with vm.Script.
PR-URL: https://github.com/nodejs/node/pull/50137
Backport-PR-URL: https://github.com/nodejs/node/pull/51004
Refs: https://github.com/nodejs/node/issues/35375
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-03-15 17:56:02 +00:00
Joyee Cheung
6291c107d0
vm: use default HDO when importModuleDynamically is not set
...
This makes it possile to hit the in-isolate compilation cache when
host-defined options are not necessary.
PR-URL: https://github.com/nodejs/node/pull/49950
Backport-PR-URL: https://github.com/nodejs/node/pull/51004
Refs: https://github.com/nodejs/node/issues/35375
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-03-15 17:55:58 +00:00
Joyee Cheung
7552de6806
module: fix the leak in SourceTextModule and ContextifySript
...
Replace the persistent handles to v8::Module and
v8::UnboundScript with an internal reference that V8's GC is
aware of to fix the leaks.
PR-URL: https://github.com/nodejs/node/pull/48510
Backport-PR-URL: https://github.com/nodejs/node/pull/51004
Refs: https://github.com/nodejs/node/issues/44211
Refs: https://github.com/nodejs/node/issues/42080
Refs: https://github.com/nodejs/node/issues/47096
Refs: https://github.com/nodejs/node/issues/43205
Refs: https://github.com/nodejs/node/issues/38695
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-03-15 17:55:40 +00:00
Joyee Cheung
2e05cf1c60
module: fix leak of vm.SyntheticModule
...
Previously we maintain a strong persistent reference to the
ModuleWrap to retrieve the ID-to-ModuleWrap mapping from
the HostImportModuleDynamicallyCallback using the number ID
stored in the host-defined options. As a result the ModuleWrap
would be kept alive until the Environment is shut down, which
would be a leak for user code. With the new symbol-based
host-defined option we can just get the ModuleWrap from the
JS-land WeakMap so there's now no need to maintain this
strong reference. This would at least fix the leak for
vm.SyntheticModule. vm.SourceTextModule is still leaking
due to the strong persistent reference to the v8::Module.
PR-URL: https://github.com/nodejs/node/pull/48510
Backport-PR-URL: https://github.com/nodejs/node/pull/51004
Refs: https://github.com/nodejs/node/issues/44211
Refs: https://github.com/nodejs/node/issues/42080
Refs: https://github.com/nodejs/node/issues/47096
Refs: https://github.com/nodejs/node/issues/43205
Refs: https://github.com/nodejs/node/issues/38695
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-03-15 17:55:33 +00:00
Joyee Cheung
a86a2e14a3
module: use symbol in WeakMap to manage host defined options
...
Previously when managing the importModuleDynamically callback of
vm.compileFunction(), we use an ID number as the host defined option
and maintain a per-Environment ID -> CompiledFnEntry map to retain
the top-level referrer function returned by vm.compileFunction() in
order to pass it back to the callback, but it would leak because with
how we used v8::Persistent to maintain this reference, V8 would not
be able to understand the cycle and would just think that the
CompiledFnEntry was supposed to live forever. We made an attempt
to make that reference known to V8 by making the CompiledFnEntry weak
and using a private symbol to make CompiledFnEntry strongly
references the top-level referrer function in
https://github.com/nodejs/node/pull/46785 , but that turned out to be
unsound, because the there's no guarantee that the top-level function
must be alive while import() can still be initiated from that
function, since V8 could discard the top-level function and only keep
inner functions alive, so relying on the top-level function to keep
the CompiledFnEntry alive could result in use-after-free which caused
a revert of that fix.
With this patch we use a symbol in the host defined options instead of
a number, because with the stage-3 symbol-as-weakmap-keys proposal
we could directly use that symbol to keep the referrer alive using a
WeakMap. As a bonus this also keeps the other kinds of referrers
alive as long as import() can still be initiated from that
Script/Module, so this also fixes the long-standing crash caused by
vm.Script being GC'ed too early when its importModuleDynamically
callback still needs it.
PR-URL: https://github.com/nodejs/node/pull/48510
Backport-PR-URL: https://github.com/nodejs/node/pull/51004
Refs: https://github.com/nodejs/node/issues/44211
Refs: https://github.com/nodejs/node/issues/42080
Refs: https://github.com/nodejs/node/issues/47096
Refs: https://github.com/nodejs/node/issues/43205
Refs: https://github.com/nodejs/node/issues/38695
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-03-15 17:55:29 +00:00
Joyee Cheung
2c2892bf88
src: set ModuleWrap internal fields only once
...
There is no need to initialize the internal fields to undefined
and then initialize them to something else in the caller. Simply
pass the internal fields into the constructor to initialize
them just once.
PR-URL: https://github.com/nodejs/node/pull/49391
Backport-PR-URL: https://github.com/nodejs/node/pull/51004
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-03-15 17:55:20 +00:00
Joyee Cheung
ff334cb774
src: cast v8::Object::GetInternalField() return value to v8::Value
...
In preparation of https://chromium-review.googlesource.com/c/v8/v8/+/4707972
which changes the return value to v8::Data.
PR-URL: https://github.com/nodejs/node/pull/48943
Backport-PR-URL: https://github.com/nodejs/node/pull/51004
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2024-03-15 17:55:07 +00:00
RafaelGSS
c7f3b9e17e
Working on v18.19.2
...
PR-URL: https://github.com/nodejs-private/node-private/pull/545
2024-02-14 13:48:37 -03:00
marco-ippolito
6610cc42ff
2024-02-14, Version 18.19.1 'Hydrogen' (LTS)
...
This is a security release.
Notable changes:
crypto:
* update root certificates to NSS 3.95 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/50805
* disable PKCS#1 padding for privateDecrypt (Michael Dawson) https://github.com/nodejs-private/node-private/pull/525
deps:
* upgrade npm to 10.2.4 (npm team) https://github.com/nodejs/node/pull/50751
* update archs files for openssl-3.0.13+quic1 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/51614
* upgrade openssl sources to quictls/openssl-3.0.13+quic1 (Node.js GitHub Bot) ://github.com/nodejs/node/pull/51614
* fix GHSA-f74f-cvh7-c6q6/CVE-2024-24806 (Santiago Gimeno) https://github.com/nodejs/node/pull/51614
http:
* add maximum chunk extension size (Paolo Insogna) https://github.com/nodejs-private/node-private/pull/520
lib:
* update undici to v5.28.3 (Matteo Collina) https://github.com/nodejs-private/node-private/pull/536
src:
* fix HasOnly(capability) in node::credentials (Tobias Nießen) https://github.com/nodejs-private/node-private/pull/505
test:
* skip test-child-process-stdio-reuse-readable-stdio on Windows (Joyee Cheung) https://github.com/nodejs/node/pull/49621
tools:
* add macOS notarization verification step (Ulises Gascón) https://github.com/nodejs/node/pull/50833
* use macOS keychain to notarize the releases (Ulises Gascón) https://github.com/nodejs/node/pull/50715
* remove unused file (Ulises Gascon) https://github.com/nodejs/node/pull/50622
* add macOS notarization stapler (Ulises Gascón) https://github.com/nodejs/node/pull/50625
* improve macOS notarization process output readability (Ulises Gascón) https://github.com/nodejs/node/pull/50389
* remove unused `version` function (Ulises Gascón) https://github.com/nodejs/node/pull/50390
win,tools:
* upgrade Windows signing to smctl (Stefan Stojanovic) https://github.com/nodejs/node/pull/50956
zlib:
* pause stream if outgoing buffer is full (Matteo Collina) https://github.com/nodejs-private/node-private/pull/542
PR-URL: https://github.com/nodejs-private/node-private/pull/545
2024-02-13 18:26:36 -03:00
Node.js GitHub Bot
69e0a1dba8
crypto: update root certificates to NSS 3.95
...
This is the certdata.txt[0] from NSS 3.95, released on 2023-11-16.
This is the version of NSS that will ship in Firefox 121 on
2023-12-19.
Certificates added:
- TrustAsia Global Root CA G3
- TrustAsia Global Root CA G4
- CommScope Public Trust ECC Root-01
- CommScope Public Trust ECC Root-02
- CommScope Public Trust RSA Root-01
- CommScope Public Trust RSA Root-02
Certificates removed:
- Autoridad de Certificacion Firmaprofesional CIF A62634068
[0] https://hg.mozilla.org/projects/nss/raw-file/NSS_3_95_RTM/lib/ckfw/builtins/certdata.txt
PR-URL: https://github.com/nodejs/node/pull/50805
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-02-12 16:19:03 +01:00
Matteo Collina
f48b89689d
lib: update undici to v5.28.3
...
Signed-off-by: Matteo Collina <hello@matteocollina.com >
PR-URL: https://github.com/nodejs-private/node-private/pull/536
CVE-ID: CVE-2024-24758
2024-02-12 16:19:03 +01:00
Michael Dawson
d3d357ab09
crypto: disable PKCS#1 padding for privateDecrypt
...
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=2269177
Disable RSA_PKCS1_PADDING for crypto.privateDecrypt() in order
to protect against the Marvin attack.
Includes a security revert flag that can be used to restore
support.
Signed-off-by: Michael Dawson <midawson@redhat.com >
PR-URL: https://github.com/nodejs-private/node-private/pull/525
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
CVE-ID: CVE-2023-46809
2024-02-12 16:19:03 +01:00
Paolo Insogna
911cb33cda
http: add maximum chunk extension size
...
PR-URL: https://github.com/nodejs-private/node-private/pull/520
Refs: https://github.com/nodejs-private/node-private/pull/518
CVE-ID: CVE-2024-22019
2024-02-12 12:02:19 +01:00
Tobias Nießen
e6b4c105e0
src: fix HasOnly(capability) in node::credentials
...
SYS_capget with _LINUX_CAPABILITY_VERSION_3 returns the process's
permitted capabilities as two 32-bit values. To determine if the only
permitted capability is indeed CAP_NET_BIND_SERVICE, it is necessary to
check both of those values.
Not doing so creates a vulnerability that potentially allows
unprivileged users to inject code into a privileged Node.js process
through environment variables such as NODE_OPTIONS.
PR-URL: https://github.com/nodejs-private/node-private/pull/505
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
CVE-ID: CVE-2024-21892
2024-02-07 18:20:34 +01:00
Michaël Zasso
7fa1551557
Working on v18.19.1
...
PR-URL: https://github.com/nodejs/node/pull/50953
2023-11-29 17:54:58 +01:00
Michaël Zasso
9e0c715518
2023-11-29, Version 18.19.0 'Hydrogen' (LTS)
...
Notable changes:
deps:
* (SEMVER-MINOR) update uvwasi to 0.0.19 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/49908
* (SEMVER-MINOR) upgrade npm to 10.2.3 (npm team) https://github.com/nodejs/node/pull/50531
doc:
* move and rename loaders section (Geoffrey Booth) https://github.com/nodejs/node/pull/49261
esm:
* use import attributes instead of import assertions (Antoine du Hamel) https://github.com/nodejs/node/pull/50140
* --experimental-default-type flag to flip module defaults (Geoffrey Booth) https://github.com/nodejs/node/pull/49869
* unflag import.meta.resolve (Guy Bedford) https://github.com/nodejs/node/pull/49028
* move hook execution to separate thread (Jacob Smith) https://github.com/nodejs/node/pull/44710
* leverage loaders when resolving subsequent loaders (Maël Nison) https://github.com/nodejs/node/pull/43772
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) https://github.com/nodejs/node/pull/46391
* (SEMVER-MINOR) add tracing channel to diagnostics_channel (Stephen Belanger) https://github.com/nodejs/node/pull/44943
src:
* (SEMVER-MINOR) add cjs_module_lexer_version base64_version (Jithil P Ponnan) https://github.com/nodejs/node/pull/45629
stream:
* use bitmap in readable state (Benjamin Gruenbaum) https://github.com/nodejs/node/pull/49745
test_runner:
* (SEMVER-MINOR) accept `testOnly` in `run` (Moshe Atlow) https://github.com/nodejs/node/pull/49753
* (SEMVER-MINOR) add junit reporter (Moshe Atlow) https://github.com/nodejs/node/pull/49614
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) https://github.com/nodejs/node/pull/48975
* (SEMVER-MINOR) add shards support (Raz Luvaton) https://github.com/nodejs/node/pull/48639
* (SEMVER-MINOR) add initial draft for fakeTimers (Erick Wendel) https://github.com/nodejs/node/pull/47775
test_runner, cli:
* (SEMVER-MINOR) add --test-concurrency flag (Colin Ihrig) https://github.com/nodejs/node/pull/49996
tls:
* (SEMVER-MINOR) add ALPNCallback server option for dynamic ALPN negotiation (Tim Perry) https://github.com/nodejs/node/pull/45190
vm:
* (SEMVER-MINOR) use import attributes instead of import assertions (Antoine du Hamel) https://github.com/nodejs/node/pull/50141
PR-URL: https://github.com/nodejs/node/pull/50953
2023-11-28 11:48:35 +01:00
cjihrig
428301ad27
test_runner, cli: add --test-concurrency flag
...
This commit adds a new --test-concurrency CLI flag that controls
the parallelism of the test runner CLI.
PR-URL: https://github.com/nodejs/node/pull/49996
Fixes: https://github.com/nodejs/node/issues/49487
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2023-11-27 11:57:21 +01:00
Moshe Atlow
e459598cf2
test_runner: fix test runner watch mode when no positional arguments
...
PR-URL: https://github.com/nodejs/node/pull/49578
Fixes: https://github.com/nodejs/node/issues/49617
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-11-27 11:57:19 +01:00
cjihrig
d61a505546
test_runner: expose location of tests
...
This commit adds each test's line and column number to the reporter
output. This will aid in debugging test suite failures when error
stacks are not helpful, test suites are large, or tests have the
same name. This data is also exposed on the spec reporter.
This commit also replaces the filename that was previously being
reported, with the filename where the test actually exists. These
are normally correct, but could be wrong if tests were run from
a file other than the user's entrypoint.
PR-URL: https://github.com/nodejs/node/pull/48975
Fixes: https://github.com/nodejs/node/issues/48457
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.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 >
2023-11-27 11:57:17 +01:00
Toyo Li
f449b222fd
node-api: update headers for better wasm support
...
PR-URL: https://github.com/nodejs/node/pull/49037
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2023-11-27 11:57:15 +01:00
Vladimir Morozov
5148f030b8
node-api: run finalizers directly from GC
...
PR-URL: https://github.com/nodejs/node/pull/42651
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2023-11-27 11:57:15 +01:00
Chengzhong Wu
edef4fa668
node-api: enable uncaught exceptions policy by default
...
This enables the option `--force-node-api-uncaught-exceptions-policy`
for a specific Node-API addon when it is compiled with
`NAPI_EXPERIMENTAL` (and this would be the default behavior when
`NAPI_VERSION` 10 releases). This would not break existing Node-API
addons.
PR-URL: https://github.com/nodejs/node/pull/49313
Refs: https://github.com/nodejs/node/pull/36510
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com >
2023-11-27 11:57:14 +01:00
Yagiz Nizipli
f256b160bf
url: handle unicode hostname if empty
...
PR-URL: https://github.com/nodejs/node/pull/49396
Fixes: https://github.com/nodejs/node/issues/48759
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-11-27 11:57:13 +01:00
Michael Graeb
48a1b9336b
node-api: fix compiler warning in node_api.h
...
Fix "-Wstrict-prototypes" warning from AppleClang 14.0.3.14030022,
compiling C, targeting arch arm64 (on x86_64 host). I build my C
addon with -Werror and recent changes to node_api.h broke our build.
PR-URL: https://github.com/nodejs/node/pull/49103
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2023-11-27 11:57:12 +01:00
Jungku Lee
066d9d4492
src: remove unused function GetName() in node_perf
...
PR-URL: https://github.com/nodejs/node/pull/49244
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
2023-11-26 20:32:37 +01:00
Jungku Lee
158c91a38a
src: use ARES_SUCCESS instead of 0
...
PR-URL: https://github.com/nodejs/node/pull/49048
Refs: https://github.com/nodejs/node/pull/48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
2023-11-26 20:32:36 +01:00
Jungku Lee
8c33731ac6
src: add a condition if the argument of DomainToUnicode is empty
...
PR-URL: https://github.com/nodejs/node/pull/49097
Refs: https://github.com/nodejs/node/pull/46410
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
2023-11-26 20:32:36 +01:00
Tobias Nießen
57966318fe
node-api: avoid macro redefinition
...
Even though the redefinition complies with the C standard because the
second definition is "effectively the same" as the first definition,
it's best to avoid any redefinition.
Refs: https://github.com/nodejs/node/pull/28237
Refs: https://github.com/nodejs/node/pull/30006
PR-URL: https://github.com/nodejs/node/pull/48879
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-11-26 20:32:25 +01:00
Hyunjin Kim
67dba57d77
src: use ARES_SUCCESS instead of 0
...
Since error messages are also using defined values, it is more clear
to use the defined value even when the operation succeeds.
PR-URL: https://github.com/nodejs/node/pull/48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
2023-11-26 20:32:24 +01:00
Jason
97d87495c7
src: remove unnecessary temporary creation
...
PR-URL: https://github.com/nodejs/node/pull/48734
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-11-26 20:32:23 +01:00
Jan Olaf Krems
f5384c3262
src: fix nullptr access on realm
...
Adding the per-realm binding data tracking introduced a call to a realm
method when realm was potentially null. This is triggered whenever the
function is called from `ContextifyContext::New` which passes `nullptr`
as the `realm`.
PR-URL: https://github.com/nodejs/node/pull/48802
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-11-26 20:32:23 +01:00
Jason
358273d77f
src: remove OnScopeLeaveImpl's move assignment overload
...
... as it's not valid implementation and also has not been used
PR-URL: https://github.com/nodejs/node/pull/48732
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-11-26 20:32:21 +01:00
Antoine du Hamel
92734d4480
esm: use import attributes instead of import assertions
...
The old import assertions proposal has been
renamed to "import attributes" with the follwing major changes:
1. The keyword is now `with` instead of `assert`.
2. Unknown assertions cause an error rather than being ignored,
This commit updates the documentation to encourage folks to use the new
syntax, and add aliases for module customization hooks.
PR-URL: https://github.com/nodejs/node/pull/50140
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Fixes: https://github.com/nodejs/node/issues/50134
Refs: https://github.com/v8/v8/commit/159c82c5e6392e78b9bba7161b1bed6e23758984
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-11-23 10:52:48 +01:00
Geoffrey Booth
56bd9a88ac
esm: --experimental-default-type flag to flip module defaults
...
PR-URL: https://github.com/nodejs/node/pull/49869
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-11-23 10:51:31 +01:00
Yagiz Nizipli
fe26f8a860
lib: merge cjs and esm package json reader caches
...
PR-URL: https://github.com/nodejs/node/pull/48477
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-11-23 10:50:24 +01:00
Guy Bedford
c1a84398b4
esm: unflag import.meta.resolve
...
PR-URL: https://github.com/nodejs/node/pull/49028
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2023-11-23 10:46:00 +01:00