Commit Graph

36862 Commits

Author SHA1 Message Date
theanarkh
818bd6cb4d net: remove unused callback
PR-URL: https://github.com/nodejs/node/pull/44204
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
2022-08-11 09:33:14 +00:00
Chengzhong Wu
c3770536bc doc: update tags in adding-new-napi-api.md
The tag is now renamed as "node-api".

PR-URL: https://github.com/nodejs/node/pull/44190
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
2022-08-10 16:59:52 +00:00
theanarkh
eb7f22a6b4 perf_hooks: fix gc elapsed time
PR-URL: https://github.com/nodejs/node/pull/44058
Refs: https://github.com/nodejs/node/issues/44046
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-08-10 16:44:05 +00:00
Evan Lucas
37115034dd doc: fix typo in diagnostics_channel
The diagnostics_channel Channel class description had
a typo.

PR-URL: https://github.com/nodejs/node/pull/44199
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
2022-08-10 15:47:59 +00:00
Filip Skokan
c3ff198a77 test: update WPT runner
PR-URL: https://github.com/nodejs/node/pull/43455
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2022-08-10 12:39:20 +00:00
Basit Chonka
9b8ba25360 events: use bitset to save memory
PR-URL: https://github.com/nodejs/node/pull/43700
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-08-10 13:01:10 +02:00
Kohei Ueno
3028af95de test: update wpt url status
PR-URL: https://github.com/nodejs/node/pull/44175
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-08-10 06:49:42 +00:00
Node.js GitHub Bot
ec444037cd deps: update undici to 5.8.2
PR-URL: https://github.com/nodejs/node/pull/44187
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-08-09 22:55:40 +00:00
Joyee Cheung
5291096ca2 bootstrap: check more metadata when loading the snapshot
This patch stores the metadata about the Node.js binary
into the SnapshotData and adds fields denoting how the
snapshot was generated, on what platform it was
generated as well as the V8 cached data version flag.
Instead of simply crashing when the metadata doesn't
match, Node.js now prints an error message and exit with
1 for the customized snapshot, or ignore the snapshot
and start from scratch if it's the default one.

PR-URL: https://github.com/nodejs/node/pull/44132
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2022-08-09 18:01:02 +00:00
Nick Sia
b4279240f5 http: fix error message when specifying headerTimeout for createServer
This change fixes the message on the error received when calling
http.createServer(...) with a header timeout greater than the request
timeout is incorrect.

The validation requires that the header timeout is lower than the
request timeout, but the error message asks for the opposite.

PR-URL: https://github.com/nodejs/node/pull/44163
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
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: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
2022-08-09 09:27:18 +00:00
Shelley Vohr
8b0e5b19bd src: fix cppgc incompatibility in v8
This patch updates the layout of the BaseObjects to make sure
that the first embedder field of them is a "type" pointer, the
first 16 bits of which are the Node.js embedder ID, so that
cppgc will always skip over them. In addition we now use this
field to determine if the native object should be interpreted
as a Node.js embedder object in the serialization and deserialization
callbacks for the startup snapshot to improve the reliability.

Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/43521
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-08-09 16:47:43 +08:00
Joyee Cheung
472edc775d 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
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-08-09 01:36:49 +08:00
theanarkh
fa22337901 lib: fix diagnostics channel
PR-URL: https://github.com/nodejs/node/pull/44154
Fixes: https://github.com/nodejs/node/issues/44143
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2022-08-08 17:07:03 +00:00
Yagiz Nizipli
f136e7ec31 test: update wasm/jsapi web platform tests
PR-URL: https://github.com/nodejs/node/pull/44100
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-08-08 09:55:00 +00:00
Yagiz Nizipli
5465886d5d test: update hr-time web platform tests
PR-URL: https://github.com/nodejs/node/pull/44100
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-08-08 09:54:59 +00:00
Yagiz Nizipli
118f001b67 test: update console web platform tests
PR-URL: https://github.com/nodejs/node/pull/44100
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-08-08 09:54:59 +00:00
Antoine du Hamel
6f9eff880b esm: do not bind loader hook functions
PR-URL: https://github.com/nodejs/node/pull/44122
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-08-08 08:51:35 +00:00
Node.js GitHub Bot
80ef02b13f deps: update undici to 5.8.1
PR-URL: https://github.com/nodejs/node/pull/44158
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-08-08 08:41:22 +00:00
Node.js GitHub Bot
ba7505ebd5 tools: update eslint to 8.21.0
PR-URL: https://github.com/nodejs/node/pull/44162
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-08-08 00:34:52 +00:00
Rafael Gonzaga
ef33e93101 build: add workflow to label flaky-test platform
This workflow adds platform labels on `flaky-test` issues to make it
easier and more reliable for someone to use labels to (for example)
find all flaky tests on SmartOS or all flaky tests on FreeBSD.

