bencoe@google.com
6b9d2aefdb
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-01-17 15:27:19 -05:00
Rich Trott
8de858b96d
test: increase coverage for stream writable
...
Refs: https://github.com/nodejs/node/pull/41433#issuecomment-1009551922
PR-URL: https://github.com/nodejs/node/pull/41486
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-01-17 16:54:40 +00:00
Benjamin Gruenbaum and Robert Nagy
3f0bcfb203
stream: add forEach method
...
Add a `forEach` method to readable streams to enable concurrent
iteration and align with the iterator-helpers proposal.
Co-Authored-By: Robert Nagy <ronagy@icloud.com >
PR-URL: https://github.com/nodejs/node/pull/41445
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2022-01-17 14:25:04 +02:00
Rich Trott
0594577e69
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-01-16 21:37:45 -08:00
Tobias Nießen
807c7e14f4
tls: move tls.parseCertString to end-of-life
...
The internal use of tls.parseCertString was removed in
a336444c7f . The function does not handle
multi-value RDNs correctly, leading to incorrect representations and
security concerns.
This change is breaking in two ways: tls.parseCertString is removed
(but has been runtime-deprecated since Node.js 9) and
_tls_common.translatePeerCertificate does not translate the `subject`
and `issuer` properties anymore.
This change also removes the recommendation to use querystring.parse
instead, which is similarly dangerous.
PR-URL: https://github.com/nodejs/node/pull/41479
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-01-15 17:00:25 +01:00
Yoshiki Kurihara
0f31d2993b
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-14 16:56:56 +00:00
Yoshiki Kurihara
cd075f488a
test: remove broken wiki link from test/common doc
...
PR-URL: https://github.com/nodejs/node/pull/41426
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2022-01-14 17:53:45 +01:00
cjihrig
e54f52f0dd
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-14 11:46:52 -05:00
Rich Trott
dcc368f4be
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-13 17:12:05 -08:00
Rich Trott
592f1845fa
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-13 17:11:15 -08:00
Rich Trott
9bfe60fc20
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-13 17:11:13 -08:00
Rich Trott
94abcbde8b
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-13 17:11:11 -08:00
Gang Chen
775bfd1579
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-14 01:37:41 +01:00
Antonio Román
74b9baa426
v8: make writeHeapSnapshot throw if fopen fails
...
If the file fails to be written (e.g. missing permissions, no space left
on device, etc), `writeHeapSnapshot` will now throw an exception.
This commit also adds error handling for the `fclose` call, returning
false if a non-zero value was returned.
Fixes: https://github.com/nodejs/node/issues/41346
PR-URL: https://github.com/nodejs/node/pull/41373
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-01-12 08:39:49 +00:00
XadillaX
38b7961ce6
url,lib: pass urlsearchparams-constructor.any.js
...
According to WPT:
1. `URLSearchParams` constructor should throw exactly `TypeError` if any
Error occurrs.
2. When a record passed to `URLSearchParams` constructor, two different
key may result same after `toUVString()`. We should leave only the
later one.
PR-URL: https://github.com/nodejs/node/pull/41197
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2022-01-11 18:29:31 +08:00
Tobias Nießen
3454e79713
console: fix prototype pollution via console.table
...
CVE-ID: CVE-2022-21824
PR-URL: https://github.com/nodejs-private/node-private/pull/307
Refs: https://hackerone.com/reports/1431042
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-01-10 22:38:05 +00:00
Tobias Nießen
a336444c7f
tls: fix handling of x509 subject and issuer
...
When subject and verifier are represented as strings, escape special
characters (such as '+') to guarantee unambiguity. Previously, different
distinguished names could result in the same string when encoded. In
particular, inserting a '+' in a single-value Relative Distinguished
Name (e.g., L or OU) would produce a string that is indistinguishable
from a multi-value Relative Distinguished Name. Third-party code that
correctly interprets the generated string representation as a
multi-value Relative Distinguished Name could then be vulnerable to an
injection attack, e.g., when an attacker includes a single-value RDN
with type OU and value 'HR + CN=example.com', the string representation
produced by unpatched versions of Node.js would be
'OU=HR + CN=example.com', which represents a multi-value RDN.
Node.js itself is not vulnerable to this attack because the current
implementation that parses such strings into objects does not handle '+'
at all. This oversight leads to incorrect results, but at the same time
appears to prevent injection attacks (as described above).
With this change, the JavaScript objects representing the subject and
issuer Relative Distinguished Names are constructed in C++ directly,
instead of (incorrectly) encoding them as strings and then (incorrectly)
decoding the strings in JavaScript.
This addresses CVE-2021-44533.
CVE-ID: CVE-2021-44533
PR-URL: https://github.com/nodejs-private/node-private/pull/300
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2022-01-10 22:38:05 +00:00
Tobias Nießen
50439b446f
tls: drop support for URI alternative names
...
Previously, Node.js incorrectly accepted uniformResourceIdentifier (URI)
subject alternative names in checkServerIdentity regardless of the
application protocol. This was incorrect even in the most common cases.
For example, RFC 2818 specifies (and RFC 6125 confirms) that HTTP over
TLS only uses dNSName and iPAddress subject alternative names, but not
uniformResourceIdentifier subject alternative names.
Additionally, name constrained certificate authorities might not be
constrained to specific URIs, allowing them to issue certificates for
URIs that specify hosts that they would not be allowed to issue dNSName
certificates for.
Even for application protocols that make use of URI subject alternative
names (such as SIP, see RFC 5922), Node.js did not implement the
required checks correctly, for example, because checkServerIdentity
ignores the URI scheme.
As a side effect, this also fixes an edge case. When a hostname is not
an IP address and no dNSName subject alternative name exists, the
subject's Common Name should be considered even when an iPAddress
subject alternative name exists.
It remains possible for users to pass a custom checkServerIdentity
function to the TLS implementation in order to implement custom identity
verification logic.
This addresses CVE-2021-44531.
CVE-ID: CVE-2021-44531
PR-URL: https://github.com/nodejs-private/node-private/pull/300
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2022-01-10 22:38:05 +00:00
Tobias Nießen
466e5415a2
crypto,tls: implement safe x509 GeneralName format
...
This change introduces JSON-compatible escaping rules for strings that
include X.509 GeneralName components (see RFC 5280). This non-standard
format avoids ambiguities and prevents injection attacks that could
previously lead to X.509 certificates being accepted even though they
were not valid for the target hostname.
These changes affect the format of subject alternative names and the
format of authority information access. The checkServerIdentity function
has been modified to safely handle the new format, eliminating the
possibility of injecting subject alternative names into the verification
logic.
Because each subject alternative name is only encoded as a JSON string
literal if necessary for security purposes, this change will only be
visible in rare cases.
This addresses CVE-2021-44532.
CVE-ID: CVE-2021-44532
PR-URL: https://github.com/nodejs-private/node-private/pull/300
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2022-01-10 22:38:05 +00:00
Colin Ihrig
b6b6510187
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-07 02:45:31 +00:00
Geoffrey Booth
8dd0658e87
esm: refactor esm tests out of test/message
...
PR-URL: https://github.com/nodejs/node/pull/41352
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2022-01-06 11:07:52 +00:00
Michael Dawson
0b4e9ae656
test: mark test-performance-eventloopdelay flaky
...
Refs: https://github.com/nodejs/node/issues/41286
This is one of the remaining high indicende failures
in the CI. Mark as flaky while it is investigated.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/41409
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-01-06 01:14:28 +00:00
Rich Trott
55ceaec111
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-05 07:42:19 -08:00
Michael Dawson
c85e67b600
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-04 15:59:25 -05:00
Robert Nagy
48e784043d
stream: don't emit finish after destroy
...
PR-URL: https://github.com/nodejs/node/pull/40852
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-01-03 16:32:44 +01:00
Benjamin Gruenbaum and Robert Nagy
55c5120b07
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-02 09:52:50 +02:00
Rich Trott
4e6fc8d0ca
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 >
2021-12-30 10:19:30 -08:00
Erick Wendel
de12141dd0
child_process: queue pending messages
...
It fixes the problem of the child process not receiving messages.
Fixes: https://github.com/nodejs/node/issues/41134
PR-URL: https://github.com/nodejs/node/pull/41221
Reviewed-By: Adrian Estrada <edsadr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2021-12-30 05:59:49 -08:00
Rich Trott
0465373d77
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 >
2021-12-30 05:58:53 +00:00
Rich Trott
01c4907696
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 >
2021-12-30 05:58:09 +00:00
Rich Trott
26c973d4b3
child_process: improve argument validation
...
For execFile() and fork(), use INVALID_ARG_TYPE as appropriate instead
of INVALID_ARG_VALUE. Use validator functions where sensible.
PR-URL: https://github.com/nodejs/node/pull/41305
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-12-29 16:41:45 -08:00
Robert Nagy
a698c49993
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 >
2021-12-29 20:42:10 +01:00
Benjamin Gruenbaum and Robert Nagy
b97b81d4ec
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 >
2021-12-29 20:32:36 +01:00
Yoshiki Kurihara
24f4f7f6e2
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 >
2021-12-27 15:20:24 +01:00
CallMeLaNN
077c75beae
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 >
2021-12-27 14:14:56 +00:00
Ruben Bridgewater
54e9cba336
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 >
2021-12-24 07:32:59 -08:00
Tim Perry
cadeabc5f7
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 >
2021-12-23 18:33:52 +00:00
James M Snell
895c3d937e
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 >
2021-12-23 00:56:57 +00:00
Gabriel Bota
34e3dd5034
loader: fix package resolution for edge case
...
this commit solves a regression introduced with PR-40980.
if a resolve call results in a script with .mjs extension the
is automatically set to . This avoids the case where an additional
in the same directory as the .mjs file would declare the
to commonjs
PR-URL: https://github.com/nodejs/node/pull/41218
Refs: https://github.com/nodejs/node/pull/40980
Refs: https://github.com/yargs/yargs/issues/2068
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-22 18:43:19 +00:00
Michael Dawson
96a632638a
test: mark test-worker-take-heapsnapshot flaky
...
- Mark test-worker-take-heapsnapshot as flaky on
arm with debug
Refs: https://github.com/nodejs/node/issues/41204
Refs: https://github.com/nodejs/node/issues/41209
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/41253
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-22 12:45:15 -05:00
Michael Dawson
555e7f9a75
test: mark wpt/test-user-timing test flaky
...
- The RH team had a team day looking at helping move
the CI closer to green. This is one of the flaky tests
with the most reported failures and has been open
since October. Marking flaky.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/41203
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Adrian Estrada <edsadr@gmail.com >
2021-12-22 11:47:54 -05:00
Jordan Harband
8d1f13b376
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 >
2021-12-21 23:46:36 +00:00
Rich Trott
0132db0585
test: correct param name in JSDoc comment
...
PR-URL: https://github.com/nodejs/node/pull/41241
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-21 18:10:37 +00:00
Bradley Farias
c3866b09c1
async_hooks: fix AsyncLocalStorage in unhandledRejection cases
...
PR-URL: https://github.com/nodejs/node/pull/41202
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2021-12-21 09:33:45 -06:00
Michael Dawson
eee1a6f42a
test: mark test-crypto-keygen slow on windows
...
Refs: https://github.com/nodejs/node/issues/41206
This test seems to be failing regularly on
windows with a timeout. Mark it slow to reduce
CI noise until it gets investigated.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/41207
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-21 09:32:59 -05:00
Rafael Gonzaga
113133badb
stream: fix enqueue race condition on esm modules
...
stream: use nextTick on close
PR-URL: https://github.com/nodejs/node/pull/40901
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-12-21 10:24:15 +00:00
Rich Trott
cf6996458b
benchmark,test: use Object.hasOwn() where applicable
...
Refs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn
PR-URL: https://github.com/nodejs/node/pull/41229
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-12-20 04:03:58 +00:00
Qingyu Deng
3f7dabdfdc
lib: fix checking syntax of esm module
...
Fixes: https://github.com/nodejs/node/issues/41189
PR-URL: https://github.com/nodejs/node/pull/41198
Refs: https://github.com/nodejs/node/pull/37468
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-12-19 23:33:34 +00:00
Yoshiki Kurihara
9b903d1d1b
test: improve test coverage of dns/promises
...
PR-URL: https://github.com/nodejs/node/pull/41133
Refs: https://coverage.nodejs.org/coverage-18ff5832501b66b4/lib/internal/dns/promises.js.html#L116
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Qingyu Deng <i@ayase-lab.com >
2021-12-19 22:41:02 +00:00
Antoine du Hamel
81812bad7b
child_process: add support for URL to cp.fork
...
PR-URL: https://github.com/nodejs/node/pull/41225
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-19 22:40:53 +00:00