36780 Commits
Author SHA1 Message Date
Richard Lau 96a4559f25 2023-02-16, Version 16.19.1 'Gallium' (LTS)
This is a security release.

Notable changes:

The following CVEs are fixed in this release:

- CVE-2023-23918: Node.js Permissions policies can be bypassed via
  process.mainModule (High)
- CVE-2023-23919: Node.js OpenSSL error handling issues in nodejs
  crypto library (Medium)
- CVE-2023-23936: Fetch API in Node.js did not protect against CRLF
  injection in host headers (Medium)
- CVE-2023-24807: Regular Expression Denial of Service in Headers in
  Node.js fetch API (Low)
- CVE-2023-23920: Node.js insecure loading of ICU data through ICU_DATA
  environment variable (Low)

Fixed by an update to undici:

- CVE-2023-23936: Fetch API in Node.js did not protect against CRLF
  injection in host headers (Medium)
  See https://github.com/nodejs/undici/security/advisories/GHSA-5r9g-qh6m-jxff
  for more information.
- CVE-2023-24807: Regular Expression Denial of Service in Headers in
  Node.js fetch API (Low)
  See https://github.com/nodejs/undici/security/advisories/GHSA-r6ch-mqf9-qc9w
  for more information.

- OpenSSL 1.1.1t

PR-URL: https://github.com/nodejs-private/node-private/pull/390
v16.19.1
2023-02-15 18:13:54 +00:00
RafaelGSS f95ef064f4 lib: makeRequireFunction patch when experimental policy
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/372
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1747642
CVE-ID: CVE-2023-23918
PR-URL: https://github.com/nodejs-private/node-private/pull/358
Reviewed-by: Bradley Farias <bradley.meck@gmail.com>
Reviewed-by: Michael Dawson <midawson@redhat.com>
2023-02-15 18:08:34 +00:00
RafaelGSSandBradley Farias b02d895137 policy: makeRequireFunction on mainModule.require
Co-authored-by: Bradley Farias <bradley.meck@gmail.com>
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/372
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1747642
CVE-ID: CVE-2023-23918
PR-URL: https://github.com/nodejs-private/node-private/pull/358
Reviewed-by: Bradley Farias <bradley.meck@gmail.com>
Reviewed-by: Michael Dawson <midawson@redhat.com>
2023-02-15 18:08:34 +00:00
Matteo Collina 2d9ae4f184 deps: update undici to v5.19.1
Signed-off-by: Matteo Collina <hello@matteocollina.com>
CVE-ID: CVE-2023-23936, CVE-2023-24807
PR-URL: https://github.com/nodejs-private/node-private/pull/388
Refs: https://github.com/nodejs/undici/security/advisories/GHSA-5r9g-qh6m-jxff
Refs: https://github.com/nodejs/undici/security/advisories/GHSA-r6ch-mqf9-qc9w
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1820955
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1784449
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-02-15 18:06:47 +00:00
RafaelGSS b558e9f476 crypto: clear OpenSSL error on invalid ca cert
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
CVE-ID: CVE-2023-23919
PR-URL: https://github.com/nodejs-private/node-private/pull/375
Refs: https://hackerone.com/bugs?report_id=1808596
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2023-02-14 17:00:17 +00:00
Filip Skokan 160adb7ffc crypto: clear OpenSSL error queue after calling X509_check_private_key()
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/375
CVE-ID: CVE-2023-23919
Fixes: https://github.com/nodejs/node/issues/45485
PR-URL: https://github.com/nodejs/node/pull/45495
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1808596
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-02-14 16:59:57 +00:00
Takuro Sato d0ece30948 crypto: clear OpenSSL error queue after calling X509_verify()
Prior to this commit, functions accessing the OpenSSL error queue did
not work properly after x509.verify() returned false.

Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/375
CVE-ID: CVE-2023-23919
PR-URL: https://github.com/nodejs/node/pull/45377
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1808596
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2023-02-14 16:58:41 +00:00
RafaelGSS 7fef050447 build: build ICU with ICU_NO_USER_DATA_OVERRIDE
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/378
CVE-ID: CVE-2023-23920
PR-URL: https://github.com/nodejs-private/node-private/pull/374
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1625036
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-02-14 16:58:12 +00:00
Richard Lau d80e8312fd deps: cherry-pick Windows ARM64 fix for openssl
Original commit message:

    rsa: add msvc intrinsic for non x64 platforms

    _umul128() is x86_64 (x64) only, while __umulh() works everywhere, but
    doesn't generate optimal code on x64

