Commit Graph

37774 Commits

Author SHA1 Message Date
Rafael Gonzaga
b3f5a41ad6
doc: remove Juan Jose keys
PR-URL: https://github.com/nodejs/node/pull/45827
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
2022-12-14 18:25:22 +00:00
Antoine du Hamel
1c3ba4c5fa
repl: improve robustness wrt to prototype pollution
PR-URL: https://github.com/nodejs/node/pull/45604
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-12-14 15:48:50 +01:00
Michaël Zasso
b4f8186657
2022-12-14, Version 19.3.0 (Current)
Notable changes:

build:
  * disable v8 snapshot compression by default (Joyee Cheung) https://github.com/nodejs/node/pull/45716
deps:
  * upgrade npm to 9.2.0 (npm team) https://github.com/nodejs/node/pull/45780
doc:
  * add doc-only deprecation for headers/trailers setters (Rich Trott) https://github.com/nodejs/node/pull/45697
  * add Rafael Gonzaga to the TSC (Michael Dawson) https://github.com/nodejs/node/pull/45691
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
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:
  * remove trustcor root ca certificates (Ben Noordhuis) https://github.com/nodejs/node/pull/45776

PR-URL: https://github.com/nodejs/node/pull/45831
2022-12-14 13:52:52 +00:00
Fabien Michel
bfb5ba7776
tools: fix incorrect version history order
This fixes an error in parseYAML(text), the version sorting
coudn't be right as we compared an arrify string
(ie. a = ["v18.11, v16.7.0"]) with an array of strings
(ie. b = ["v18.07", "v16.7.0"]) in versionSort(a, b).

minVersion(a) couldn't find the minimum version with an arrify string
like a = ["v18.11, v16.7.0"].
That's why incorrect version history orders sometimes appeared.

Furthermore, no need to sort the added version as it always comes first.
So, it can be the last one to be pushed in the meta.changes array.

Fixes: https://github.com/nodejs/node/issues/45670

Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/45728
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-14 09:38:36 +00:00
Node.js GitHub Bot
cf0a42cf11
tools: update eslint to 8.29.0
PR-URL: https://github.com/nodejs/node/pull/45733
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-12-14 00:47:02 +00:00
Filip Skokan
da416697fa
test: enable idlharness WebCryptoAPI WPTs
PR-URL: https://github.com/nodejs/node/pull/45822
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-13 21:58:03 +00:00
Filip Skokan
0665fa4009 doc: remove last example use of require('crypto').webcrypto
PR-URL: https://github.com/nodejs/node/pull/45819
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-12-13 19:12:02 +01:00
Moshe Atlow
232efb06fe
test_runner: parse yaml
PR-URL: https://github.com/nodejs/node/pull/45815
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-12-13 14:51:35 +00:00
Richard Lau
a14244ce26
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
2022-12-13 08:01:09 -05:00
Richard Lau
c7946b1744
2022-12-13, Version 14.21.2 'Fermium' (LTS)
Notable changes:

OpenSSL 1.1.1s
Root certificates updated to NSS 3.85
Time zone update to 2022f

PR-URL: https://github.com/nodejs/node/pull/45775
2022-12-13 07:44:16 -05:00
Filip Skokan
f9e3c1ba1c
test: remove use of --experimental-global-webcrypto flag
PR-URL: https://github.com/nodejs/node/pull/45816
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2022-12-13 11:03:08 +00:00
Node.js GitHub Bot
042977465e
deps: update undici to 5.14.0
PR-URL: https://github.com/nodejs/node/pull/45812
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-12-13 00:50:11 +00:00
David Benjamin
8b89d4d421 tls: don't treat fatal TLS alerts as EOF
SSL_RECEIVED_SHUTDOWN means not just close_notify or fatal alert. From
what I can tell, this was just a mistake? OnStreamRead's comment
suggests eof_ was intended to be for close_notify.

This fixes a bug in TLSSocket error reporting that seems to have made it
into existing tests. If we receive a fatal alert, EmitRead(UV_EOF)
would, via onConnectEnd in _tls_wrap.js, synthesize an ECONNRESET before
the alert itself is surfaced. As a result, TLS alerts received during
the handshake are misreported by Node.

See the tests that had to be updated as part of this.

