Commit Graph

37899 Commits

Author SHA1 Message Date
Danielle Adams
0593b699b8
2023-01-05, Version 18.13.0 'Hydrogen' (LTS)
Notable changes:

Add support for externally shared js builtins:

By default Node.js is built so that all dependencies are bundled into the
Node.js binary itself. Some Node.js distributions prefer to manage dependencies
externally. There are existing build options that allow dependencies with
native code to be externalized. This commit adds additional options so that
dependencies with JavaScript code (including WASM) can also be externalized.
This addition does not affect binaries shipped by the Node.js project but
will allow other distributions to externalize additional dependencies when
needed.

Contributed by Michael Dawson in https://github.com/nodejs/node/pull/44376

Introduce `File`:

The File class is part of the [FileAPI](https://w3c.github.io/FileAPI/).
It can be used anywhere a Blob can, for example in `URL.createObjectURL`
and `FormData`. It contains two properties that Blobs do not have: `lastModified`,
the last time the file was modified in ms, and `name`, the name of the file.

Contributed by Khafra in https://github.com/nodejs/node/pull/45139

Support function mocking on Node.js test runner:

The `node:test` module supports mocking during testing via a top-level `mock`
object.

```js
test('spies on an object method', (t) => {
  const number = {
    value: 5,
    add(a) {
      return this.value + a;
    },
  };
  t.mock.method(number, 'add');

  assert.strictEqual(number.add(3), 8);
  assert.strictEqual(number.add.mock.calls.length, 1);
});
```

Contributed by Colin Ihrig in https://github.com/nodejs/node/pull/45326

Other notable changes:

build:
  * disable v8 snapshot compression by default (Joyee Cheung) https://github.com/nodejs/node/pull/45716
crypto:
  * update root certificates (Luigi Pinca) https://github.com/nodejs/node/pull/45490
deps:
  * update ICU to 72.1 (Michaël Zasso) https://github.com/nodejs/node/pull/45068
doc:
  * add doc-only deprecation for headers/trailers setters (Rich Trott) https://github.com/nodejs/node/pull/45697
  * add Rafael to the tsc (Michael Dawson) https://github.com/nodejs/node/pull/45691
  * deprecate use of invalid ports in `url.parse` (Antoine du Hamel) https://github.com/nodejs/node/pull/45576
  * add lukekarrys to collaborators (Luke Karrys) https://github.com/nodejs/node/pull/45180
  * add anonrig to collaborators (Yagiz Nizipli) https://github.com/nodejs/node/pull/45002
  * deprecate url.parse() (Rich Trott) https://github.com/nodejs/node/pull/44919
lib:
  * drop fetch experimental warning (Matteo Collina) https://github.com/nodejs/node/pull/45287
net:
  * (SEMVER-MINOR) add autoSelectFamily and autoSelectFamilyAttemptTimeout options (Paolo Insogna) https://github.com/nodejs/node/pull/44731
* src:
  * (SEMVER-MINOR) add uvwasi version (Jithil P Ponnan) https://github.com/nodejs/node/pull/45639
  * (SEMVER-MINOR) add initial shadow realm support (Chengzhong Wu) https://github.com/nodejs/node/pull/42869
test_runner:
  * (SEMVER-MINOR) add t.after() hook (Colin Ihrig) https://github.com/nodejs/node/pull/45792
  * (SEMVER-MINOR) don't use a symbol for runHook() (Colin Ihrig) https://github.com/nodejs/node/pull/45792
tls:
  * (SEMVER-MINOR) add "ca" property to certificate object (Ben Noordhuis) https://github.com/nodejs/node/pull/44935
  * remove trustcor root ca certificates (Ben Noordhuis) https://github.com/nodejs/node/pull/45776
tools:
  * update certdata.txt (Luigi Pinca) https://github.com/nodejs/node/pull/45490
util:
  * add fast path for utf8 encoding (Yagiz Nizipli) https://github.com/nodejs/node/pull/45412
  * improve textdecoder decode performance (Yagiz Nizipli) https://github.com/nodejs/node/pull/45294
  * (SEMVER-MINOR) add MIME utilities (#21128) (Bradley Farias) https://github.com/nodejs/node/pull/21128

PR-URL: https://github.com/nodejs/node/pull/46025
2023-01-05 19:57:23 -05:00
Deokjin Kim
cd4f4b4dfa
doc: describe argument of Symbol.for
Symbol is described with argument, but argument of Symbol.for
is ommited. So describe argument of Symbol.for for consistency.

Refs: https://github.com/nodejs/node/blob/main/doc/contributing/using-symbols.md#symbolstring
PR-URL: https://github.com/nodejs/node/pull/46019
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-01-04 20:37:33 +00:00
Antoine du Hamel
9b1ed04f2f
test,esm: validate more edge cases for dynamic imports
PR-URL: https://github.com/nodejs/node/pull/46059
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2023-01-04 13:52:23 +00:00
Chengzhong Wu
198d2037f1 node-api: disambiguate napi_add_finalizer
napi_add_finalizer doesn't support any operations related to
napi_wrap. Remove the ambiguous statements in the doc about
napi_wrap and avoid reusing the v8impl::Wrap call.

PR-URL: https://github.com/nodejs/node/pull/45401
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-01-04 18:56:12 +08:00
Deokjin Kim
5d4cb8464d
events: check signal before listener
In WPT Events, TypeError is expected if both listener and
signal are null. But checking listener doesn't throw TypeError.
So check signal before listener because checking signal throws
TypeError if signal is null.

PR-URL: https://github.com/nodejs/node/pull/46054
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2023-01-04 04:28:54 +00:00
cjihrig
57048acedc lib: fix incorrect use of console intrinsic
The console object was not being frozen because the intrinsic
freezing code was accessing undefined instead of the console
object.

PR-URL: https://github.com/nodejs/node/pull/46044
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-01-03 17:28:30 +00:00
cjihrig
30a548475b tools: fix lint rule recommendation
The lint rule recommends destructuring console out of the
internal/console/global.js export. However, that does not
exist. The top level export is actually the console object.

PR-URL: https://github.com/nodejs/node/pull/46044
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-01-03 17:28:28 +00:00
Filip Skokan
2d59d6b8b5
crypto: add KeyObject Symbol.toStringTag
PR-URL: https://github.com/nodejs/node/pull/46043
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-01-03 16:34:41 +00:00
Marco Ippolito
4080bada1a
http: join authorization headers
PR-URL: https://github.com/nodejs/node/pull/45982
Fixes: https://github.com/nodejs/node/issues/45699
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2023-01-03 10:43:21 +00:00
Darshan Sen
e35e893d26
src: speed up process.getActiveResourcesInfo()
This change reduces the number of calls that were crossing the JS-C++
boundary to 1 and also removes the need for calling Array::New()
multiple times internally and ArrayPrototypeConcat-ing the results
later on, thus improving performance.

Refs: https://github.com/nodejs/node/pull/44445#pullrequestreview-1220052837
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/46014
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-01-03 10:36:25 +00:00
theanarkh
6d49f46b48
dgram: sync the old handle state to new handle
PR-URL: https://github.com/nodejs/node/pull/46041
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2023-01-03 06:28:08 +00:00
Moshe Atlow
9eb363a3e0
test_runner: report file in test runner events
PR-URL: https://github.com/nodejs/node/pull/46030
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2023-01-02 21:22:54 +00:00
Node.js GitHub Bot
3a44f9a1a8
deps: update corepack to 0.15.3
PR-URL: https://github.com/nodejs/node/pull/46037
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2023-01-02 19:08:12 +00:00
Santiago Gimeno
a03529d828
net: handle socket.write(cb) edge case
Make sure that when calling `write()` on a connecting socket, the
callback is called if the socket is destroyed before the connection is
established.

Fixes: https://github.com/nodejs/node/issues/30841
PR-URL: https://github.com/nodejs/node/pull/45922
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-01-01 23:07:34 +00:00
Ben Noordhuis
8ec1b0870b crypto: ensure exported webcrypto EC keys use uncompressed point format
The WebCrypto spec apparently mandates that EC keys must be exported in
uncompressed point format. This commit makes it so.

Fixes: https://github.com/nodejs/node/issues/45859
PR-URL: https://github.com/nodejs/node/pull/46021
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2023-01-01 19:48:51 +01:00
Node.js GitHub Bot
a689b29a8e
meta: update AUTHORS
PR-URL: https://github.com/nodejs/node/pull/46040
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-01-01 16:48:47 +00:00
Node.js GitHub Bot
b902b00057
tools: update lint-md-dependencies to rollup@3.9.0
PR-URL: https://github.com/nodejs/node/pull/46039
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-01-01 16:48:38 +00:00
Node.js GitHub Bot
8b594e0f12
tools: update doc to unist-util-select@4.0.2
PR-URL: https://github.com/nodejs/node/pull/46038
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-01-01 16:48:29 +00:00
Yagiz Nizipli
5ba1717502
doc: update isUtf8 description
PR-URL: https://github.com/nodejs/node/pull/45973
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-01-01 16:40:18 +00:00
Ruy Adorno
361d34c514
tools: add release host var to promotion script
Adds a `NODEJS_RELEASE_HOST` environment variable that enable releasers
to provide a custom proxy host to connect to when performing the
promotion steps of a given release.

Signed-off-by: Ruy Adorno <ruyadorno@google.com>
PR-URL: https://github.com/nodejs/node/pull/45913
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-01-01 16:29:42 +00:00
Deokjin Kim
c87a1977ff
lib: update JSDoc of getOwnPropertyValueOrDefault
PR-URL: https://github.com/nodejs/node/pull/46010
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-01-01 16:58:04 +01:00
Deokjin Kim
4b9f94bd90
test: use process.hrtime.bigint instead of process.hrtime
`process.hrtime` is legacy. So replace `process.hrtime` with
`process.hrtime.bigint` in test.

Refs: https://github.com/nodejs/node/blob/main/doc/api/process.md#processhrtimetime

Signed-off-by: Deokjin Kim <deokjin81.kim@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/45877
Refs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-01-01 11:07:47 +00:00
Deokjin Kim
91b9a470b8
events: fix violation of symbol naming convention
Capital letter is followed after 'k' prefix.

PR-URL: https://github.com/nodejs/node/pull/45978
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2023-01-01 10:57:48 +00:00
Aaron Friel
71b9f79223
deps: V8: cherry-pick 30861a39323d
Original commit message:

    [debug] Re-enable internal [[Scopes]] property

    We received feedback that the [[Scopes]] property has some legitimate
    use-cases not covered by the Scopes View during pause.

    We re-enable the feature for now and will remove the flag in a
    follow-up.

    R=bmeurer@chromium.org

    Bug: chromium:1365858
    Change-Id: Ibf279ae6c4f5ae492d03e9b4ee7316f6500508d9
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4099385
    Auto-Submit: Simon Zünd <szuend@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Commit-Queue: Simon Zünd <szuend@chromium.org>
    Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#84800}

Refs: 30861a3932
PR-URL: https://github.com/nodejs/node/pull/45851
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-01-01 10:54:22 +00:00
Deokjin Kim
5e43f3d776
vm: refactor to use validateStringArray
PR-URL: https://github.com/nodejs/node/pull/46020
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2023-01-01 10:50:49 +00:00
Deokjin Kim
2582a0d2dd
async_hooks: refactor to use validateObject
PR-URL: https://github.com/nodejs/node/pull/46004
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-01-01 10:50:33 +00:00
Deokjin Kim
50744bb5f4
doc: use console.error for error case in timers and tls
console.error is more suitable than console.log for error case.

PR-URL: https://github.com/nodejs/node/pull/46002
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-01-01 06:41:28 +00:00
Deokjin Kim
87f541e77d
fs: refactor to use validateInteger
PR-URL: https://github.com/nodejs/node/pull/46008
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-01-01 06:33:50 +00:00
Deokjin Kim
979ec87665
stream: refactor to use validateFunction
PR-URL: https://github.com/nodejs/node/pull/46007
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-01-01 06:33:41 +00:00
Geoffrey Booth
e2dd139da0
esm: rewrite loader hooks test
Rewrite the test that validates that custom loader hooks are called from
being a test that depends on internals to one that spawns a child
process and checks its output to confirm expected behavior.

PR-URL: https://github.com/nodejs/node/pull/46016
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2022-12-31 21:23:36 +00:00
Michaël Zasso
0f69ec4dd7
deps: patch V8 to 10.9.194.9
Refs: https://github.com/v8/v8/compare/10.9.194.6...10.9.194.9
PR-URL: https://github.com/nodejs/node/pull/45995
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-12-31 09:02:27 +00:00
Deokjin Kim
d160518fbf
lib: use kEmptyObject as default value for options
`kEmptyObject` is more suitable than {} if options don't
need mutation.

PR-URL: https://github.com/nodejs/node/pull/46011
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-31 07:33:39 +00:00
Vadim
4830a6cf2a
src: fix typo in node_file.cc
`undefinec` -> `undefined`

PR-URL: https://github.com/nodejs/node/pull/45998
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-29 00:13:45 +01:00
Deokjin Kim
e27012b248
doc: fix wrong output of example in url.protocol
Tailing slash of url.href is ommited.

PR-URL: https://github.com/nodejs/node/pull/45954
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-28 21:19:34 +00:00
Deokjin Kim
0f23daae95
stream: fix typo in JSDoc
`vois` -> `void`

PR-URL: https://github.com/nodejs/node/pull/45991
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-28 18:41:13 +01:00
Santiago Gimeno
34af1f69b9
src: fix crash on OnStreamRead on Windows
On Windows it's perfectly possible that the `uv_tcp_t` `read_cb` is
called with an error and a null `uv_buf_t` if it corresponds to a
`UV_HANDLE_ZERO_READ` read. Handle this case without crashing.

Fixes: https://github.com/nodejs/node/issues/40764
PR-URL: https://github.com/nodejs/node/pull/45878
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-12-28 11:59:51 +00:00
Debadree Chatterjee
17cb655561
debugger: refactor console in lib/internal/debugger/inspect.js
Refs: https://github.com/nodejs/node/pull/38406/
PR-URL: https://github.com/nodejs/node/pull/45847
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
2022-12-28 11:59:41 +00:00
Deokjin Kim
6d8c5a4580
doc: use os.availableParallelism() in async_context and cluster
Refs: https://github.com/nodejs/node/pull/45895
PR-URL: https://github.com/nodejs/node/pull/45979
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-28 11:45:10 +00:00
Deokjin Kim
5754e04c9f
http: replace var with const on code of comment
`const` or `let` is more preferred than `var` except iteration.

PR-URL: https://github.com/nodejs/node/pull/45951
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2022-12-28 12:39:57 +01:00
legendecas
8dfd905ba3
src: add worker per-isolate binding initialization
Create worker binding templates in the per-isolate initialization.

PR-URL: https://github.com/nodejs/node/pull/45547
Refs: https://github.com/nodejs/node/issues/42528
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-12-28 11:55:24 +08:00
legendecas
43105220a7
src: define per-isolate internal bindings registration callback
Bindings that need to be loaded in distinct contexts of node::Realm in
the same node::Environment instance needs to share the per-isolate
templates.

Add a new binding registration callback, which is called with
per-IsolateData. This allows bindings to define templates and
share them across realms eagerly, and avoid accidental modification on
the templates when the per-context callback is called multiple times.

This also tracks loaded bindings and built-in modules with node::Realm.

PR-URL: https://github.com/nodejs/node/pull/45547
Refs: https://github.com/nodejs/node/issues/42528
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-12-28 11:55:14 +08:00
Node.js GitHub Bot
796c4f9376
deps: update simdutf to 2.0.9
PR-URL: https://github.com/nodejs/node/pull/45975
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-27 23:32:41 +00:00
Deokjin Kim
0bd8b4323c
doc: make EventEmitterAsyncResource's options as optional
Refs: https://github.com/nodejs/node/blob/main/lib/events.js#L140
PR-URL: https://github.com/nodejs/node/pull/45985
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-27 13:00:30 +00:00
Antoine du Hamel
6d829f00c9
tools: add url to AUTHORS update automation
This should simplify the review of `AUTHORS` file updates.

PR-URL: https://github.com/nodejs/node/pull/45971
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-27 12:34:45 +00:00
Colin Ihrig
610b2e45e7
deps: update to uvwasi 0.0.14
Notable changes:

- Windows applications not in ConsoleMode now properly guess
  handle types for FILE_TYPE_CHAR file types which cannot be
  stat'ed.
- The UVWASI_DEBUG macro can now be used without a format string.
- The libuv dependency has been updated to v1.44.2.

PR-URL: https://github.com/nodejs/node/pull/45970
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2022-12-27 03:51:58 +00:00
Colin Ihrig
fe5710effc
test_runner: use os.availableParallelism()
This commit addresses an existing TODO in the code by moving
to the new os.availableParallelism() instead of os.cpus().length.

PR-URL: https://github.com/nodejs/node/pull/45969
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-12-27 03:30:19 +00:00
Node.js GitHub Bot
248679ba31
meta: update AUTHORS
PR-URL: https://github.com/nodejs/node/pull/45968
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-12-27 00:47:49 +00:00
Node.js GitHub Bot
ff48c5f079
tools: update lint-md-dependencies to rollup@3.8.1
PR-URL: https://github.com/nodejs/node/pull/45967
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-27 00:47:41 +00:00
Geoffrey Booth
eb4c83fc00
test: print failed JS/parallel tests
PR-URL: https://github.com/nodejs/node/pull/45960
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Christian Clauss <cclauss@me.com>
2022-12-27 00:26:06 +00:00
Yagiz Nizipli
7c7d2e8dc6
deps: fix updater github workflow job
PR-URL: https://github.com/nodejs/node/pull/45972
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-25 22:29:11 +00:00