Antoine du Hamel
c7f3294d02
fs: add stream utilities to FileHandle
...
PR-URL: https://github.com/nodejs/node/pull/40009
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/40329
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com >
2021-10-06 22:27:39 -04:00
Rich Trott
88bdbf1e29
doc: format markdown files in test directory
...
Use `make format-md` to format markdown files in `test` directory.
PR-URL: https://github.com/nodejs/node/pull/40290
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-10-05 15:40:13 -04:00
Tobias Nießen
6a8689f1f9
test: fix typo in test/common/index.js
...
PR-URL: https://github.com/nodejs/node/pull/40297
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-10-04 20:32:19 +02:00
cjihrig
f4164fa4c3
util: expose stripVTControlCharacters()
...
This commit exposes the existing stripVTControlCharacters()
method with docs and some additional input validation.
PR-URL: https://github.com/nodejs/node/pull/40214
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-10-04 20:32:17 +02:00
Daniel Bevenius
dc0c2744cf
test: suppress compiler warning in test_bigint
...
Currently the are two of following compiler warnings is
generated:
In file included from ../test_bigint.c:5:
../test_bigint.c: In function ‘CreateTooBigBigInt’:
../test_bigint.c:120:22: warning:
‘words’ may be used uninitialized [-Wmaybe-uninitialized]
This commit initialized the words array to avoid these warnings.
PR-URL: https://github.com/nodejs/node/pull/40253
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-10-04 20:32:16 +02:00
Matteo Collina
555af5b808
http: remove 'data' and 'end' listener if client parser error
...
There might be the case of some more data coming through after
the parser has returned an error and we have destroyed the socket.
We should also be removing the 'data' event handler.
Fixes: https://github.com/nodejs/node/issues/40242
PR-URL: https://github.com/nodejs/node/pull/40244
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-10-04 20:32:16 +02:00
Mestery
344c03b2e6
repl: skip EmptyStatements and return result with TLA
...
Fixes: https://github.com/nodejs/node/issues/39932
PR-URL: https://github.com/nodejs/node/pull/40194
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-10-04 20:31:51 +02:00
Artur K
22725f5bdd
http: use 0 as default for requests limit
...
PR-URL: https://github.com/nodejs/node/pull/40192
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
2021-10-04 20:31:29 +02:00
thunder-coding
685c7d43a5
deps: update nghttp2 to v1.45.1
...
PR-URL: https://github.com/nodejs/node/pull/40206
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2021-10-04 20:31:28 +02:00
MrBBot
88e7bd073a
events: allow dispatch many times without listener
...
Fast path for EventTarget dispatch with no listeners didn't reset
kIsBeingDispatched flag, meaning same event couldn't be dispatched
multiple times.
PR-URL: https://github.com/nodejs/node/pull/39772
Refs: https://github.com/nodejs/node/pull/39395
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-10-04 20:31:28 +02:00
Rich Trott
c231745837
doc: prepare markdown file for upcoming formatting/linting
...
PR-URL: https://github.com/nodejs/node/pull/40156
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-10-04 20:30:49 +02:00
Michaël Zasso
6be405bd7b
test: fix test-dgram-udp6-link-local-address on Windows
...
PR-URL: https://github.com/nodejs/node/pull/40005
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-09-22 00:27:15 +01:00
Filip Skokan
f0dec58d43
crypto: fix webcrypto ed(25519|448) spki/pkcs8 import
...
PR-URL: https://github.com/nodejs/node/pull/40131
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-09-22 00:27:15 +01:00
Artur K
a63a4bce90
http: limit requests per connection
...
Fixes: https://github.com/nodejs/node/issues/40071
PR-URL: https://github.com/nodejs/node/pull/40082
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2021-09-22 00:27:14 +01:00
Antoine du Hamel
ec94bec9a3
test: do not run test-corepack-yarn-install with no internet
...
PR-URL: https://github.com/nodejs/node/pull/40090
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-09-22 00:27:13 +01:00
Michaël Zasso
a8c99d9f09
tools: update doc generator dependencies
...
PR-URL: https://github.com/nodejs/node/pull/40042
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-09-22 00:27:13 +01:00
Guy Bedford
1eca9bc5b2
module: support pattern trailers for imports field
...
PR-URL: https://github.com/nodejs/node/pull/40041
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
2021-09-22 00:27:02 +01:00
Guy Bedford
7376edca6d
module: deprecate trailing slash pattern mappings
...
PR-URL: https://github.com/nodejs/node/pull/40039
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
2021-09-22 00:27:00 +01:00
Daniel Bevenius
4aa2610252
test: update OpenSSL3 error messages for 3.0.0+quic
...
This commit updates two OpenSSL 3.0.0 error messages required for
OpenSSL 3.0.0+quic.
PR-URL: https://github.com/nodejs/node/pull/40093
Refs: https://github.com/nodejs/build/pull/2759
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-09-22 00:26:58 +01:00
Guy Bedford
92f182b23d
module: fix $ pattern replacements
...
PR-URL: https://github.com/nodejs/node/pull/40044
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
2021-09-22 00:26:57 +01:00
Richard Lau
4367a61a9b
test: mark test-crypto-timing-safe-equal-benchmarks flaky
...
PR-URL: https://github.com/nodejs/node/pull/40065
Refs: https://github.com/nodejs/node/issues/38226
Reviewed-By: Ash Cripps <acripps@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-09-22 00:26:57 +01:00
Santiago Gimeno
5983568204
worker: avoid potential deadlock on NearHeapLimit
...
It can happen that the `NearHeapLimit` callback is called while calling
the `oninit()` function on `MessagePort` construction causing a deadlock
when the `Worker::Exit()` method is called, as the `mutex_` was already
held on the `CreateEnvMessagePort()` method. To fix it, just use the
`mutex_` to protect the `child_port_data_` variable and avoid holding it
when creating the `MessagePort`.
Also, return early from `Worker::Run()` if the worker message port
could not be created.
Fixes: https://github.com/nodejs/node/issues/38208
PR-URL: https://github.com/nodejs/node/pull/38403
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2021-09-22 00:26:55 +01:00
Rich Trott
5b5e27281c
test: fix internet/test-dns
...
internet/test-dns is failing due to a typo that inadvertently sends a
boolean instead of a regular expression.
PR-URL: https://github.com/nodejs/node/pull/40083
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Qingyu Deng <i@ayase-lab.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-09-22 00:26:54 +01:00
Dominic Elm
9f3a015b60
src: add option to disable loading native addons
...
PR-URL: https://github.com/nodejs/node/pull/39977
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-09-22 00:26:22 +01:00
Tobias Nießen
d657ae6f8a
crypto: fix RSA-PSS default saltLength
...
PR-URL: https://github.com/nodejs/node/pull/39999
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2021-09-21 19:14:08 +01:00
Tobias Nießen
fc45cbe7a8
crypto: fix default MGF1 hash for OpenSSL 3
...
Refs: https://github.com/nodejs/node/pull/39999
PR-URL: https://github.com/nodejs/node/pull/40031
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2021-09-21 19:14:08 +01:00
Mestery
d6124d8259
repl: fix top level await with surrogate characters
...
Fixes: https://github.com/nodejs/node/issues/39929
PR-URL: https://github.com/nodejs/node/pull/39931
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
2021-09-21 19:13:39 +01:00
Anna Henningsen
570bef1710
Revert "src: skip test_fatal/test_threads for Debug builds"
...
This reverts commit 1fc4d43a32 .
PR-URL: https://github.com/nodejs/node/pull/39954
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-09-21 19:13:38 +01:00
JckXia
fe920b6cbf
src: make napi_create_reference accept symbol
...
PR-URL: https://github.com/nodejs/node/pull/39926
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-09-21 19:13:37 +01:00
Filip Skokan
105c9e6d3b
crypto: check webcrypto asymmetric key types during importKey
...
PR-URL: https://github.com/nodejs/node/pull/39962
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-09-21 19:13:37 +01:00
Rich Trott
99af21292f
tools,build: update YAML files in preparation for linting
...
Fix indentation, traiiling spaces, and missing newline issues in
preparation for linting.
PR-URL: https://github.com/nodejs/node/pull/40007
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2021-09-21 19:13:36 +01:00
Michaël Zasso
67bbfeb7e1
test: make tests pass on Windows with Unix EOL
...
It is possible on Windows to configure Git to checkout line-endings
"as-is", which for Node.js means Unix-style.
This change makes the tests that rely on line endings pass in that case.
PR-URL: https://github.com/nodejs/node/pull/40002
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: Luigi Pinca <luigipinca@gmail.com >
2021-09-21 19:13:36 +01:00
XadillaX
640353af86
lib,repl: ignore non-canBeRequiredByUsers built-in
...
e.g. `wasi` under no `--experimental-wasi-unstable-preview1` flag
shouldn't be pre-required.
PR-URL: https://github.com/nodejs/node/pull/39942
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-09-21 19:13:35 +01:00
Filip Skokan
fb226ff2ee
crypto: add rsa-pss keygen parameters
...
PR-URL: https://github.com/nodejs/node/pull/39927
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-09-10 20:34:38 +01:00
Robert Nagy
97f3072ceb
stream: add signal support to pipeline generators
...
Generators in pipeline must be able to be aborted or pipeline
can deadlock.
PR-URL: https://github.com/nodejs/node/pull/39067
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-09-10 20:34:38 +01:00
Robert Nagy
cb44781371
stream: add stream.compose
...
Refs: #32020
PR-URL: https://github.com/nodejs/node/pull/39029
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/39563
2021-09-06 09:23:53 +02:00
Tobias Nießen
585199497f
crypto: fix regression in RSA-PSS keygen
...
Fixes: https://github.com/nodejs/node/issues/39936
Refs: https://github.com/nodejs/node/pull/35093
PR-URL: https://github.com/nodejs/node/pull/39937
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-09-06 09:19:24 +02:00
Stephen Belanger
2343c394fb
async_hooks: use resource stack for AsyncLocalStorage run
...
PR-URL: https://github.com/nodejs/node/pull/39890
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-09-06 09:19:23 +02:00
Michaël Zasso
ca9b781d20
test: use assert.match instead of regexp.test
...
PR-URL: https://github.com/nodejs/node/pull/39928
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-09-06 09:19:23 +02:00
Antoine du Hamel
112af69194
fs: add docs and tests for AsyncIterable support in fh.writeFile
...
Refs: https://github.com/nodejs/node/pull/37490
PR-URL: https://github.com/nodejs/node/pull/39836
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com >
2021-09-06 09:19:21 +02:00
Tobias Nießen
34c627e4bc
crypto: add RSA-PSS params to asymmetricKeyDetails
...
Fixes: https://github.com/nodejs/node/issues/39837
Refs: https://github.com/openssl/openssl/pull/10568
PR-URL: https://github.com/nodejs/node/pull/39851
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2021-09-06 09:19:21 +02:00
Darshan Sen
007e2855af
test: use error code mapping in place of raw errno
...
Refs: https://github.com/nodejs/node/pull/38159#discussion_r610288214
PR-URL: https://github.com/nodejs/node/pull/38675
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2021-09-06 09:19:21 +02:00
Filip Skokan
1dd91582da
crypto: fix rsa-pss one-shot sign/verify error handling
...
fixes #39822
PR-URL: https://github.com/nodejs/node/pull/39830
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-09-06 09:19:20 +02:00
Qingyu Deng
00529b0ef2
test: add test to verify other extension can be loaded by worker
...
PR-URL: https://github.com/nodejs/node/pull/39788
Fixes: https://github.com/nodejs/node/issues/39124
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2021-09-06 09:19:20 +02:00
Qingyu Deng
16271d2f50
worker: remove file extension check
...
Fixes: https://github.com/nodejs/node/issues/39124
PR-URL: https://github.com/nodejs/node/pull/39788
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2021-09-06 09:19:20 +02:00
leeight
4e7212c88c
test: update error message keywords
...
This testcase failed on Apple Silicon M1, add the error message pattern:
`not a mach-o file`
PR-URL: https://github.com/nodejs/node/pull/39826
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
2021-09-06 09:19:16 +02:00
Guy Bedford
20da0a5379
module: support pattern trailers
...
PR-URL: https://github.com/nodejs/node/pull/39635
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
2021-09-06 08:40:31 +02:00
Filip Skokan
20cf47004e
crypto: fix JWK RSA-PSS SubtleCrypto.exportKey
...
PR-URL: https://github.com/nodejs/node/pull/39828
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-09-06 08:40:02 +02:00
James M Snell
cfbe9065ae
events: add brand checks for detached accessors
...
PR-URL: https://github.com/nodejs/node/pull/39773
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-09-06 08:40:01 +02:00
James M Snell
3b1ce93e03
worker: add brand checks for detached MessageEvent accessors
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/39773
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-09-06 08:40:01 +02:00