Michael Dawson
c533b430f4
test: fix tests affected by OpenSSL update
...
Last OpenSSL 3 update changes behaviour back to be
closer to that of OpenSSL 1.1.1. Remove some instances
where we expected different errors from OpenSSL 3 versus
OpenSSL 1.1.1.
Signed-off-by: Michael Dawson <midawson@redhat.com >
PR-URL: https://github.com/nodejs/node/pull/42352
Refs: https://mta.openssl.org/pipermail/openssl-announce/2022-March/000218.html
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com >
2022-03-17 17:20:24 -04:00
Rich Trott
c8e59cbf9e
test: enable no-empty ESLint rule
...
PR-URL: https://github.com/nodejs/node/pull/41831
Backport-PR-URL: https://github.com/nodejs/node/pull/42160
Refs: https://eslint.org/docs/rules/no-empty
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-03-14 09:32:21 -04:00
ofir
e747ef5e45
http2: fix pseudo-headers order
...
Keep pseudo-headers order same as sent order
Fixes: https://github.com/nodejs/node/issues/38797
PR-URL: https://github.com/nodejs/node/pull/41735
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-03-14 09:32:20 -04:00
Rich Trott
a8e41837cc
test: remove test-worker-memory flaky designation
...
Judging from https://github.com/nodejs/reliability/issues , this hasn't
failed in CI since November 2021.
Closes: https://github.com/nodejs/node/issues/23277
PR-URL: https://github.com/nodejs/node/pull/41867
Fixes: https://github.com/nodejs/node/issues/23277
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-03-14 09:32:19 -04:00
Robert Nagy
46ed078607
stream: resume stream on drain
...
Previously we would just resume "flowing" the stream without
reseting the "paused" state. Fixes this by properly using
pause/resume methods for .pipe.
Fixes: https://github.com/nodejs/node/issues/41785
PR-URL: https://github.com/nodejs/node/pull/41848
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-03-14 09:32:19 -04:00
ofirbarak
2efe9cbd01
http2: fix no response event on continue request
...
When sending a continue request, server response with null,
it does not fires the response event type
Fixes: https://github.com/nodejs/node/issues/38258
PR-URL: https://github.com/nodejs/node/pull/41739
Refs: https://github.com/nodejs/node/pull/38561
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-03-14 09:32:15 -04:00
Benjamin Gruenbaum
14bb6f97f0
buffer: fix atob/btoa no-arg case
...
PR-URL: https://github.com/nodejs/node/pull/41478
Fixes: https://github.com/nodejs/node/issues/41450
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2022-03-14 09:32:15 -04:00
Rich Trott
673c1fd5ae
test: avoid using Object.prototype methods directly on objects
...
This prepares us to enable the no-prototype-builtins ESLint rule.
Refs: https://eslint.org/docs/rules/no-prototype-builtins
PR-URL: https://github.com/nodejs/node/pull/41801
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
2022-03-14 09:32:14 -04:00
Michael Dawson
3690d3402d
test: exclude ibm i tests until we resolve
...
Refs: https://github.com/nodejs/node/issues/39683
These are being worked, but we really should have
marked flaky a long time ago in ordert to make
then nightlies non-red.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/41812
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2022-03-14 09:32:13 -04:00
Michael Dawson
badab79527
test: mark test-fs-rmdir-recursive flaky on win
...
Refs: https://github.com/nodejs/node/issues/41201
From recent reliability reports this is now the most
common failure by far in CI runs. Mark the test as
flaky until the issue is resolved.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/41533
Reviewed-By: Ben Coe <bencoe@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-03-14 09:32:12 -04:00
Tobias Nießen
acea61ba8e
test: fix typo in MessageChannel test
...
PR-URL: https://github.com/nodejs/node/pull/41746
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2022-03-14 09:32:09 -04:00
Benjamin Gruenbaum
ee61bc74b7
process: unhandledRejection support more errors
...
Support cross realm errors where `instanceof` errors in our
unhandledRejection warning to print better error with stack traces.
PR-URL: https://github.com/nodejs/node/pull/41682
Refs: https://github.com/nodejs/node/issues/41676
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com >
Reviewed-By: Tierney Cyren <hello@bnb.im >
2022-03-14 09:32:08 -04:00
Rafael Silva
7bf2be51b3
http2: fix memory leak on nghttp2 hd threshold
...
PR-URL: https://github.com/nodejs/node/pull/41502
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2022-03-14 09:32:08 -04:00
Rich Trott
639130e635
test: use Object.hasOwn() where applicable
...
Replace Object.prototpye.hasOwnProperty() with Object.hasOwn() where
applicable.
PR-URL: https://github.com/nodejs/node/pull/41664
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tierney Cyren <hello@bnb.im >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-03-14 09:32:06 -04:00
Rich Trott
cb362a3748
test: remove unneeded test statement
...
The statement removed was added in 6657b153ab but it was not added
as an assertion. It currently returns false but t0he test does not fail
because of the missing assertion. Since the property is no longer one
that exists, there is no need to test its existence. Remove the line.
PR-URL: https://github.com/nodejs/node/pull/41663
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tierney Cyren <hello@bnb.im >
2022-03-14 09:32:06 -04:00
Rich Trott
b06c33b14b
test: prepare tests for no-cond-assign ESLint rule
...
PR-URL: https://github.com/nodejs/node/pull/41614
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2022-03-14 09:32:03 -04:00
Luigi Pinca
950648db48
test: move test-gc-http-client-onerror to sequential
...
Fixes: https://github.com/nodejs/node/issues/41399
PR-URL: https://github.com/nodejs/node/pull/41619
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2022-03-14 09:32:01 -04:00
LiviaMedeiros
188c3ab918
crypto: adjust types for getRandomValues
...
prevents Web Crypto API's getRandomValues from accepting DataView
Fixes: https://github.com/nodejs/node/issues/41480
Refs: https://www.w3.org/TR/WebCryptoAPI/#Crypto-method-getRandomValues
PR-URL: https://github.com/nodejs/node/pull/41481
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-03-14 09:32:01 -04:00
Rich Trott
cdbe291e5b
tools: increase maximum line length to 120 characters
...
PR-URL: https://github.com/nodejs/node/pull/41586
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Tierney Cyren <hello@bnb.im >
2022-03-14 09:31:59 -04:00
Yoshiki Kurihara
1d3ef115ca
test: improve test coverage of internal/worker/io
...
PR-URL: https://github.com/nodejs/node/pull/41511
Refs: https://coverage.nodejs.org/coverage-74b9baa4265a8f0d/lib/internal/worker/io.js.html#L415
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-03-14 09:31:59 -04:00
voltrexmaster
122eb51c98
test: add DataView test entry for whatwg
...
The WHATWG `ReadableStream` test needs a new test entry for reading a
`DataView`.
PR-URL: https://github.com/nodejs/node/pull/40622
Fixes: https://github.com/nodejs/node/issues/40612
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-03-14 09:31:11 -04:00
Rich Trott
2c813d825f
test: improve util-format code coverage
...
Add test case for calling `util.format()` with a BigInt and a separator.
Refs: https://coverage.nodejs.org/coverage-986cf3b986c6c3e1/lib/internal/util/inspect.js.html#L2042
PR-URL: https://github.com/nodejs/node/pull/41572
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
2022-03-14 09:31:10 -04:00
Gang Chen
227dea8dc1
domain: pass opts to EventEmitter.init
...
PR-URL: https://github.com/nodejs/node/pull/41414
Fixes: https://github.com/nodejs/node/issues/41391
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-03-14 09:31:09 -04:00
bencoe@google.com
9e7cfbbcd9
test: add missing await in fs-rm/fs-rmdir tests
...
Noticed that a few assertions were not being awaited, this could
potentially be leading to flakiness in tmp cleanup.
Refs: #41201
PR-URL: https://github.com/nodejs/node/pull/41545
Refs: https://github.com/nodejs/node/issues/41201
Reviewed-By: Ian Sutherland <ian@iansutherland.ca >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2022-02-26 15:33:03 -05:00
Rich Trott
a8558ecfcf
test: add coverage for util.inspect()
...
Coverage stats indicate that there is no coverage for util.inspect()
with a negative number and a numeric separator. Add a test case.
Refs: https://coverage.nodejs.org/coverage-df507758e6c35534/lib/internal/util/inspect.js.html#L1463
PR-URL: https://github.com/nodejs/node/pull/41527
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-02-25 22:34:23 -05:00
Tobias Nießen
23fc205586
test: avoid deep comparisons with literals
...
Comparing any value to any non-RegExp literal or undefined using
strictEqual (or notStrictEqual) passes if and only if deepStrictEqual
(or notDeepStrictEqual, respectively) passes.
Unnecessarily using deep comparisons adds confusion.
This patch adds an ESLint rule that forbids the use of deepStrictEqual
and notDeepStrictEqual when the expected value (i.e., the second
argument) is a non-RegExp literal or undefined.
For reference, an ESTree literal is defined as follows.
extend interface Literal <: Expression {
type: "Literal";
value: string | boolean | null | number | RegExp | bigint;
}
The value `undefined` is an `Identifier` with `name: 'undefined'`.
PR-URL: https://github.com/nodejs/node/pull/40634
Backport-PR-URL: https://github.com/nodejs/node/pull/42021
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com >
2022-02-24 21:57:21 -05:00
Danielle Adams
1de552caeb
test: add ignore for regex space rule
...
PR-URL: https://github.com/nodejs/node/pull/41805
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2022-02-05 18:20:47 -05:00
Antoine du Hamel
b671194b85
fs: accept URL as argument for fs.rm and fs.rmSync
...
PR-URL: https://github.com/nodejs/node/pull/41132
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/41752
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2022-02-05 18:03:19 -05:00
Yoshiki Kurihara
40c09600fd
test: improve test coverage of dns/promises
...
PR-URL: https://github.com/nodejs/node/pull/41425
Refs: https://coverage.nodejs.org/coverage-0b4e9ae656e93e5f/lib/internal/dns/promises.js.html#L128
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-01-31 23:56:34 -05:00
cjihrig
9242c1900c
test: do not OR F_OK in fs.access() test
...
access() does not support OR'ing F_OK with other constants.
This commit updates test-fs-access.js to not test that
scenario.
PR-URL: https://github.com/nodejs/node/pull/41484
Refs: https://github.com/libuv/libuv/pull/3410
Reviewed-By: Richard Lau
Reviewed-By: Luigi Pinca
Reviewed-By: Tobias Nießen
2022-01-31 23:56:32 -05:00
Rich Trott
5d70195d56
tools,lib,test: enable ESLint no-regex-spaces rule
...
PR-URL: https://github.com/nodejs/node/pull/41463
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2022-01-31 23:55:03 -05:00
Rich Trott
12ea18ded9
tools: enable ESLint require-yield rule
...
PR-URL: https://github.com/nodejs/node/pull/41463
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2022-01-31 23:55:02 -05:00
Rich Trott
609a310e2a
tools: enable ESLint no-sparse-arrays rule
...
PR-URL: https://github.com/nodejs/node/pull/41463
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2022-01-31 23:55:02 -05:00
Rich Trott
063abe52aa
tools: enable ESLint no-loss-of-precision rule
...
PR-URL: https://github.com/nodejs/node/pull/41463
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2022-01-31 23:55:01 -05:00
Gang Chen
3cfe85615c
esm: make process.exit() default to exit code 0
...
Due to a bug in top-level await implementation, it used to default to
exit code 13.
PR-URL: https://github.com/nodejs/node/pull/41388
Fixes: https://github.com/nodejs/node/issues/40808
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2022-01-31 23:55:00 -05:00
Colin Ihrig
af6f1d512d
deps: upgrade to libuv 1.43.0
...
Notable changes:
- `uv_ip_name()` has been added.
- On Windows, `uv_fs_read()` and `uv_fs_write()` now return
`UV_EBADF` instead of `UV_EPERM` when the file descriptor
was opened with incorrect flags. This matches the behavior
on other platforms.
- Streams can be reset and attempted to read from after
EOF is read.
- The main thread now has a valid ID instead of `NULL`.
- `uv_cpu_info()` now supports `aarch64`.
- Several minor issues related to mingw32 have been fixed.
PR-URL: https://github.com/nodejs/node/pull/41398
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2022-01-31 23:54:46 -05:00
Rich Trott
362f5edf8c
tools,benchmark,lib,test: enable no-case-declarations lint rule
...
PR-URL: https://github.com/nodejs/node/pull/41385
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: Tierney Cyren <hello@bnb.im >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-01-31 23:54:42 -05:00
Michael Dawson
874000ff6b
test: mark test-repl-sigint-nested-eval as flaky
...
Refs: https://github.com/nodejs/node/issues/41123
- This is one of the remaining high occurance flaky
tests from the reliability reports and recent
failures in the CI. Mark as flaky until issue
is resolved under referenced issue.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/41302
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-01-31 23:54:35 -05:00
Benjamin Gruenbaum and Robert Nagy
77c18680ae
stream: add filter method to readable
...
This continues the work in https://github.com/nodejs/node/pull/40815 to
make streams compatible with upcoming ECMAScript language features. It
adds an experimental `filter` api to streams and tests/docs for it.
See https://github.com/tc39/proposal-iterator-helpers/
Co-Authored-By: Robert Nagy <ronagy@icloud.com >
PR-URL: https://github.com/nodejs/node/pull/41354
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-01-31 23:54:33 -05:00
Rich Trott
404c8f5501
test: use spawnSync() full name in test-stdio-pipe-stderr
...
test-stdio-pipe-stderr uses `spawnSync()` but renames it as `spawn()`
which can be confusing. Rename it to `spawnSync()` for
readability/maintainability.
PR-URL: https://github.com/nodejs/node/pull/41332
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-01-31 23:54:23 -05:00
Rich Trott
256bf9e6b6
test: improve expectWarning error message
...
expectWarning() fails with a TypeError and a message about undefined not
being iterable when the warning is emitted more times than expected.
This change produces a more useful error message.
Refs: https://github.com/nodejs/node/pull/41307/files#r775197738
PR-URL: https://github.com/nodejs/node/pull/41326
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-01-31 23:54:22 -05:00
Rich Trott
b1e4387c92
test: use spawnSync() full name
...
test-cli-bad-options.js uses `spawnSync()` but renames it as `spawn()`
which caused me a bit of confusion for a bit until I realized what was
going on. Rename the variable `spawnSync()` for
readability/maintainability.
PR-URL: https://github.com/nodejs/node/pull/41327
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-01-31 23:54:22 -05:00
Robert Nagy
7cef7699e3
stream: add isReadable helper
...
PR-URL: https://github.com/nodejs/node/pull/41199
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-01-31 23:54:20 -05:00
Benjamin Gruenbaum and Robert Nagy
9c718f8af0
stream: add map method to Readable
...
Implement the map method on readable stream. This starts the alignment
with the tc39-iterator-helpers proposal and adds a `.map` method to
every Node.js readable stream.
Co-Authored-By: Robert Nagy <ronag@icloud.com >
PR-URL: https://github.com/nodejs/node/pull/40815
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-01-31 23:54:19 -05:00
Yoshiki Kurihara
8d15bacf2b
test: add comments explaining _setSimultaneousAccepts deprecation tests
...
PR-URL: https://github.com/nodejs/node/pull/41307
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-01-31 23:54:15 -05:00
CallMeLaNN
ffca1a71ce
tls: permit null as a pfx value
...
Allow null along with undefined for pfx value.
This is to avoid breaking change when upgrading v14 to v16 and
3rd party library passing null to pfx
Fixes: https://github.com/nodejs/node/issues/36292
PR-URL: https://github.com/nodejs/node/pull/41170
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2022-01-31 23:54:14 -05:00
Ruben Bridgewater
2c7f17c72c
util: do not reduce to a single line if not appropriate using inspect
...
This makes sure entries are not lined up on a single line if the
content contains any new line. That would otherwise cause confusing
output.
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/41083
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-01-31 23:54:08 -05:00
Tim Perry
3c99a4d7c0
http2: handle existing socket data when creating HTTP/2 server sessions
...
When emitting a 'connection' event to manually inject connections into a
server, it's common for the provided stream to already contain readable
data, e.g. after sniffing a connection to detect HTTP/2 from the initial
bytes.
Previously this was supported only for outgoing HTTP/2 sessions created
with http2.connect(). This change ensures that HTTP/2 over existing
streams is supported on both outgoing and incoming sessions.
PR-URL: https://github.com/nodejs/node/pull/41185
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2022-01-31 23:54:05 -05:00
James M Snell
b79fdd5775
events: add EventEmitterAsyncResource to core
...
Signd-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/41246
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-01-31 23:54:03 -05:00
Jordan Harband
7b6c71ab1c
util: display a present-but-undefined error cause
...
See https://github.com/nodejs/node/pull/41097#issuecomment-997055761
PR-URL: https://github.com/nodejs/node/pull/41247
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-01-31 23:53:35 -05:00