Rich Trott
a518e4b871
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-12 06:29:01 -07:00
Robert Nagy
09d8c0c8d2
stream: destroy readable on read error
...
PR-URL: https://github.com/nodejs/node/pull/39342
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-07-12 12:08:43 +02:00
Robert Nagy
f2f6872b5c
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-11 19:20:01 +02:00
Robert Nagy
7a7ba82234
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-11 18:41:17 +02:00
Robert Nagy
5960f16713
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-11 18:40:18 +02:00
Robert Nagy
bb275ef2a4
stream: unify stream utils
...
Unify stream helps into utils.
PR-URL: https://github.com/nodejs/node/pull/39294
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-11 10:40:30 +02:00
Rich Trott
8970fa9006
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-10 21:52:36 -07:00
Rich Trott
6463adf183
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-09 17:04:07 -07:00
Rich Trott
debdc1dbb6
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-09 17:02:32 -07:00
Rich Trott
ff975fe1c6
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-09 08:28:20 -07:00
ejose19
8879993079
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-08 11:13:55 -07:00
ejose19
394fdecc91
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-08 10:40:53 -07:00
Robert Nagy
ce00381751
stream: use finished for async iteration
...
PR-URL: https://github.com/nodejs/node/pull/39282
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-08 08:10:37 +02:00
Rich Trott
b2fa795159
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-07 20:57:15 -07:00
Gus Caplan
17821703cc
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-07 20:50:57 -05:00
Robert Nagy
a8a86387fa
tty: enable buffering
...
HWM was set to 0 which would cause e.g. stdout.write(...) to
always return false.
Refs: https://github.com/nodejs/node/pull/39246
PR-URL: https://github.com/nodejs/node/pull/39253
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-07-07 14:50:47 +02:00
Rich Trott
12622c5f86
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-05 21:17:55 -07:00
Darshan Sen
b2ae12d422
stream: throw on premature close in Readable[AsyncIterator]
...
Fixes: https://github.com/nodejs/node/issues/39086
Signed-off-by: Darshan Sen <raisinten@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/39117
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-07-05 15:17:28 +00:00
Anna Henningsen
64e4837011
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-05 11:27:36 +00:00
legendecas
392213a387
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-05 13:55:51 +08:00
Robert Nagy
0738a2b7bd
stream: finished should error on errored stream
...
Calling finished before or after a stream has errored or closed
should end up with the same behavior.
PR-URL: https://github.com/nodejs/node/pull/39235
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-07-04 20:52:39 -07:00
Rich Trott
62321267b0
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-04 19:56:07 -07:00
Rich Trott
c2e6822153
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-04 07:42:48 -07:00
Rich Trott
32b6f4be53
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-04 07:26:59 -07:00
Guy Bedford
8189dcc52a
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-02 15:52:11 -07:00
Robert Nagy
954217adda
stream: error Duplex write/read if not writable/readable
...
If writable/readable has been explicitly disabled then using
a Duplex as writable/readable should fail.
Fixes: https://github.com/nodejs/node/issues/34374
PR-URL: https://github.com/nodejs/node/pull/34385
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-07-02 22:11:16 +02:00
Robert Nagy
320339630d
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-02 10:12:45 +02:00
James M Snell
fa0c6883a6
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-06-30 12:54:41 -07:00
James M Snell
52d32bdfbd
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-06-30 12:54:39 -07:00
Shelley Vohr
5830449a45
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-06-30 10:14:17 +02:00
bcoe
663d7e9fb2
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-06-28 15:35:16 -04:00
Rich Trott
9cdac42f3d
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-06-28 06:26:02 -07:00
Joyee Cheung
58cfca8a9b
bootstrap: load perf_hooks eagerly during bootstrap
...
PR-URL: https://github.com/nodejs/node/pull/38971
Refs: https://github.com/nodejs/node/issues/35711
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-28 16:20:17 +08:00
Joyee Cheung
a75d4e2724
perf_hooks: refactor perf_hooks for snapshot building
...
- Move Performance and InternalPerformance to a new
lib/internal/perf/performance.js
- Move now() getMilestoneTimestamp() into
lib/internal/perf/utils.js
- Rename lib/internal/perf/perf.js to
lib/internal/perf/performance_entry.js
- Refresh time origin at startup (this means the
time origins could differ between snapshot building
time and snapshot creation time)
PR-URL: https://github.com/nodejs/node/pull/38971
Refs: https://github.com/nodejs/node/issues/35711
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-28 16:20:12 +08:00
Voltrex
1317252dfe
fs: allow empty string for temp directory prefix
...
The `fs` lib module's `mkdtemp()` and `mkdtempSync()` methods were
missing a validator, and weren't allowing the empty string as a valid
prefix.
PR-URL: https://github.com/nodejs/node/pull/39028
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
2021-06-26 16:34:13 +02:00
Voltrex
46a7e61900
wasi: use missing validator
...
The `wasi` lib module's `initialize()` method is missing a validator.
PR-URL: https://github.com/nodejs/node/pull/39070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-06-26 16:31:30 +02:00
Adam Majer
520ad58658
test: use localhost test instead of connecting to remote
...
Fixes: https://github.com/nodejs/node/issues/39008
PR-URL: https://github.com/nodejs/node/pull/39011
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-06-26 14:22:05 +00:00
Qingyu Deng
8a8c7f41e1
http,https: align server option of https with http
...
Fixes: https://github.com/nodejs/node/issues/38954
PR-URL: https://github.com/nodejs/node/pull/38992
Refs: https://github.com/nodejs/node/pull/30570
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-06-26 14:21:57 +00:00
XadillaX
8954e03ad9
src,crypto: fix 0-length output crash in webcrypto
...
Fixes: https://github.com/nodejs/node/issues/38883
PR-URL: https://github.com/nodejs/node/pull/38913
Refs: https://github.com/nodejs/node/issues/38883
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-06-26 14:21:49 +00:00
cjihrig
b82a1a1ac9
src: compare IPv4 addresses in host byte order
...
This commit updates compare_ipv4() to use the host byte
order.
PR-URL: https://github.com/nodejs/node/pull/39096
Fixes: https://github.com/nodejs/node/issues/39074
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-06-22 02:06:46 +00:00
bcoe
c5cc3d4a8b
errors: don't rekey on primitive type
...
If an error is thrown before a module is loaded, we attempt to cache
source map against error object, rather than module object. We
can't do this if the error is a primitive type
Fixes #38945
PR-URL: https://github.com/nodejs/node/pull/39025
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-06-21 18:35:34 -07:00
Bryan English
0e8bd79cbb
async_hooks: check for empty contexts before removing
...
This way we don't end up attempting to SetPromiseHooks on contexts that
have already been collected.
Fixes: https://github.com/nodejs/node/issues/39019
PR-URL: https://github.com/nodejs/node/pull/39095
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com >
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com >
2021-06-21 21:29:44 -04:00
Michaël Zasso and Anna Henningsen
1bbe66f432
src: allow to negate boolean CLI flags
...
This change allows all boolean flags to be negated using the `--no-`
prefix.
Flags that are `true` by default (for example `--deprecation`) are
still documented as negations.
With this change, it becomes possible to easily flip the default
value of a boolean flag and to override the value of a flag passed
in the NODE_OPTIONS environment variable.
`process.allowedNodeEnvironmentFlags` contains both the negated and
non-negated versions of boolean flags.
Co-authored-by: Anna Henningsen <anna@addaleax.net >
PR-URL: https://github.com/nodejs/node/pull/39023
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2021-06-21 20:18:20 +02:00
Rich Trott
15ad006d27
test: move inspector-cli tests to sequential
...
There's no reason to keep these tests separated from everything else.
PR-URL: https://github.com/nodejs/node/pull/39079
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-06-20 19:38:06 -07:00
Rongjian Zhang
0536be2ad8
test: improve buffer coverage
...
PR-URL: https://github.com/nodejs/node/pull/38538
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-17 16:29:56 -04:00
Tobias Nießen
e7d5f0aeb3
test: fix name of variable in inspector-cli test
...
PR-URL: https://github.com/nodejs/node/pull/38869
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-16 10:40:05 +00:00
Houssem Chebab
dc2f6b606f
test: fix typo
...
PR-URL: https://github.com/nodejs/node/pull/39045
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-06-16 10:21:03 +02:00
Robert Nagy
f4609bdf3f
stream: bypass legacy destroy for pipeline and async iteration
...
PR-URL: https://github.com/nodejs/node/pull/38505
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-15 19:43:49 +02:00
XadillaX
7a9635b094
crypto: fix aes crash when tag length too small
...
Fixes: https://github.com/nodejs/node/issues/38883
PR-URL: https://github.com/nodejs/node/pull/38914
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-15 14:21:28 +08:00
Ikko Ashimine
7e99dbcf97
test: fix typo in test-http2-invalidheaderfield.js
...
Psuedo -> Pseudo
PR-URL: https://github.com/nodejs/node/pull/39021
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-14 08:27:01 -07:00