PR-URL: https://github.com/nodejs/node/pull/46568
Refs: https://github.com/openssl/openssl/pull/20244
Refs: https://mta.openssl.org/pipermail/openssl-announce/2023-February/000251.html
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-02-13 13:39:28 +00:00
RafaelGSS de5c8d2c2f deps: update archs files for quictls/openssl-1.1.1t+quic
After an OpenSSL source update, all the config files need to be
regenerated and committed by:
    $ make -C deps/openssl/config
    $ git add deps/openssl/config/archs
    $ git add deps/openssl/openssl
    $ git commit

PR-URL: https://github.com/nodejs/node/pull/46568
Refs: https://mta.openssl.org/pipermail/openssl-announce/2023-February/000251.html
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-02-13 13:39:12 +00:00
RafaelGSS 1a8ccfe908 deps: upgrade openssl sources to OpenSSL_1_1_1t+quic
This updates all sources in deps/openssl/openssl by:
    $ git clone https://github.com/quictls/openssl
    $ cd openssl
    $ git checkout OpenSSL_1_1_1t+quic
    $ cd ../node/deps/openssl
    $ rm -rf openssl
    $ cp -R ../openssl openssl
    $ rm -rf openssl/.git* openssl/.travis*
    $ git add --all openssl
    $ git commit openssl

PR-URL: https://github.com/nodejs/node/pull/46568
Refs: https://mta.openssl.org/pipermail/openssl-announce/2023-February/000251.html
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-02-13 13:39:06 +00:00
Richard Lau d7f83c420c test: avoid left behind child processes
Extend the Linux logic to all POSIX platforms in
test-child-process-exec-abortcontroller-promisified.

PR-URL: https://github.com/nodejs/node/pull/46276
Fixes: https://github.com/nodejs/build/issues/3154
Refs: https://github.com/nodejs/node/issues/37518
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-01-22 14:20:29 -05:00
Richard Lau 693789780b doc: clarify release notes for Node.js 16.19.0
Refs: https://github.com/nodejs/node/pull/45791
PR-URL: https://github.com/nodejs/node/pull/45846
Refs: https://github.com/nodejs/nodejs.org/pull/4972
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-12-21 10:59:21 -05:00
Richard Lau 2d5d8f5244 Working on v16.19.1
PR-URL: https://github.com/nodejs/node/pull/45791
2022-12-13 07:52:36 -05:00
Richard Lau 2adea16e39 2022-12-13, Version 16.19.0 'Gallium' (LTS)
Notable changes:

- OpenSSL 1.1.1s
- Root certificates updated to NSS 3.85
- Time zone update to 2022f
- add dgram send queue info
- upgrade npm to 8.19.3
- add `--watch`
- add default value option to parsearg

PR-URL: https://github.com/nodejs/node/pull/45791
v16.19.0
2022-12-08 16:12:12 -05:00
Joyee Cheung fbc52e5729 src: disambiguate terms used to refer to builtins and addons
The term "native module" dates back to some of the oldest code
in the code base. Within the context of Node.js core it usually
refers to modules that are native to Node.js (e.g. fs, http),
but it can cause confusion for people who don't work on this
part of the code base, as "native module" can also refer to
native addons - which is even the case in some of the API
docs and error messages.

This patch tries to make the usage of these terms more consistent.
Now within the context of Node.js core:

- JavaScript scripts that are built-in to Node.js are now referred
  to as "built-in(s)". If they are available as modules,
  they can also be referred to as "built-in module(s)".
- Dynamically-linked shared objects that are loaded into
  the Node.js processes are referred to as "addons".

We will try to avoid using the term "native modules" because it could
be ambiguous.

Changes in this patch:

File names:
- node_native_module.h -> node_builtins.h,
- node_native_module.cc -> node_builtins.cc

C++ binding names:
- `native_module` -> `builtins`

`node::Environment`:
- `native_modules_without_cache` -> `builtins_without_cache`
- `native_modules_with_cache` -> `builtins_with_cache`
- `native_modules_in_snapshot` -> `builtins_in_cache`
- `native_module_require` -> `builtin_module_require`