PR-URL: https://github.com/nodejs/node/pull/44042
Fixes: https://github.com/nodejs/node/issues/43854
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-08-07 22:34:03 +00:00
Node.js GitHub Bot
aa7cd87cf4 deps: update corepack to 0.12.2
PR-URL: https://github.com/nodejs/node/pull/44159
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
2022-08-07 15:22:43 +00:00
Node.js GitHub Bot
2a965ab5b5 tools: update lint-md-dependencies to @rollup/plugin-commonjs@22.0.2
PR-URL: https://github.com/nodejs/node/pull/44160
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-08-07 14:23:41 +00:00
Node.js GitHub Bot
973ec26652 meta: update AUTHORS
PR-URL: https://github.com/nodejs/node/pull/44161
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-08-07 14:23:31 +00:00
Keyhan Vakil
3738b57102 test: move tests with many workers to sequential
These tests spawn many workers, which may be CPU intensive causing
timeouts (see the referenced PR for more details). Let's move them
to sequential.

Refs: https://github.com/nodejs/node/pull/44090
PR-URL: https://github.com/nodejs/node/pull/44139
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2022-08-07 12:44:33 +00:00
Nick Sia
a31d572f00 test: deflake gc-http-client tests by restricting number of requests
sequential/test-gc-http-client tests were sometimes failing due to
a non-deterministic number of requests being created, causing the
test to fail on some systems with a "ECONNRESET" error caused by
too many concurrent connections

Fixes: https://github.com/nodejs/node/issues/43638
PR-URL: https://github.com/nodejs/node/pull/44146
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-08-07 12:44:25 +00:00
Keyhan Vakil
f045a13cc9 test: move test-vm-break-on-sigint to sequential
This PR moves `test-vm-break-on-sigint.js` to sequential, following the
other PRs I have made to move CPU intensive tests into sequential. The
test has already been tuned to do less iterations in a previous PR.
However it is still causing ~7% of build failures. The timeouts seem
highly correlated with other tests which spawn a bunch of threads also
failing, see for example the [first Jenkins failure][] and the [last
Jenkins failure][].

[first Jenkins failure]: https://ci.nodejs.org/job/node-test-pull-request/45756/
[last Jenkins failure]: https://ci.nodejs.org/job/node-test-pull-request/45837/

Refs: https://github.com/nodejs/node/pull/44090
Refs: https://github.com/nodejs/node/pull/43981
Refs: https://github.com/nodejs/reliability/issues/337
PR-URL: https://github.com/nodejs/node/pull/44140
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
2022-08-07 12:26:59 +00:00
Luigi Pinca
b2f4a55770 test: remove test-http-client-response-timeout flaky designation
The issue was fixed by https://github.com/nodejs/node/pull/43890.

Fixes: https://github.com/nodejs/node/issues/43680
PR-URL: https://github.com/nodejs/node/pull/44145
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
2022-08-07 12:26:50 +00:00
BuShe
88d55d20d1 build: optimized and fixed building configuration to Android
PR-URL: https://github.com/nodejs/node/pull/44016
Reviewed-By: Yash Ladha <yash@yashladha.in>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
2022-08-07 11:17:20 +00:00
Keyhan Vakil
7a4e7532aa test: deflake test-diagnostics-channel-net
This test uses the deprecated methods in `diagnostic_channel` (see the
reference), which are deprecated because the channels can be GC'd while
in use, leading to lost messages.

Change to use the non-deprecated APIs, which should work. I wasn't able
to reproduce this locally; I assume it's memory dependent.

Refs: https://github.com/nodejs/node/pull/42714
Fixes: https://github.com/nodejs/node/issues/44143
PR-URL: https://github.com/nodejs/node/pull/44144
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2022-08-07 06:57:29 +00:00
Livia Medeiros
3ec88760e6 doc: add Retry CI in collaborator guide
PR-URL: https://github.com/nodejs/node/pull/44130
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2022-08-06 23:38:40 +00:00
Adam Majer
26d7015192 test: s390x z15 accelerated zlib fixes
Modern s390x x15 has accelerated zlib operations on the CPU. Many
distros currently have patches to take advantage of this feature. One
side-effect of these patches is that compression routine is no longer
deterministic as with software. Interruption to input produces
different compressed results. Invalid input can result in processor
fault.

