Anna Henningsen
815fbec6f1
repl: do not include legacy getter/setter methods in completion
...
For every object that inherits from `Object.prototype`, the REPL
includes the `Object.prototype` methods in its autocompletion.
This is already a little noisy, but in particular, this also
includes the legacy `__defineGetter__` family of methods;
since those are deprecated and not in practical use anymore,
it helps reduce noise a bit to remove them.
This commit does not remove `__proto__` as it is a little
more popular and, despite its downsides, a slightly more convenient
way to access the prototype of an object in the REPL than
`Object.getPrototypeOf(...)`.
PR-URL: https://github.com/nodejs/node/pull/39576
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-08-02 19:37:51 +02:00
Guy Bedford
93bbaa0ce9
module: fix ERR_REQUIRE_ESM error for null frames
...
PR-URL: https://github.com/nodejs/node/pull/39593
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-08-02 19:37:50 +02:00
himself65
cbf6a01c17
crypto: fix generateKeyPair with encoding 'jwk'
...
Fixes: https://github.com/nodejs/node/issues/39205
PR-URL: https://github.com/nodejs/node/pull/39319
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-08-02 09:14:53 +02:00
Tobias Nießen
7a731efd97
doc,lib,test: rename HKDF 'key' argument
...
PR-URL: https://github.com/nodejs/node/pull/39474
Refs: https://github.com/nodejs/node/issues/39471
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-08-02 09:14:51 +02:00
Jochen Eisinger
4709da0372
test: ensure microtask queues are not automatically drained
...
V8 had a bug that in certain cases the default microtask queue was
drained, and this test relies on the behavior.
Backport-PR-URL: https://github.com/nodejs/node/pull/39470
PR-URL: https://github.com/nodejs/node/pull/38990
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-07-29 17:14:29 +01:00
Michaël Zasso
86ca9a8a80
test: remove test-debug-args
...
It it's not testing anything useful anymore.
Backport-PR-URL: https://github.com/nodejs/node/pull/39470
PR-URL: https://github.com/nodejs/node/pull/38990
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-07-29 17:14:29 +01:00
Michaël Zasso
bbcd651cfd
test: update trace events test expectations
...
V8 9.2 doesn't emit the "V8.ScriptCompiler" event anymore.
Use "V8.GCScavenger" instead.
Backport-PR-URL: https://github.com/nodejs/node/pull/39470
PR-URL: https://github.com/nodejs/node/pull/38990
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-07-29 17:14:28 +01:00
Richard Lau
039f64f249
test: fix WASI link test
...
The WASI link test attempts to create a link in the temporary directory
to a file in the fixtures directory and can fail if those directories
are on different devices. Update the test so that both the source and
target of the link reside on the same device.
PR-URL: https://github.com/nodejs/node/pull/39485
Fixes: https://github.com/nodejs/node/issues/39484
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-29 17:14:24 +01:00
Luigi Pinca
1fb0954202
events: allow an event to be dispatched multiple times
...
Use a different flag to prevent recursive dispatching.
PR-URL: https://github.com/nodejs/node/pull/39395
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-29 11:56:57 +01:00
Luigi Pinca
6f2989c346
events: allow the options argument to be null
...
Make `EventTarget.prototype.addEventListener()` accept `null` as a valid
value for the `options` argument.
PR-URL: https://github.com/nodejs/node/pull/39486
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2021-07-29 11:56:57 +01:00
Michaël Zasso
d16d36f1c2
crypto: support Big(U)Int64Array in getRandomValues
...
Refs: https://github.com/w3c/webcrypto/issues/255
Fixes: https://github.com/nodejs/node/issues/39442
PR-URL: https://github.com/nodejs/node/pull/39443
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
2021-07-29 11:56:55 +01:00
Stephen Belanger
e18778d409
async_hooks: eliminate native PromiseHook
...
PR-URL: https://github.com/nodejs/node/pull/39135
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2021-07-29 11:56:54 +01:00
Daniel Bevenius
b1d38ddc8a
test: update OpenSSL3 error messages for beta-1
...
This commit updates error messages that have changed while these tests
were disabled.
PR-URL: https://github.com/nodejs/node/pull/39437
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-29 11:56:53 +01:00
Daniel Bevenius
db4f802fba
Revert "test: skip tests for openssl-3.0.0-alpha15"
...
This reverts commit 2ff93c8975 .
PR-URL: https://github.com/nodejs/node/pull/39437
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-29 11:56:52 +01:00
Rich Trott
a30d021b94
test: add test for WebSocket secret verification in debugger
...
PR-URL: https://github.com/nodejs/node/pull/39357
Refs: https://github.com/nodejs/node-inspect/pull/93
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-07-29 11:56:48 +01:00
Richard Lau
04355afd24
test: add NumberFormat resolvedOptions test
...
Add a regression test for NumberFormat resolvedOptions.
PR-URL: https://github.com/nodejs/node/pull/39401
Refs: https://github.com/nodejs/node/issues/39050
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-07-29 11:56:47 +01:00
Darshan Sen
68fd6d5282
url: prevent pathname setter from erasing path of path-only URLs
...
This change prevents the pathname setter from erasing the path of
path-only URLs as that would make them cannot-be-a-base URLs.
The changes in all files except `src/node_url.cc` have been done by
running:
```console
git node wpt url
```
Fixes: https://github.com/nodejs/node/issues/39059
Signed-off-by: Darshan Sen <darshan.sen@postman.com >
PR-URL: https://github.com/nodejs/node/pull/39060
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2021-07-29 11:56:47 +01:00
Antoine du Hamel
eccc9a6578
punycode: add pending deprecation
...
PR-URL: https://github.com/nodejs/node/pull/38444
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2021-07-29 11:56:47 +01:00
hemanth.hm
a082a705b3
repl: enable --experimental-repl-await /w opt-out
...
Unflags top-level await for the REPL by enabling
--experimental-repl-await by default. Opt-out is
supported via --no-experimental-repl-await.
PR-URL: https://github.com/nodejs/node/pull/34733
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2021-07-29 11:56:47 +01:00
legendecas
626eb07fda
deps: extract gtest source files to deps/googletest
...
PR-URL: https://github.com/nodejs/node/pull/39386
Refs: https://github.com/nodejs/node/pull/39361
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-29 11:56:46 +01:00
Guy Bedford
93eff3f5a6
esm: refine ERR_REQUIRE_ESM errors
...
PR-URL: https://github.com/nodejs/node/pull/39175
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-29 11:56:44 +01:00
legendecas
cdf7251370
process: add api to enable source-maps programmatically
...
Add `process.setSourceMapsEnabled` to enable
source-maps programmatically.
PR-URL: https://github.com/nodejs/node/pull/39085
Reviewed-By: Ben Coe <bencoe@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-29 11:56:44 +01:00
James M Snell
e91053a465
stream: implement TextEncoderStream and TextDecoderStream
...
Experimental as part of the web streams implementation
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/39347
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-07-29 11:56:43 +01:00
Rich Trott
d0fb02c26a
test: put common lint exceptions into config file
...
For lint exceptions that are universal or near universal for
`test/common`, put the exceptions in a config file rather than disabling
the ESLint rules at the top of each file.
PR-URL: https://github.com/nodejs/node/pull/39358
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-07-17 12:50:09 +02:00
James M Snell
259d091366
test: mark test-domain-error-types flaky
...
Refs: https://github.com/nodejs/node/issues/39368
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/39369
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-07-17 12:29:51 +02:00
Rich Trott
630266cba2
debugger: indicate server is ending
...
Currently, we say "listening" when we are ending the server. Change it
to "ending".
Fixes: https://github.com/nodejs/node/issues/39272
PR-URL: https://github.com/nodejs/node/pull/39334
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yash Ladha <yash@yashladha.in >
2021-07-13 08:11:51 +02:00
Robert Nagy
cb32f69e00
stream: cleanup async handling
...
Cleanup async stream method handling.
PR-URL: https://github.com/nodejs/node/pull/39329
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-13 08:11:49 +02:00
Robert Nagy
1fc6382942
stream: don't emit prefinish after error or close
...
PR-URL: https://github.com/nodejs/node/pull/39332
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-13 08:11:49 +02:00
Robert Nagy
dfe99d2aac
tls: move legacy code into own file
...
PR-URL: https://github.com/nodejs/node/pull/39333
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-07-13 08:11:48 +02:00
Rich Trott
0bb980aeaf
test: remove eslint-disable comment from fixture file
...
Fixtures are not linted so eslint-disable comments are unnecessary.
PR-URL: https://github.com/nodejs/node/pull/39320
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-07-11 09:47:02 +02:00
Rich Trott
21f77031fb
test: move debugger test case to parallel
...
Move test case that does not require a predetermined port to parallel.
PR-URL: https://github.com/nodejs/node/pull/39300
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
2021-07-11 09:47:01 +02:00
Rich Trott
0ec93a1fc1
test: use common.PORT instead of hardcoded port number
...
PR-URL: https://github.com/nodejs/node/pull/39298
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-11 09:47:01 +02:00
Rich Trott
11a8b81caf
test: remove debugger workaround for AIX
...
Optimistically removing workaround code in the debugger test tool.
PR-URL: https://github.com/nodejs/node/pull/39296
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2021-07-11 09:47:01 +02:00
ejose19
b168ec2a2a
repl: processTopLevelAwait fallback error handling
...
PR-URL: https://github.com/nodejs/node/pull/39290
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-11 09:47:00 +02:00
ejose19
a101fe68ad
repl: correctly hoist top level await declarations
...
PR-URL: https://github.com/nodejs/node/pull/39265
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-11 09:47:00 +02:00
Rich Trott
8e77aa23f1
test: add test for debugger restart message issue
...
Running "restart" in the debugger confusingly prints an out-of-date
"Debugger listening on..." message before printing a second updated one.
Refs: https://github.com/nodejs/node/issues/39272
PR-URL: https://github.com/nodejs/node/pull/39273
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-11 09:46:26 +02:00
Gus Caplan
33cad271c5
errors: remove eager stack generation for node errors
...
PR-URL: https://github.com/nodejs/node/pull/39182
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-11 09:46:25 +02:00
Rich Trott
13755599e1
test: remove workaround code in debugger test
...
Remove code that made a check more lenient to account for a known issue
that is no longer reproducible.
Refs: https://github.com/nodejs/node-inspect/issues/35
PR-URL: https://github.com/nodejs/node/pull/39238
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
2021-07-11 09:46:24 +02:00
Anna Henningsen
20cc8ec2af
readline: allow completer to rewrite existing input
...
Sometimes, it makes sense for a completer to change the existing
input, e.g. by adjusting the casing (imagine a completer that
corrects `Number.isNan` to `Number.IsNaN`, for example).
This commit allows that in the readline implemention.
PR-URL: https://github.com/nodejs/node/pull/39178
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-07-11 09:46:22 +02:00
legendecas
63f87027e3
node-api: cctest on v8impl::Reference
...
PR-URL: https://github.com/nodejs/node/pull/38970
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com >
2021-07-11 09:46:22 +02:00
Rich Trott
1f31e3c774
test: remove checks for armv6
...
We no longer have armv6 in our regular CI. Remove checks.
PR-URL: https://github.com/nodejs/node/pull/39162
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-07-11 09:46:21 +02:00
Rich Trott
d486d0117c
test: move test-debugger-address to parallel
...
The test uses `--inspect=0` so it uses an OS-selected port rather than
the default port. This means it can be run in the parallel directory.
PR-URL: https://github.com/nodejs/node/pull/39236
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-07-11 09:46:21 +02:00
Rich Trott
cdc7a19f48
test: remove common.enoughTestCpu
...
All hosts in CI return true for common.enoughTestCpu. At least for our
CI, it is always true, so we can remove it.
PR-URL: https://github.com/nodejs/node/pull/39161
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-07-11 09:46:20 +02:00
Guy Bedford
d441d91450
repl: ensure correct syntax err for await parsing
...
PR-URL: https://github.com/nodejs/node/pull/39154
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-07-11 09:46:18 +02:00
Robert Nagy
35b6669e13
stream: use finished for pump
...
Re-use existing compat logic for pump by using
finished.
PR-URL: https://github.com/nodejs/node/pull/39203
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-07-11 09:46:18 +02:00
James M Snell
9af62a1357
stream: implement WHATWG streams
...
Experimental implementation of the WHATWG streams standard.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/39062
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-07-11 09:43:56 +02:00
James M Snell
cc32365f56
test: add WPT streams tests
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/39062
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-07-11 09:43:56 +02:00
Shelley Vohr
89f5a73ba5
crypto: use compatible ecdh function
...
PR-URL: https://github.com/nodejs/node/pull/39054
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-07-11 09:43:56 +02:00
bcoe
ac05a0a8a3
errors: don't throw TypeError on missing export
...
Logic in module_job.js assumes detailed stack trace from node_errors.cc
which is not populated when --enable-source-maps is set.
Fixes #38790
PR-URL: https://github.com/nodejs/node/pull/39017
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-07-11 09:43:54 +02:00
Rich Trott
fff21a4afb
test: replace "inspector-cli" with "debugger"
...
When I moved node-inspect into core, I called a lot of things
`inspector-cli` that really should have been `debugger`. This is the
last of them to be renamed.
PR-URL: https://github.com/nodejs/node/pull/39156
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-07-11 09:43:54 +02:00