Filip Skokan
8283373674
test: fixup flaky test-crypto-x509
...
PR-URL: https://github.com/nodejs/node/pull/37709
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-03-11 11:02:54 +01:00
Filip Skokan
25985d6522
crypto: add optional callback to crypto.sign and crypto.verify
...
PR-URL: https://github.com/nodejs/node/pull/37500
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-03-10 15:11:17 -08:00
Filip Skokan
117e293c37
crypto: support JWK objects in create*Key
...
PR-URL: https://github.com/nodejs/node/pull/37254
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-03-10 18:50:08 +01:00
Nitzan Uziely
e216d8f4a1
fs: improve fsPromises readFile performance
...
Improve the fsPromises readFile performance
by allocating only one buffer, when size is known,
increase the size of the readbuffer chunks,
and dont read more data if size bytes have been read
Refs: https://github.com/nodejs/node/issues/37583
PR-URL: https://github.com/nodejs/node/pull/37608
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-03-10 18:00:38 +02:00
Robert Nagy
e2f5bb7574
http: align with stream.Writable
...
Futher aligns OutgoingMessage with stream.Writable. In particular
re-uses the construct/destroy logic from streams.
Due to a lot of subtle assumptions this PR unfortunately touches
a lot of different parts.
PR-URL: https://github.com/nodejs/node/pull/36816
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-03-10 15:04:00 +01:00
Antoine du Hamel
5247dc0325
test: remove unnecessary V8 flag
...
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/2741582
PR-URL: https://github.com/nodejs/node/pull/37671
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2021-03-09 16:21:38 +01:00
Rich Trott
7f54dd4f07
test: improve error reporting in test-child-process-pipe-dataflow
...
When the test fails, it usually ends up failing on the assertion that
`wc` did not find as many bytes as it expected. That may not be
helpful if it is caused by a failure earlier in the command
pipeline ( cat | grep | wc ). Move the byte check to
`process.on('exit')` so that other error handlers that report the
existence of errors run first.
Refs: https://github.com/nodejs/node/issues/25988
PR-URL: https://github.com/nodejs/node/pull/37632
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-03-08 21:38:40 -08:00
Rich Trott
20009d7dee
test: remove FLAKY status for test-async-hooks-http-parser-destroy
...
This CI test failure hasn't been reported for some time.
Closes: https://github.com/nodejs/node/issues/26610
PR-URL: https://github.com/nodejs/node/pull/37636
Fixes: https://github.com/nodejs/node/issues/26610
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-03-08 09:38:47 -08:00
Rich Trott
5cea29b294
test: remove FLAKY status for fixed test
...
test-worker-message-port-transfer-terminate was fixed in
25447d82d3 but the status file was not updated to reflect this.
PR-URL: https://github.com/nodejs/node/pull/37633
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-03-08 09:36:47 -08:00
Rich Trott
f108778153
test: clear flaky designation for test-stream-pipeline-http2
...
It hasn't failed for a long time.
Closes: https://github.com/nodejs/node/issues/20750
PR-URL: https://github.com/nodejs/node/pull/37631
Fixes: https://github.com/nodejs/node/issues/20750
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruy Adorno <ruyadorno@github.com >
2021-03-08 06:24:25 -08:00
Rich Trott
cd4b09589a
test: clear FLAKY designation for test-http2-pipe
...
It hasn't failed in a long time.
Refs: https://github.com/nodejs/node/issues/20750
PR-URL: https://github.com/nodejs/node/pull/37631
Fixes: https://github.com/nodejs/node/issues/20750
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruy Adorno <ruyadorno@github.com >
2021-03-08 06:24:23 -08:00
obi-el
4811210ca7
crypto,test: improve hmac coverage with webcrypto tests
...
PR-URL: https://github.com/nodejs/node/pull/37571
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-03-08 12:16:48 +01:00
Antoine du Hamel
4fde7dc580
test: fix flaky test-child-process-exec-abortcontroller-promisified
...
Fixes: https://github.com/nodejs/node/issues/37568
PR-URL: https://github.com/nodejs/node/pull/37572
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-03-05 09:51:38 -08:00
Antoine du Hamel
f1753d4c76
process: disallow adding options to process.allowedNodeEnvironmentFlags
...
Make no-op direct calls of `Set` prototype methods to
`process.allowedNodeEnvironmentFlags`.
```js
const { add } = Set.prototype;
add.call(process.allowedNodeEnvironmentFlags, '--user-option`);
process.allowedNodeEnvironmentFlags.has('--user-option') === false;
```
PR-URL: https://github.com/nodejs/node/pull/36660
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-03-05 09:32:12 -08:00
James M Snell
b803bca4fa
perf_hooks: add histogram option to timerify
...
Allows setting a `Histogram` object option on timerify to
record function execution times over time.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37475
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-03-05 08:16:03 -08:00
Anna Henningsen
007a85ce83
worker: add ports property to MessageEvents
...
Add `ev.ports` for spec compliancy.
Since we only emit the raw `data` value, and only create the
`MessageEvent` instance if there are EventTarget-style listeners,
we store the ports list temporarily on the MessagePort object itself,
so that we can look it up when we need to create the event object.
Fixes: https://github.com/nodejs/node/issues/37358
PR-URL: https://github.com/nodejs/node/pull/37538
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2021-03-03 23:23:38 +01:00
Anna Henningsen
9dd2f9f19d
worker: allow BroadcastChannel in receiveMessageOnPort
...
PR-URL: https://github.com/nodejs/node/pull/37535
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-03-03 23:22:26 +01:00
Antoine du Hamel
26288ff25e
tools: add ESLint rule no-array-destructuring
...
Iterating over arrays should be avoided because it relies on
user-mutable global methods (`Array.prototype[Symbol.iterator]`
and `%ArrayIteratorPrototype%.next`), we should instead use
other alternatives. This commit adds a rule that disallow
array destructuring syntax in favor of object destructuring syntax.
Note that you can ignore this rule if you are using
the array destructuring syntax over a safe iterable, or
actually want to iterate over a user-provided object.
PR-URL: https://github.com/nodejs/node/pull/36818
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-03-03 19:53:28 +01:00
cjihrig
152de34fb1
domain: add name to monkey-patched emit function
...
The domain module monkey patches EventEmitter.prototype.emit(),
however the function's name was becoming the empty string. This
commit forces the new emit function to have the proper name.
PR-URL: https://github.com/nodejs/node/pull/37550
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-03-03 12:51:15 -05:00
cjihrig
9dca43e709
domain: show falsy names as anonymous for DEP0097
...
Many anonymous functions use the empty string as their name.
Since the DEP0097 logic was using nullish coalescing, these
functions were not being displayed as anonymous. This commit
updates the logic to use || instead of ??.
PR-URL: https://github.com/nodejs/node/pull/37550
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-03-03 12:51:15 -05:00
Rich Trott
2748b0ad5a
test: remove FLAKY status for test-http2-multistream-destroy-on-read-tls
...
The test does not seem to have failed since the issue was first reported
in 2019.
Closes: https://github.com/nodejs/node/issues/30845
PR-URL: https://github.com/nodejs/node/pull/37533
Fixes: https://github.com/nodejs/node/issues/30845
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-03-01 12:19:43 -08:00
James M Snell
360e8c842a
workers: fix spawning from preload scripts
...
Fix spawning nested worker threads from preload scripts and
warn about doing so.
Signed-off-by: James M Snell <jasnell@gmail.com >
Fixes: https://github.com/nodejs/node/issues/36531
PR-URL: https://github.com/nodejs/node/pull/37481
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-03-01 11:43:27 -08:00
James M Snell
da217d0773
fs: fix flag and mode validation
...
The `flag` and `mode` options were not being validated correctly.
Signed-off-by: James M Snell <jasnell@gmail.com >
Fixes: https://github.com/nodejs/node/issues/37430
PR-URL: https://github.com/nodejs/node/pull/37480
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-03-01 09:47:56 -08:00
Rich Trott
1e34df139c
stream: move duplicated code to an internal module
...
Create a utils module for isIterable(), isReadable(), and isStream().
PR-URL: https://github.com/nodejs/node/pull/37508
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-02-28 05:07:26 -08:00
Anna Henningsen
5968c54235
worker: fix interaction of terminate() with messaging port
...
When a Worker is terminated, its own handle and the public
`MessagePort` are `.ref()`’ed, so that all relevant events,
including the `'exit'` events, end up being received.
However, this is problematic if messages end up being queued
from the Worker between the beginning of the `.terminate()` call
and its completion, and there are no `'message'` event handlers
present at that time. In that situation, currently the messages
would not end up being processed, and since the MessagePort
is still `.ref()`’ed, it would keep the event loop alive
indefinitely.
To fix this:
- Make sure that all messages end up being received by
`drainMessagePort()`, including cases in which the port had
been stopped (i.e. there are no `'message'` listeners) and
cases in which we exceed the limit for messages being processed
in one batch.
- Unref the Worker’s internal ports manually after the Worker
has exited.
Either of these solutions should be solving this on its own,
but I think it makes sense to make sure that both of them
happen during cleanup.
PR-URL: https://github.com/nodejs/node/pull/37319
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-02-27 17:26:20 +01:00
Nitzan Uziely
9f56bc8b4c
child_process: fix spawn and fork abort behavior
...
Fix AbortSignal in Spawn which doesn't actually abort
the process, and fork can emit an AbortError even if
the process was already exited. Add documentation
For killSignal.
Fixes: https://github.com/nodejs/node/issues/37273
PR-URL: https://github.com/nodejs/node/pull/37325
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-02-27 14:38:50 +02:00
Nitzan Uziely
7837d3fde9
stream: add AbortSignal support to finished
...
PR-URL: https://github.com/nodejs/node/pull/37354
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-02-26 11:21:24 +01:00
Filip Skokan
8ddee73efc
crypto: check ed/x webcrypto key import algorithm names
...
PR-URL: https://github.com/nodejs/node/pull/37305
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-26 11:16:52 +01:00
Vít Ondruch
f392ac0bbe
crypto: make FIPS related options always awailable
...
There is no reason to hide FIPS functionality behind build flags.
OpenSSL always provide the information about FIPS availability via
`FIPS_mode()` function.
This makes the user experience more consistent, because the OpenSSL
library is always queried and the `crypto.getFips()` always returns
OpenSSL settings.
Fixes #34903
PR-URL: https://github.com/nodejs/node/pull/36341
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2021-02-25 18:12:58 -05:00
James M Snell
148bc33347
fs: fixup negative length in fs.truncate
...
`fs.ftruncate`, `fsPromises.truncate`, and `fsPromises.ftruncate`
all adjust negative lengths to 0 before invoking the system call.
`fs.truncate()` was the one outlier.
This "fixes" https://github.com/nodejs/node/issues/35632 but in the
opposite direction than discussed in the issue -- specifically by
removing an EINVAL error from one function rather than adding it to
another.
Signed-off-by: James M Snell <jasnell@gmail.com >
Fixes: https://github.com/nodejs/node/issues/35632
PR-URL: https://github.com/nodejs/node/pull/37483
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-02-25 14:45:08 -08:00
ttzztztz
63794b4198
test: fix incorrect timers-promisified case
...
PR-URL: https://github.com/nodejs/node/pull/37425
Fixes: https://github.com/nodejs/node/issues/37395
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2021-02-25 07:27:23 +01:00
Antoine du Hamel
76a073b67e
module: runtime deprecate invalid package.json main entries
...
PR-URL: https://github.com/nodejs/node/pull/37204
Fixes: https://github.com/nodejs/node/issues/26588
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-02-24 11:27:48 +01:00
Rich Trott
80098e605c
test: remove FLAKY for test-http2-compat-client-upload-reject
...
As far as I know, this test hasn't failed since around the time it was
first reported in 2019.
Closes: https://github.com/nodejs/node/issues/30847
PR-URL: https://github.com/nodejs/node/pull/37462
Fixes: https://github.com/nodejs/node/issues/30847
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-23 15:08:27 -08:00
James M Snell
ecc584251e
test: fixup flaky test-performance-function-async test
...
The time assertion was inaccurate. Just remove it as it's
not strictly necessary
PR-URL: https://github.com/nodejs/node/pull/37493
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-02-23 14:58:00 -08:00
Michael Dawson
4eec919ba7
test: validate no debug info for http2
...
Refs: https://github.com/nodejs/node/issues/31763
This test would have helped us catch the noisy output
from http2 earlier. Currently none of the tests
fail if there is unexpected debug output.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/37447
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
2021-02-23 17:55:10 -05:00
Daniel Bevenius
47d6cedd85
http2: add unknownProtocol timeout
...
This commit add a configuration options named unknownProtocolTimeout
which can be specified to set a value for the timeout in milliseconds
that a server should wait when an unknowProtocol is sent to it. When
this happens a timer will be started and the if the socket has not been
destroyed during that time the timer callback will destoy it.
Refs: https://hackerone.com/reports/1043360
CVE-ID: CVE-2021-22883
PR-URL: https://github.com/nodejs-private/node-private/pull/246
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-02-23 11:25:59 +00:00
Rich Trott
1d2ba1eb74
test: remove FLAKY designation for test-http2-client-upload-reject
...
The test hasn't failed in a long time as far as I can tell. The issue
may have been fixed by various event updates/changes to http2 and
related systems.
PR-URL: https://github.com/nodejs/node/pull/37461
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-02-22 17:14:46 -08:00
Rich Trott
32482a828b
test: remove FLAKY for test-domain-error-types
...
PR-URL: https://github.com/nodejs/node/pull/37458
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-02-22 17:13:08 -08:00
James M Snell
f3eb224c83
perf_hooks: complete overhaul of the implementation
...
* Update the user timing implementation to conform to
User Timing Level 3.
* Reimplement user timing and timerify with pure JavaScript
implementations
* Simplify the C++ implementation for gc and http2 perf
* Runtime deprecate additional perf entry properties
in favor of the standard detail argument
* Disable the `buffered` option on PerformanceObserver,
all entries are queued and dispatched on setImmediate.
Only entries with active observers are buffered.
* This does remove the user timing and timerify
trace events. Because the trace_events are still
considered experimental, those can be removed without
a deprecation cycle. They are removed to improve
performance and reduce complexity.
Old: `perf_hooks/usertiming.js n=100000: 92,378.01249733355`
New: perf_hooks/usertiming.js n=100000: 270,393.5280638482`
PR-URL: https://github.com/nodejs/node/pull/37136
Refs: https://github.com/nodejs/diagnostics/issues/464
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-02-22 08:46:11 -08:00
dr-js
1e0cfa3361
test,child_process: add check for subProcess.pid
...
Note: this only add checks for async spawn, as the sync spawn do not
return a `subProcess`.
PR-URL: https://github.com/nodejs/node/pull/37014
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-02-22 12:15:53 +01:00
Joyee Cheung
445108dc30
bootstrap: include v8 module into the builtin snapshot
...
PR-URL: https://github.com/nodejs/node/pull/36943
Fixes: https://github.com/nodejs/node/issues/35930
Refs: https://github.com/nodejs/node/issues/35711
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-19 19:08:07 +08:00
Darshan Sen
4411a99dcd
test: fix flaky test-webcrypto-encrypt-decrypt-aes
...
* Use a copy of plaintext to prevent tampering of the original
* Since subtle.decrypt returns a Promise containing an ArrayBuffer and
ArrayBuffers cannot be modified directly, create a Buffer from it
right away so that the modification in the next line works as intended
Fixes: https://github.com/nodejs/node/issues/35586
PR-URL: https://github.com/nodejs/node/pull/37380
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2021-02-18 11:56:23 -05:00
Nitzan Uziely
38f6e5a789
stream: add AbortSignal to promisified pipeline
...
add support for AbortSignal to promisified pipeline.
Resolves: https://github.com/nodejs/node/issues/37321
PR-URL: https://github.com/nodejs/node/pull/37359
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-02-18 18:00:02 +02:00
Michaël Zasso
bd4d9ef637
buffer: make Blob's constructor more spec-compliant
...
PR-URL: https://github.com/nodejs/node/pull/37361
Fixes: https://github.com/nodejs/node/issues/37352
Fixes: https://github.com/nodejs/node/issues/37356
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-17 14:08:28 +01:00
Michaël Zasso
6b289853b2
buffer: make Blob's slice method more spec-compliant
...
PR-URL: https://github.com/nodejs/node/pull/37361
Fixes: https://github.com/nodejs/node/issues/37335
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-17 14:07:57 +01:00
Rich Trott
41516b9c45
test: fix flaky test-fs-promises-file-handle-read
...
tmpdir.refresh() cannot be called multiple times reliably on Raspberry
Pi in CI because NFS might optimistically report a path as
removed before it actually is. At least, that's what I think is going
on. Anyway, tmpdir.refresh() is generally designed to be called once,
so let's just call it once.
PR-URL: https://github.com/nodejs/node/pull/37371
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-16 19:35:45 -08:00
Antoine du Hamel
7fd6c2036d
tools: refactor prefer-primordials
...
Use optional chaining to improve code readability and remove use of
`Array.prototype.reduce`.
PR-URL: https://github.com/nodejs/node/pull/36018
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
2021-02-16 17:58:31 +01:00
Rich Trott
b2b887bd26
test: enable no-restricted-syntax rule for test-timers-promisified
...
PR-URL: https://github.com/nodejs/node/pull/37357
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-02-15 14:12:23 -08:00
Bradley Farias and James M Snell
f24e70736f
policy: fix cascade getting scope
...
PR-URL: https://github.com/nodejs/node/pull/37298
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Co-authored-by: James M Snell <jasnell@gmail.com >
2021-02-15 16:04:58 -06:00
Nitzan Uziely
83d6e63aee
events: change EventTarget handler exception behavior
...
Change the behavior of EventTarget, instead of emitting
'error' on handler exception, emit 'uncaughtException'.
Fixes: https://github.com/nodejs/node/issues/36770
PR-URL: https://github.com/nodejs/node/pull/37237
Fixes: https://github.com/nodejs/node/issues/36770
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-02-15 20:10:07 +02:00