PR-URL: https://github.com/nodejs/node/pull/44117
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2022-08-06 21:29:00 +00:00
Saurabh Daware
433e9bbefe doc: add performance note to --enable-source-maps docs
PR-URL: https://github.com/nodejs/node/pull/43817
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2022-08-07 00:15:13 +08:00
legendecas
0a2c910ae9 src,lib: print prinstine source when source map source not found
Print unmapped source lines when the source map source is not
found. Error stacks should be correctly mapped even when the
source is absent.

PR-URL: https://github.com/nodejs/node/pull/44052
Refs: https://github.com/nodejs/node/pull/44019
Reviewed-By: Ben Coe <bencoe@gmail.com>
2022-08-06 19:56:27 +08:00
Facundo Tuesca
994081f914 tools: update undici CPE in vuln checking script
This changes the search method for `undici` on the NVD database.
Before, since `undici` did not have a CPE assigned, the search
was by keyword. Now that a CPE was assigned, it is used to query
for new vulnerabilities.

PR-URL: https://github.com/nodejs/node/pull/44128
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-08-06 10:39:58 +00:00
Keyhan Vakil
760ecc9c75 src: prevent copying ArrayBufferViewContents
It is error-prone to copy or heap-allocate `ArrayBufferViewContents`,
because you might accidentally cause it to exceed the lifetime of its
argument. Let's make it impossible to do so. Fortunately we were not
doing so anywhere already, so this diff is purely defensive.

