Robert Nagy
2bfa87edbc
stream: fix fromAsyncGen
...
Fixes: https://github.com/nodejs/node/issues/40497
PR-URL: https://github.com/nodejs/node/pull/40499
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-10-19 09:51:53 -04:00
Daijiro Wachi
1e15137e71
test: replace common port with specific number
...
PR-URL: https://github.com/nodejs/node/pull/40344
Fixes: https://github.com/nodejs/node/issues/40336
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2021-10-13 10:24:45 +02:00
Daijiro Wachi
a672be57c8
net: throw error to object mode in Socket
...
Fixes: https://github.com/nodejs/node/issues/40336
PR-URL: https://github.com/nodejs/node/pull/40344
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2021-10-13 10:24:44 +02:00
Tobias Nießen
6f6b99c302
test: fix typos in whatwg-webstreams explanations
...
PR-URL: https://github.com/nodejs/node/pull/40389
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-10-13 10:20:53 +02:00
Qingyu Deng
641b1bb052
test: add test for readStream.path when fd is specified
...
Refs: https://github.com/nodejs/node/pull/40252#pullrequestreview-766378863
PR-URL: https://github.com/nodejs/node/pull/40359
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-10-13 10:20:52 +02:00
Antoine du Hamel
13d6a56c7d
test: improve test coverage of fs.ReadStream with FileHandle
...
PR-URL: https://github.com/nodejs/node/pull/40018
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-10-13 10:20:51 +02:00
Antoine du Hamel
4116b6c907
vm: add support for import assertions in dynamic imports
...
PR-URL: https://github.com/nodejs/node/pull/40249
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2021-10-13 10:20:46 +02:00
gc
a8926d199d
crypto: remove incorrect constructor invocation
...
PR-URL: https://github.com/nodejs/node/pull/40300
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2021-10-12 10:32:05 -04:00
Geoffrey Booth
5f3f3a5128
v8: remove --harmony-top-level-await
...
PR-URL: https://github.com/nodejs/node/pull/40226
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-10-12 10:32:05 -04:00
Jacob
3743406b0a
esm: consolidate ESM loader hooks
...
doc: update ESM hook examples
esm: fix unsafe primordial
doc: fix ESM example linting
esm: allow source of type ArrayBuffer
doc: update ESM hook changelog to include resolve format
esm: allow all ArrayBuffers and TypedArrays for load hook source
doc: tidy code & API docs
doc: convert ESM source table header from Title Case to Sentence case
doc: add detailed explanation for getPackageType
esm: add caveat that ESMLoader::import() must NOT be renamed
esm: tidy code declaration of getFormat protocolHandlers
doc: correct ESM doc link (bad conflict resolution)
doc: update ESM hook limitation for CJS
esm: tweak preload description
doc: update ESM getPackageType() example explanation
PR-URL: https://github.com/nodejs/node/pull/37468
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
2021-10-12 10:32:05 -04:00
Matteo Collina
2d1eefad98
http: add regression test for smuggling content length
...
PR-URL: https://github.com/nodejs-private/node-private/pull/284
Reviewed-By: Akshay K <iit.akshay@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2021-10-11 16:37:20 +01:00
Matteo Collina
45d419ab1c
http: add regression test for chunked smuggling
...
PR-URL: https://github.com/nodejs-private/node-private/pull/284
Reviewed-By: Akshay K <iit.akshay@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2021-10-11 16:37:20 +01:00
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
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
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
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
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
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
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
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
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
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
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
Maël Nison
71659fd4ba
deps: add corepack
...
Corepack provides shims for Yarn and pnpm in order to soften the
developer experience when working on Node projects.
Refs: https://github.com/nodejs/node/issues/15244
Refs: https://github.com/nodejs/TSC/issues/904
PR-URL: https://github.com/nodejs/node/pull/39608
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-09-06 08:40:01 +02:00
Michaël Zasso
549d717722
test: adapt test-fs-read to V8 9.3
...
An error message changed.
Refs: https://github.com/v8/v8/commit/c0fd89c3c089e888c4f4e8582e56db7066fa779b
PR-URL: https://github.com/nodejs/node/pull/39469
Backport-PR-URL: https://github.com/nodejs/node/pull/39947
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-09-01 18:10:20 +02:00
Michaël Zasso
644b25e068
test: adapt test-util-inspect to V8 9.3
...
Classes' "name" property is now installed between "length" and
"prototype".
Refs: https://github.com/v8/v8/commit/224b659cd40b6e11c71262b8a938c0c66cd9bba6
PR-URL: https://github.com/nodejs/node/pull/39469
Backport-PR-URL: https://github.com/nodejs/node/pull/39947
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-09-01 18:10:19 +02:00