PR-URL: https://github.com/nodejs/node/pull/44563
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-12 19:45:58 +00:00
David Benjamin
7c745142a4 tls: fix re-entrancy issue with TLS close_notify
Like errno, OpenSSL's API requires SSL_get_error and error queue be
checked immediately after the failing operation, otherwise the error
queue or SSL object may have changed state and no longer report
information about the operation the caller wanted.

TLSWrap almost heeds this rule, except in TLSWrap::ClearOut. If SSL_read
picks up a closing alert (detected by checking SSL_get_shutdown), Node
calls out to JS with EmitRead(UV_EOF) and only afterwards proceeds to
dispatch on the error. But, by this point, Node has already re-entered
JS, which may change the error.

In particular, I've observed that, on close_notify, JS seems to
sometimes call back into TLSWrap::DoShutdown, calling SSL_shutdown. (I
think this comes from onStreamRead in stream_base_commons.js?)

Instead, SSL_get_error and the error queue should be sampled earlier.
Back in #1661, Node needed to account for GetSSLError being called after
ssl_ was destroyed. This was the real cause. With this fixed, there's no
need to account for this. (Any case where ssl_ may be destroyed before
SSL_get_error is a case where ssl_ or the error queue could change
state, so it's a bug either way.)

This is the first of two fixes in error-handling here. The
EmitRead(UV_EOF) seems to additionally swallow fatal alerts from the
peer. Some of the ECONNRESET expectations in the tests aren't actually
correct. The next commit will fix this as well.

PR-URL: https://github.com/nodejs/node/pull/44563
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-12 19:45:57 +00:00
Deokjin Kim
ef8aa88866
doc: fix wrong output of example in util
In `mime.type` of util, `application/javascript` is actual output,
but described as `application/javascript/javascript`.

PR-URL: https://github.com/nodejs/node/pull/45825
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-12-12 18:11:44 +00:00
Antoine du Hamel
aa2ca81f60
lib: remove unnecessary lazy loading in internal/encoding
PR-URL: https://github.com/nodejs/node/pull/45810
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-12 15:17:53 +00:00
Antoine du Hamel
bb908fc886
crypto: simplify lazy loading of internal modules
The internal `require()` is actually just one map load (to see if the
module is already loaded) + one property load (state check for circular
dependencies) for modules that are already loaded.

Refs: https://github.com/nodejs/node/pull/45659#discussion_r1033762328
PR-URL: https://github.com/nodejs/node/pull/45809
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-12-12 15:17:44 +00:00
Antoine du Hamel
6cef4a6b5d
buffer: remove unnecessary lazy loading
PR-URL: https://github.com/nodejs/node/pull/45807
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2022-12-12 13:53:27 +00:00
Ben Noordhuis
74a6f0bd07
test: remove flaky parallel/test-process-wrap test
It's an old test (added when switching from libev to libuv) that tests
implementation details of the internal process_wrap bindings. That kind
of thing doesn't need testing in this day and age, and since the test is
flaky, simply remove it instead of sinking time in fixing it up.

Fixes: https://github.com/nodejs/node/issues/45805
PR-URL: https://github.com/nodejs/node/pull/45806
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-12 11:42:44 +00:00
Marco Ippolito
c6c3eea470
doc: buffer.fill empty value
PR-URL: https://github.com/nodejs/node/pull/45794
Fixes: https://github.com/nodejs/node/issues/45727
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2022-12-12 09:25:06 +00:00
Antoine du Hamel
2483da743c
test_runner: refactor tap_lexer to use more primordials
PR-URL: https://github.com/nodejs/node/pull/45744
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-12-12 07:30:47 +01:00
Joyee Cheung
a996638e53
build: disable v8 snapshot compression by default
In the upstream, V8 also disables snapshot compression on the
desktop by default because the size reduction is not worth the
performance hit.
https://chromium-review.googlesource.com/c/v8/v8/+/3275554

Locally the binary size of Node.js is increased by ~2.7MB
(+3.2%) with a significant speedup in startup after snapshot
compression is disabled on macOS.

Also adds a --v8-enable-snapshot-compression to configure.py for
users who prefer a size reduction over speedup in startup.
Ideally we should implement our own compression for the source
code + the code cache + the snapshot instead of relying on V8's
builtin compression for just the snapshot.

PR-URL: https://github.com/nodejs/node/pull/45716
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2022-12-12 01:53:53 +01:00
Antoine du Hamel
7f9e4faf0c
test: order list alphabetically in test-bootstrap-modules
PR-URL: https://github.com/nodejs/node/pull/45808
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-12-11 23:41:46 +00:00
Antoine du Hamel
7a42a206ac
test_runner: refactor tap_parser to use more primordials
PR-URL: https://github.com/nodejs/node/pull/45745
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-11 22:34:31 +00:00
Debadree Chatterjee
79a977ae31
watch: add CLI flag to preserve output
Fixes: https://github.com/nodejs/node/issues/45713
PR-URL: https://github.com/nodejs/node/pull/45717
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2022-12-11 23:23:11 +01:00
Pulkit Gupta
22dc987fde
test: fix invalid output TAP if there newline in test name
PR-URL: https://github.com/nodejs/node/pull/45742
Fixes: https://github.com/nodejs/node/issues/45396
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-12-11 20:02:37 +00:00
Jithil P Ponnan
5108cf2df4
src: add uvwasi version
PR-URL: https://github.com/nodejs/node/pull/45639
Refs: https://github.com/nodejs/node/issues/45260
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-12-11 19:24:28 +00:00
cjihrig
215c5317d4 test_runner: add t.after() hook
This commit adds an after() hook to the TestContext class. This
hook can be used to clean up after a test finishes.

PR-URL: https://github.com/nodejs/node/pull/45792
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-12-11 19:19:07 +00:00
cjihrig
8302b0add0 test_runner: don't use a symbol for runHook()
This is not exposed to userland, so there is no need to put it
behind a symbol.

PR-URL: https://github.com/nodejs/node/pull/45792
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-12-11 19:19:06 +00:00
Anna Henningsen
d498bd9a8c
src: simplify NodeBIO::GetMethod initialization
Make its initialization self-contained to avoid unnecessarily
breaking encapsulation.

PR-URL: https://github.com/nodejs/node/pull/45799
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-12-11 14:45:07 +00:00
Ben Noordhuis
8273320f9f
src: make structuredClone work for process.env
Fixes: https://github.com/nodejs/node/issues/45380
PR-URL: https://github.com/nodejs/node/pull/45698
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-11 12:54:15 +00:00
Node.js GitHub Bot
43f9bb373b
meta: update AUTHORS
PR-URL: https://github.com/nodejs/node/pull/45814
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-11 06:28:19 +00:00
Mohammed Keyvanzadeh
a184d88591
build: add python 3.11 support for android
Add Python 3.11 support for configuring Node.js for Android.

PR-URL: https://github.com/nodejs/node/pull/45765
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2022-12-11 02:58:02 +00:00
Anna Henningsen
94d23f5ec0
src: mark generated snapshot_data as const
This renders the mutex protecting it unnecessary, since mutexes
only need to protect concurrent accesses to mutable data.

PR-URL: https://github.com/nodejs/node/pull/45786
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-12-10 17:16:24 +00:00
Debadree Chatterjee
2ec418984b
lib: allow Writeable.toWeb() to work on http.Outgoing message
Attempted to fix the issue by watering down the condition being
checked in internal/streams/utils isWritableNodeStream utility

Fixes: https://github.com/nodejs/node/issues/44188
PR-URL: https://github.com/nodejs/node/pull/45642
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-10 17:06:40 +00:00
Antoine du Hamel
c17231054b
readline: improve robustness against prototype mutation
PR-URL: https://github.com/nodejs/node/pull/45614
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-12-10 17:51:51 +01:00
Ben Noordhuis
3ff724dd23
tls: remove trustcor root ca certificates
Follow what Ubuntu did and simply remove the CA certificates
altogether.

Fixes: https://github.com/nodejs/node/issues/45762
Refs: https://ubuntu.com/security/notices/USN-5761-2
PR-URL: https://github.com/nodejs/node/pull/45776
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2022-12-10 15:57:01 +00:00
Yagiz Nizipli
b06fd8cd45
benchmark: add variety of inputs to text-encoder
PR-URL: https://github.com/nodejs/node/pull/45787
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2022-12-10 14:45:22 +00:00
Yagiz Nizipli
894aff75be
deps: V8: cherry-pick bc831f8ba33b
Original commit message:

    [fastcall] Implement support for onebyte string arguments

    This CL adds one byte string specialization support for fast API call arguments.
    It introduces a kOneByteString variant to CTypeInfo.

    We see a ~6x improvement in Deno's TextEncoder#encode microbenchmark.
    Rendered results: https://divy-v8-patches.deno.dev/

    Bug: chromium:1052746
    Change-Id: I47c3a9e101cd18ddc6ad58f627db3a34231b60f7
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4036884
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Reviewed-by: Maya Lekova <mslekova@chromium.org>
    Commit-Queue: Maya Lekova <mslekova@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#84552}

Refs: bc831f8ba3
PR-URL: https://github.com/nodejs/node/pull/45788
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2022-12-10 14:23:50 +00:00
Joyee Cheung
265ea1e74e
bootstrap: lazy load non-essential modules
It turns out that even with startup snapshots, there is a non-trivial
overhead for loading internal modules. This patch makes the loading
of the non-essential modules lazy again.

Caveat: we have to make some of the globals lazily-loaded too,
so the WPT runner is updated to test what the state of the global
scope is after the globals are accessed (and replaced with the
loaded value).

PR-URL: https://github.com/nodejs/node/pull/45659
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
2022-12-09 22:37:35 +00:00
npm CLI robot
7d80ca3683
deps: upgrade npm to 9.2.0
PR-URL: https://github.com/nodejs/node/pull/45780
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-09 13:38:13 +00:00
Marco Ippolito
5fe0795041
crypto: fix CipherBase Update int32 overflow
PR-URL: https://github.com/nodejs/node/pull/45769
Fixes: https://github.com/nodejs/node/issues/45757
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2022-12-09 11:24:51 +00:00
MURAKAMI Masahiko
621f63ec7a
doc: add args of filter option of fs.cp
add the describe arguments and return
value about filter function option of fs.cp

PR-URL: https://github.com/nodejs/node/pull/45739
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-12-09 09:00:26 +00:00
Deokjin Kim
c776324f0a
lib: check number of arguments in EventTarget's function
For now, addEventListener() only checks number of arguments.
removeEventListener() and dispatchEvent() also need checking
number of arguments.

PR-URL: https://github.com/nodejs/node/pull/45668
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2022-12-09 06:07:20 +00:00
Daeyeon Jeong
8aa15dedb6 lib: disambiguate native module to binding
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/45673
Refs: https://github.com/nodejs/node/pull/44135
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2022-12-09 05:28:59 +00:00
Daeyeon Jeong
cb940b950f lib: disambiguate native module to builtin module
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/45673
Refs: https://github.com/nodejs/node/pull/44135
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2022-12-09 05:28:58 +00:00
Daeyeon Jeong
01eec64b36 doc: disambiguate native module to addon
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/45673
Refs: https://github.com/nodejs/node/pull/44135
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2022-12-09 05:28:57 +00:00
MURAKAMI Masahiko
01b7ac6051
test_runner: add resetCalls to MockFunctionContext
This commit allows tests in test runner to reset
the calls of mock function

Refs: https://github.com/nodejs/node/pull/45326#discussion_r1014728750
PR-URL: https://github.com/nodejs/node/pull/45710
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-08 20:28:38 +00:00
Michaël Zasso
5890d09644
deps: patch V8 to 10.9.194.6
Refs: https://github.com/v8/v8/compare/10.9.194.4...10.9.194.6
PR-URL: https://github.com/nodejs/node/pull/45748
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-08 19:52:52 +00:00
Joyee Cheung
2b9d3b2755
benchmark: make benchmarks runnable in older versions of Node.js
Also remove the require-cachable.js benchmarks because now all builtin
modules are cacheable, it would be comparing oranges to apples when
we try to compare the performance of loading all cacheable modules
in different Node.js binaries since the set of modules are just
different. Comparison of startup performance that involves loading
of the long-standing, stable builtins is already covered by the
require-builtins benchmark.

PR-URL: https://github.com/nodejs/node/pull/45746
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-12-08 14:50:18 +00:00