Refs: https://github.com/nodejs/node/pull/44079#discussion_r934376046
PR-URL: https://github.com/nodejs/node/pull/44091
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-08-06 04:01:22 +00:00
Milad Fa
90c758c59e deps: V8: cherry-pick 9861ce1deae2
Original commit message:

    PPC: pass a scratch reg when using register_location

    Change-Id: I43e4a4cadc60e958d6c9d80e725a49a3e36d8ba9
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3797832
    Reviewed-by: Junliang Yan <junyan@redhat.com>
    Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
    Cr-Commit-Position: refs/heads/main@{#82146}

Fixes: https://github.com/nodejs/node/issues/44055
PR-URL: https://github.com/nodejs/node/pull/44115
Refs: 9861ce1dea
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2022-08-05 18:41:31 -04:00
Anna Henningsen
b697160256 src: add detailed embedder process initialization API
So far, process initialization has been a bit all over the place
in Node.js. `InitializeNodeWithArgs()` is our main public API
for this, but inclusion of items in it vs. `InitializeOncePerProcess()`
and `PlatformInit()` has been random at best. Likewise,
some pieces of initialization have been guarded by
`NODE_SHARED_MODE`, but also fairly randomly and without
any meaningful connection to shared library usage.

This leaves embedders in a position to cherry-pick some of
the initialization code into their own code to make their
application behave like typical Node.js applications to the
degree to which they desire it.

Electron takes an alternative route and makes direct use of
`InitializeOncePerProcess()` already while it is a private
API, with a `TODO` to add it to the public API in Node.js.

This commit addresses that `TODO`, and `TODO`s around the
`NODE_SHARED_MODE` usage. Specifically:

- `InitializeOncePerProcess()` and `TearDownOncePerProcess()`
  are added to the public API.
- The `flags` option of these functions are merged with the
  `flags` option for `InitializeNodeWithArgs()`, since they
  essentially share the same semantics.
- The return value of the function is made an abstract class,
  rather than a struct, for easier API/ABI stability.
- Initialization code from `main()` is brought into these
  functions (since that makes sense in general).
- Add a `TODO` for turning `InitializeNodeWithArgs()` into
  a small wrapper around `InitializeOncePerProcess()` and
  eventually removing it (at least one major release cycle
  each, presumably).
- Remove `NODE_SHARED_MODE` guards and replace them with
  runtime options.

PR-URL: https://github.com/nodejs/node/pull/44121
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2022-08-05 19:46:08 +00:00
theanarkh
4c5b96b376 http: trace http request / response
PR-URL: https://github.com/nodejs/node/pull/44102
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2022-08-05 14:25:06 +00:00
Antoine du Hamel
464d1c1558 lib: reset RegExp statics before running user code
Fixes: https://github.com/nodejs/node/issues/43740

PR-URL: https://github.com/nodejs/node/pull/43741
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-08-05 10:01:32 +02:00
Keyhan Vakil
9ec2787723 test: tune down parallelism for some flaky tests
These tests seem to timeout quite often. I don't know why, but one
possible reason is that they are starting a lot of threads. It seems
that tests in `test/parallel` are assumed to only start one thread each,
so having 11 threads running at a time feels like a lot.

It also seems that these tests fail in a correlated fashion: take a look
at [this reliability report][]. The failures all occur on the same build
machines on the same PRs. This suggests to me some sort of CPU
contention.

[this reliability report]: https://github.com/nodejs/reliability/issues/334

On my Linux machine decreasing the parallelism & iterations here reduce
the `user` time from ~11.5 seconds to ~2 seconds, depending on the test.
I have seen these tests take 30-60 seconds on CI (Alpine in particular).

I went back to the diffs that introduced that introduced these changes
and verified that they failed at least 90% of the time with the reduced
iteration count, which feels sufficient.

Refs: https://github.com/nodejs/node/issues/43499
Refs: https://github.com/nodejs/node/issues/43084
PR-URL: https://github.com/nodejs/node/pull/44090
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-08-05 04:43:39 +00:00
mscdex
0e034e60bf deps: remove unnecessary file
PR-URL: https://github.com/nodejs/node/pull/44133
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
2022-08-05 04:43:32 +00:00
npm CLI robot
96601cc759 deps: upgrade npm to 8.16.0
PR-URL: https://github.com/nodejs/node/pull/44119
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2022-08-05 04:23:58 +00:00
alexcfyung
02aa8c22c2 lib: pass env variables to child process on z/OS
PR-URL: https://github.com/nodejs/node/pull/42255
Reviewed-By: Michael Dawson <midawson@redhat.com>
2022-08-04 18:52:43 -04:00
Antoine du Hamel
9cecba0f1c module: protect against prototype mutation
Ensures that mutating the `Object` prototype does not influence the
parsing of `package.json` files.

PR-URL: https://github.com/nodejs/node/pull/44007
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2022-08-04 22:41:48 +00:00
Keyhan Vakil
4c725f4e91 src: remove usages of GetBackingStore in crypto
This removes all usages of GetBackingStore in `crypto`. See the
linked issue for an explanation.

Note: I am not sure of the lifetime semantics intended by
`ArrayBufferOrViewContents` -- I am pretty sure it is correct based on
a manual audit of the callsites, but please ensure that it is correct.

Refs: https://github.com/nodejs/node/issues/32226
Refs: https://github.com/nodejs/node/pull/43921
PR-URL: https://github.com/nodejs/node/pull/44079
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-08-04 22:41:38 +00:00
Kohei Ueno
c8bea71bba stream: update TextEncoderStream to align the latest spec
PR-URL: https://github.com/nodejs/node/pull/44101
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-08-04 22:41:28 +00:00
Joyee Cheung
3970c7acd2 bootstrap: turn on FunctionCodeHandling::kKeep in the snapshot builder
To improve startup performance.

PR-URL: https://github.com/nodejs/node/pull/44104
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-08-04 22:41:17 +00:00
Colin Ihrig
74c2d65f39 doc: remove unused code in call tracker example
This function appears to be unused, so remove it.

PR-URL: https://github.com/nodejs/node/pull/44127
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-08-04 22:32:48 +00:00
Jacob Smith
e0b440ae32 esm: fix loader hooks accepting too many arguments
PR-URL: https://github.com/nodejs/node/pull/44109
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-08-04 22:10:13 +00:00
Joyee Cheung
06f5d45647 bootstrap: support more builtins in the embedded code cache
This patch:

- Make NativeModuleLoader::LookupAndCompile() detect parameters based
  on module IDs. This allows us to compile more builtins when
  generating the embedded bootstrap, including
  - internal/per_context/*
  - internal/bootstrap/*
  - internal/main/*
- Move pre_execution.js to lib/internal/process as it needs to be
  compiled as a regular built-in module, unlike other scripts
  in lib/internal/bootstrap
- Move markBootstrapComplete() to the performance binding instead of
  making it a function-wrapper-based global to reduce number of
  special cases.

PR-URL: https://github.com/nodejs/node/pull/44018
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-08-05 01:11:20 +08:00