`node::EnvSerializeInfo`:
- `native_modules` -> `builtins

`node::native_module::NativeModuleLoader`:
- `native_module` namespace -> `builtins` namespace
- `NativeModuleLoader` -> `BuiltinLoader`
- `NativeModuleRecordMap` -> `BuiltinSourceMap`
- `NativeModuleCacheMap` -> `BuiltinCodeCacheMap`
- `ModuleIds` -> `BuiltinIds`
- `ModuleCategories` -> `BuiltinCategories`
- `LoadBuiltinModuleSource` -> `LoadBuiltinSource`

`loader.js`:
- `NativeModule` -> `BuiltinModule` (the `NativeModule` name used in
  `process.moduleLoadList` is kept for compatibility)

And other clarifications in the documentation and comments.

PR-URL: https://github.com/nodejs/node/pull/44135
Backport-PR-URL: https://github.com/nodejs/node/pull/45663
Fixes: https://github.com/nodejs/node/issues/44036
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
2022-12-08 09:55:24 -05:00
Santiago Gimeno 953072d3db src: let http2 streams end after session close
After the stream has been marked as closed by the nghttp2 stack, there
might be still pending data to be sent: trailing headers is an example
of this. In that case, avoid reentering the nghttp2 stack synchronously
to allow the data to be written before actually closing the stream.

Fixes: https://github.com/nodejs/node/issues/42713
PR-URL: https://github.com/nodejs/node/pull/45153
Backport-PR-URL: https://github.com/nodejs/node/pull/45660
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2022-12-08 09:19:00 -05:00
Richard Lau 6733556783 test: add test to validate changelogs for releases
Add a new test to check that the changelog files have been correctly
updated for releases.

PR-URL: https://github.com/nodejs/node/pull/45325
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2022-12-07 11:11:10 -05:00
Luigi Pinca 704836033a crypto: update root certificates
Update the list of root certificates in src/node_root_certs.h with
tools/mk-ca-bundle.pl.

Certificates added:
- Autoridad de Certificacion Firmaprofesional CIF A62634068
- Certainly Root E1
- Certainly Root R1
- D-TRUST BR Root CA 1 2020
- D-TRUST EV Root CA 1 2020
- DigiCert TLS ECC P384 Root G5
- DigiCert TLS RSA4096 Root G5
- E-Tugra Global Root CA ECC v3
- E-Tugra Global Root CA RSA v3
- HiPKI Root CA - G1
- ISRG Root X2
- Security Communication ECC RootCA1
- Security Communication RootCA3
- Telia Root CA v2
- vTrus ECC Root CA
- vTrus Root CA

Certificates removed:
- Cybertrust Global Root
- DST Root CA X3
- GlobalSign Root CA - R2
- Hellenic Academic and Research Institutions RootCA 2011

PR-URL: https://github.com/nodejs/node/pull/45490
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-07 09:54:23 -05:00
Luigi Pinca 0ae5694f88 tools: update certdata.txt
This is the certdata.txt[0] from NSS 3.85, released on 2022-11-10.

This is the version of NSS that will ship in Firefox 108 on
2022-12-13.

[0] https://hg.mozilla.org/projects/nss/raw-file/NSS_3_85_RTM/lib/ckfw/builtins/certdata.txt

PR-URL: https://github.com/nodejs/node/pull/45490
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-07 09:54:13 -05:00
Pierrick Bouvier 821d832cef test: mark test-watch-mode* as flaky on all platforms
This was confirmed flaky on those platforms:
- Windows x64
- Windows on Arm
- Linux
- Freebsd

Tests randomly fail because of bad order in messages expected, which
seems related to threads scheduling at execution.

PR-URL: https://github.com/nodejs/node/pull/45049
Backport-PR-URL: https://github.com/nodejs/node/pull/44873
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-12-07 09:07:17 -05:00
Moshe Atlow 96d131665e cluster: use inspector utils
PR-URL: https://github.com/nodejs/node/pull/44592
Backport-PR-URL: https://github.com/nodejs/node/pull/44873
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-12-07 09:07:07 -05:00
Moshe Atlow 02a18eac69 test: fix test-runner-inspect
PR-URL: https://github.com/nodejs/node/pull/44620
Backport-PR-URL: https://github.com/nodejs/node/pull/44873
Fixes: https://github.com/nodejs/node/issues/44600
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-12-07 09:06:59 -05:00
Moshe Atlow 64d343af74 test_runner: support using --inspect with --test
PR-URL: https://github.com/nodejs/node/pull/44520
Backport-PR-URL: https://github.com/nodejs/node/pull/44873
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-12-07 09:05:04 -05:00
Moshe Atlow 99ee5e484d test_runner: fix duration_ms to be milliseconds
PR-URL: https://github.com/nodejs/node/pull/44450
Backport-PR-URL: https://github.com/nodejs/node/pull/44873
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-12-07 09:05:00 -05:00
Moshe Atlow 37e909251c test_runner: support programmatically running --test
PR-URL: https://github.com/nodejs/node/pull/44241
Backport-PR-URL: https://github.com/nodejs/node/pull/44873
Fixes: https://github.com/nodejs/node/issues/44023
Fixes: https://github.com/nodejs/node/issues/43675
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-12-07 09:04:55 -05:00
Richard Lau 5a776d4a69 deps: update timezone to 2022f
PR-URL: https://github.com/nodejs/node/pull/45613
Refs: https://github.com/nodejs/node/pull/45289
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-07 08:54:50 -05:00
Darshan Sen 891368cefd tools: remove faulty early termination logic from update-timezone.mjs
We do not build Node.js in the workflow so
https://github.com/nodejs/node/blob/f4815fcd7691364d8139b44c1295dbc46f6ee4a8/tools/update-timezone.mjs#L18
is actually the version of `tzdata` in the Node.js in the runner instead
of what's in `main`.

The script is pretty fast even when the versions differ and there is an
update, so this optimization doesn't seem to be worth having given the
problem.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/44870
Fixes: https://github.com/nodejs/node/issues/44865
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-11-24 11:14:45 -05:00
Darshan Sen 543493c242 tools: fix timezone update tool
The spawnSync call was previously silently failing with this error:
```sh
icupkg: unable to open input file "icudt*.dat"
```
because spawnSync doesn't support globbing. This change replaces the
spawnSync call with execSync because that supports globbing.

I have tested this workflow with some minor modifications in my fork and
I can confirm that it works as expected now. The bot opened this PR -
https://github.com/RaisinTen/node/pull/2 which updates
deps/icu-small/source/data/in/icudt71l.dat.bz2.

Fixes: https://github.com/nodejs/node/issues/44865
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/44870
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-11-24 11:14:28 -05:00
Darshan Sen 197df63f74 test: add a test to ensure the correctness of timezone upgrades
Currently, there's no way to know if a timezone upgrade PR is correct
without building and testing the change locally. This change provides a
solution for that.

Tested in https://github.com/RaisinTen/node/pull/4.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/45299
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-11-24 10:48:27 -05:00
Antoine du Hamel c77f660b75 tools: fix create-or-update-pull-request-action hash on GHA
Refs: https://github.com/nodejs/node/pull/45022#issuecomment-1290397901
PR-URL: https://github.com/nodejs/node/pull/45166
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2022-11-24 10:48:27 -05:00
Luigi Pinca 58c30dd049 tools: update gr2m/create-or-update-pull-request-action
Update gr2m/create-or-update-pull-request-action to version 1.9.1.

PR-URL: https://github.com/nodejs/node/pull/45022
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-11-24 10:48:26 -05:00
Darshan Sen bbef3c42f6 build: add version info to timezone update PR
Refs: https://github.com/nodejs/node/pull/44950#issuecomment-1275073089
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/45021
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-11-24 10:48:23 -05:00
theanarkh 33707dcd03 dgram: add dgram send queue info
PR-URL: https://github.com/nodejs/node/pull/44149
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-11-24 10:26:20 -05:00
Tobias Nießen c708d9bb94 doc: fix typo in parseArgs default value
Refs: https://github.com/nodejs/node/pull/44631
PR-URL: https://github.com/nodejs/node/pull/45083
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2022-11-24 09:30:31 -05:00
Manuel Spigolon 8c73279ebb util: add default value option to parsearg
Users can set a default
value for every expected
input argument

PR-URL: https://github.com/nodejs/node/pull/44631
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-11-24 09:28:33 -05:00
Luigi Pinca 749a4b3e5e tools: use Python 3.11 in GitHub Actions workflows
PR-URL: https://github.com/nodejs/node/pull/45191
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2022-11-24 08:21:58 -05:00
Luigi Pinca cc2c7648e0 build: support Python 3.11
PR-URL: https://github.com/nodejs/node/pull/45191
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2022-11-24 08:21:33 -05:00
Michael Dawson 5a0efa05d2 node-api: handle no support for external buffers
Refs: https://github.com/electron/electron/issues/35801
Refs: https://github.com/nodejs/abi-stable-node/issues/441

Electron recently dropped support for external
buffers. Provide a way for addon authors to:
- hide the methods to create external buffers so they can
  avoid using them if they want the broadest compatibility.
- call the methods that create external buffers at runtime
  to check if external buffers are supported and either
  use them or not based on the return code.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/45181
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-11-24 08:15:35 -05:00
npm CLI robot 3b2b70d792 deps: upgrade npm to 8.19.3
PR-URL: https://github.com/nodejs/node/pull/45322
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-11-24 07:47:10 -05:00
Node.js GitHub Bot 9fbc8b21db deps: update corepack to 0.15.1
PR-URL: https://github.com/nodejs/node/pull/45331
Backport-PR-URL: https://github.com/nodejs/node/pull/45246
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-11-24 07:44:46 -05:00
Node.js GitHub Bot 87e3d002ca deps: update corepack to 0.15.0
PR-URL: https://github.com/nodejs/node/pull/45235
Backport-PR-URL: https://github.com/nodejs/node/pull/45246
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2022-11-24 07:44:35 -05:00
legendecas 54608d8dc3 src: split property helpers from node::Environment
PR-URL: https://github.com/nodejs/node/pull/44056
Backport-PR-URL: https://github.com/nodejs/node/pull/44542
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-11-24 07:27:20 -05:00
Chengzhong Wu e972ff7b13 deps: V8: backport bbd800c6e359
Original commit message:

    [heap] Fix incorrect from space committed size

    NewSpace page operations like RemovePage, PrependPage, and
    EnsureCurrentCapacity should account for committed page size.

    This may happen when a page was promoted from the new space to
    old space on mark-compact.

    Also, add DCHECKs on Commit and Uncommit to ensure the final
    committed page size is the same as the current state.

    Bug: v8:12657
    Change-Id: I7aebc1fd3f51f177ae2ef6420f757f0c573e126b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3504766
    Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
    Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
    Cr-Commit-Position: refs/heads/main@{#79426}

Refs: https://github.com/v8/v8/commit/bbd800c6e3598a3756733a9c7eba00d7de168226
PR-URL: https://github.com/nodejs/node/pull/44947
Refs: https://github.com/v8/v8/commit/b953542909416a5be11220d9adf6da1aff1f009c
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2022-11-24 07:24:44 -05:00
Chengzhong Wu af9d8217c0 deps: V8: cherry-pick b95354290941
Original commit message:

    [extensions] Fix dcheck failures in getV8Statistics

    HeapObjectIterator creates a SafepointScope which requires the heap to
    allow garbage collection. This collides with the outer
    DisallowGarbageCollection scope. HeapObjectIterator already ensures
    there is no allocation during its lifetime, so there is no need to
    create an outer DisallowGarbageCollection scope.

    Code::source_position_table requires their kind not equals to
    CodeKind::BASELINE.

    This also exposes the statistics extension through flag
    --expose-statistics.

    Bug: v8:12657
    Change-Id: I1bf11cf499285a742dd99ec8c228ebc36152b597
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3496552
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Reviewed-by: Marja Hölttä <marja@chromium.org>
    Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
    Cr-Commit-Position: refs/heads/main@{#79425}

Refs: https://github.com/v8/v8/commit/b953542909416a5be11220d9adf6da1aff1f009c
PR-URL: https://github.com/nodejs/node/pull/44947
Refs: https://github.com/v8/v8/commit/bbd800c6e3598a3756733a9c7eba00d7de168226
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2022-11-24 07:24:41 -05:00
Richard Lau 42e9d8016a test: fix textdecoder test for small-icu builds
The `Shift_JIS` encoding may not be available, e.g. when Node.js is
configured with `--with-intl=small-icu`.

PR-URL: https://github.com/nodejs/node/pull/45225
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
2022-11-23 21:42:56 -05:00
Node.js GitHub Bot 38202d321b deps: update undici to 5.12.0
PR-URL: https://github.com/nodejs/node/pull/45236
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2022-11-23 21:28:47 -05:00
Moshe Atlow 6d736a56d8 test: fix watch mode test flake
PR-URL: https://github.com/nodejs/node/pull/44739
Backport-PR-URL: https://github.com/nodejs/node/pull/44976
Fixes: https://github.com/nodejs/node/issues/44735
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-11-23 14:47:19 -05:00
Moshe Atlow 543d3d2bf3 test: deflake watch mode tests
PR-URL: https://github.com/nodejs/node/pull/44621
Backport-PR-URL: https://github.com/nodejs/node/pull/44976
Fixes: https://github.com/nodejs/node/issues/44655
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-11-23 14:47:16 -05:00
Moshe Atlow 97f6caf4eb test: split watch mode inspector tests to sequential
PR-URL: https://github.com/nodejs/node/pull/44551
Backport-PR-URL: https://github.com/nodejs/node/pull/44976
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
2022-11-23 14:47:05 -05:00