James M Snell
f5acc2d030
crypto: fix regression on randomFillSync
...
Signed-off-by: James M Snell <jasnell@gmail.com >
Fixes: https://github.com/nodejs/node/issues/35722
PR-URL: https://github.com/nodejs/node/pull/35723
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
2020-10-21 11:17:58 +01:00
Tobias Nießen
d54edece99
test: refactor test-crypto-pbkdf2
...
PR-URL: https://github.com/nodejs/node/pull/35693
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-10-21 11:17:58 +01:00
Kim-Anh Tran
94dd7b9f94
test: update tests after increasing typed array size to 4GB
...
PR-URL: https://github.com/nodejs/node/pull/35415
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2020-10-18 20:17:40 +02:00
H Adinarayana
9ce5a03148
test: add test for listen callback runtime binding
...
PR-URL: https://github.com/nodejs/node/pull/35657
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2020-10-17 18:40:55 +05:30
himself65
a3731309cc
test: refactor test-https-host-headers
...
Use `common.mustCall` and `util.debuglog`. Remove unnecessary functions
PR-URL: https://github.com/nodejs/node/pull/32805
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-10-16 23:25:27 +00:00
Antoine du Hamel
aaf225a2a0
module: add setter for module.parent
...
PR-URL: https://github.com/nodejs/node/pull/35522
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-10-17 00:49:56 +02:00
Tobias Nießen
30fb4a015d
test: add common.mustSucceed
...
PR-URL: https://github.com/nodejs/node/pull/35086
Reviewed-By: Ruy Adorno <ruyadorno@github.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-10-17 00:48:26 +02:00
Danny Sonnenschein
6f34498148
net: add support for resolving DNS CAA records
...
This adds support for DNS Certification Authority Authorization
(RFC 8659) to Node.js.
PR-URL: https://github.com/nodejs/node/pull/35466
Fixes: https://github.com/nodejs/node/issues/19239
Refs: https://github.com/nodejs/node/issues/14713
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-10-16 10:21:32 +02:00
Robert Nagy
1d8ecd8cfe
stream: async iterator stop read if destroyed
...
Fixes some compatibility issues where it is expected
that for await stops reading when the stream is
destroyed.
Refs: https://github.com/nodejs/node/pull/34887
PR-URL: https://github.com/nodejs/node/pull/35640
Reviewed-By: Rich Trott <rtrott@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 >
2020-10-15 15:46:40 -04:00
Ian Sutherland
2002d90abd
fs: deprecation warning on recursive rmdir
...
This is a follow up to #35494 to add a deprecation warning when
using recursive rmdir. This only warns if you are attempting
to remove a file or a nonexistent path.
PR-URL: https://github.com/nodejs/node/pull/35562
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ben Coe <bencoe@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2020-10-14 18:56:40 -07:00
Anna Henningsen
6265951153
test: add regression test for v8.getHeapSnapshot() crash
...
Fixes: https://github.com/nodejs/node/issues/35559
PR-URL: https://github.com/nodejs/node/pull/35612
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2020-10-14 20:11:51 +02:00
Myles Borins
d9e98df01b
test: fix tests for npm 7.0.0
...
PR-URL: https://github.com/nodejs/node/pull/35631
Reviewed-By: Ben Coe <bencoe@gmail.com >
Reviewed-By: Ruy Adorno <ruyadorno@github.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2020-10-14 10:36:46 -04:00
bcoe
7d6672226b
fs: rimraf should not recurse on failure
...
PR-URL: https://github.com/nodejs/node/pull/35566
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-10-13 15:04:57 -07:00
James M Snell
efe60a5fe2
test: mark test-webcrypto-encrypt-decrypt-aes flaky
...
Appears to be flaky only on rhe17-390x. Will be investigating
refs: https://github.com/nodejs/node/issues/35586
PR-URL: https://github.com/nodejs/node/pull/35587
Refs: https://github.com/nodejs/node/issues/35586
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-10-13 17:03:06 +00:00
James M Snell
095be6a01f
crypto: add getCipherInfo method
...
Simple method for retrieving basic information about a cipher
(such as block length, expected or default iv length, key length,
etc)
Signed-off-by: James M Snell <jasnell@gmail.com >
Fixes: https://github.com/nodejs/node/issues/22304
PR-URL: https://github.com/nodejs/node/pull/35368
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2020-10-13 09:30:53 -07:00
Daniil Demidovich
ce4ac15850
lib: fix readFile flag option typo
...
PR-URL: https://github.com/nodejs/node/pull/35292
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2020-10-13 16:54:29 +02:00
Dmitry Gozman
87da7a6d15
inspector: do not hardcode Debugger.CallFrameId in tests
...
Debugger.CallFrameId is defined as an opaque string [1].
Some tests currently hardcode the value, relying on
undocumented internal details of V8. This makes it hard
for V8 to change the internal representation.
We should instead use the reported call frame id from
the Debugger.paused event directly. This is how every
inspector client does it.
[1] https://chromedevtools.github.io/devtools-protocol/tot/Debugger/#type-CallFrameId
PR-URL: https://github.com/nodejs/node/pull/35570
Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-10-13 00:30:24 +00:00
Luigi Pinca
c739f371c3
test: do not use the same EventEmitter instance
...
Prevent multiple listeners for the `'error'` event to be added to the
same `EventEmitter` instance.
PR-URL: https://github.com/nodejs/node/pull/35560
Refs: https://github.com/nodejs/node/pull/35557#issuecomment-705476640
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-10-12 19:07:15 +02:00
Guy Bedford
f3ce2811dd
module: use Wasm CJS lexer when available
...
PR-URL: https://github.com/nodejs/node/pull/35583
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
2020-10-12 04:24:41 -07:00
cjihrig
4cfa5dfccd
fs: update rm/rmdir validation messages
...
The validation code for the rm/rmdir functions treated the
options as distinct parameters instead of the options properties
that they are. This commit updates the validation to treat them
like properties.
PR-URL: https://github.com/nodejs/node/pull/35565
Reviewed-By: Ben Coe <bencoe@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
2020-10-11 16:53:07 +00:00
Anna Henningsen
eee522ac29
lib: add EventTarget-related browser globals
...
Add
- Event
- EventTarget
- MessagePort
- MessageChannel
- MessageEvent
to the set of global objects, since they are available now and behave
like they do in the browser.
Fixes: https://github.com/nodejs/node/issues/35495
PR-URL: https://github.com/nodejs/node/pull/35496
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
2020-10-11 14:35:17 +00:00
Anna Henningsen
705d888387
worker: make MessageEvent class more Web-compatible
...
PR-URL: https://github.com/nodejs/node/pull/35496
Fixes: https://github.com/nodejs/node/issues/35495
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
2020-10-11 14:35:16 +00:00
Anna Henningsen
278d38f4cf
src: add maybe versions of EmitExit and EmitBeforeExit
...
This addresses a TODO comment, and removes invalid `.ToLocalChecked()`
calls from our code base.
PR-URL: https://github.com/nodejs/node/pull/35486
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-10-11 02:20:53 +02:00
Robert Nagy
d70c0ed250
http: allow passing array of key/val into writeHead
...
Enables an optimization when the user already has the headers
in an array form, e.g. when proxying.
PR-URL: https://github.com/nodejs/node/pull/35274
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-10-10 10:11:41 +02:00
Luigi Pinca
b474901438
test: add ALPNProtocols option to clientOptions
...
Without this, the session is destroyed with the following error
```
Error [ERR_HTTP2_ERROR]: Protocol error
at Http2Session.onSessionInternalError (internal/http2/core.js:756:26)
Emitted 'error' event on ClientHttp2Session instance at:
at emitClose (internal/http2/core.js:1010:10)
at internal/http2/core.js:1048:7
at finish (internal/streams/writable.js:731:5)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
code: 'ERR_HTTP2_ERROR',
errno: -505
}
```
The test then calls `session.close()` which tries to write to a
destroyed socket. As a result, an unhandled `ECONNRESET` error is
emitted in the v12 release line.
PR-URL: https://github.com/nodejs/node/pull/35482
Refs: https://github.com/nodejs/node/pull/34859
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-10-09 16:28:01 +02:00
Ian Sutherland
4e9f3cc6fe
fs: add rm method
...
This PR introduces a new method fs.rm that provides the behaviour of
rimraf when used with the recursive: true and force: true options.
PR-URL: https://github.com/nodejs/node/pull/35494
Reviewed-By: Ben Coe <bencoe@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruy Adorno <ruyadorno@github.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2020-10-08 13:23:44 -07:00
James M Snell
dae283d96f
crypto: refactoring internals, add WebCrypto
...
Fixes: https://github.com/nodejs/node/issues/678
Refs: https://github.com/nodejs/node/issues/26854
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/35093
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-10-07 17:27:05 -07:00
Ben Noordhuis
7b26322f6d
http: make response.setTimeout() work
...
Fixes: https://github.com/nodejs/node/issues/33734
PR-URL: https://github.com/nodejs/node/pull/34913
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-10-07 13:50:22 -05:00
Michaël Zasso
21782277c2
src: use node:moduleName as builtin module filename
...
This change allows for easier recognition of builtin modules in stack
traces.
Refs: https://github.com/nodejs/node/issues/11893
PR-URL: https://github.com/nodejs/node/pull/35498
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
2020-10-07 17:35:14 +02:00
Myles Borins
c87641aa97
test: fix test suite to work with npm 7
...
PR-URL: https://github.com/nodejs/node/pull/35474
Reviewed-By: Ruy Adorno <ruyadorno@github.com >
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org >
Reviewed-By: Ben Coe <bencoe@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-10-07 09:59:51 -04:00
Rich Trott
f593f9e9ef
test: adjust comments for upcoming lint rule
...
Enforce `//` for multiline comments. Some tests mixed and matched, and
at least one did so in a (to me) surprising way.
PR-URL: https://github.com/nodejs/node/pull/35485
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-10-07 04:36:02 -07:00
Anna Henningsen
40364b181d
src: add check against non-weak BaseObjects at process exit
...
When a process exits cleanly, i.e. because the event loop ends up
without things to wait for, the Node.js objects that are left on
the heap should be:
1. weak, i.e. ready for garbage collection once no longer
referenced, or
2. detached, i.e. scheduled for destruction once no longer
referenced, or
3. an unrefed libuv handle, i.e. does not keep the event loop
alive, or
4. an inactive libuv handle (essentially the same here)
There are a few exceptions to this rule, but generally,
if there are C++-backed Node.js objects on the heap
that do not fall into the above categories, we may be looking
at a potential memory leak. Most likely, the cause is a missing
`MakeWeak()` call on the corresponding object.
In order to avoid this kind of problem, we check the list
of BaseObjects for these criteria. In this commit, we only do so
when explicitly instructed to or when in debug mode
(where --verify-base-objects is always-on).
In particular, this avoids the kinds of memory leak issues
that were fixed in the PRs referenced below.
Refs: https://github.com/nodejs/node/pull/35488
Refs: https://github.com/nodejs/node/pull/35487
Refs: https://github.com/nodejs/node/pull/35481
PR-URL: https://github.com/nodejs/node/pull/35490
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2020-10-07 10:54:34 +02:00
Juan José Arboleda
fb2f3cc828
test: improve test coverage for eventtarget
...
PR-URL: https://github.com/nodejs/node/pull/33733
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-10-06 05:39:02 -05:00
ThakurKarthik
a8556dae16
crypto: set env values in KeyObject Deserialize method
...
Fixes: https://github.com/nodejs/node/issues/35263
PR-URL: https://github.com/nodejs/node/pull/35416
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-10-03 16:55:15 +02:00
Leko
4a6005c56a
console: add Symbol.toStringTag property
...
Add Symbol.toStringTag property to console object to follow WPT changes
Update WPT status of console and the repl test case
Refs: https://github.com/web-platform-tests/wpt/pull/24717
PR-URL: https://github.com/nodejs/node/pull/35399
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-10-01 23:52:08 +08:00
Beth Griggs
4acab22ac2
Revert "src: runtime deprecate process.umask()"
...
This reverts commit 60c4c2b6c5 .
PR-URL: https://github.com/nodejs/node/pull/35332
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruy Adorno <ruyadorno@github.com >
2020-09-30 21:46:25 -04:00
Guy Bedford
ee9e3e75aa
esm: use "node:" namespace for builtins
...
PR-URL: https://github.com/nodejs/node/pull/35387
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-09-29 18:20:28 -07:00
Michaël Zasso
56e36f41aa
fs: fix fs.promises.writeFile with typed arrays
...
Before this change, only the first part of typed arrays which have more
than 1 byte per element (e.g. Uint16Array) would be written.
This also removes the use of the `slice` method to avoid unnecessary
copying the data.
Fixes: https://github.com/nodejs/node/issues/35343
PR-URL: https://github.com/nodejs/node/pull/35376
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-09-29 14:23:52 +00:00
Guy Bedford
1e8cb08edc
module: named exports for CJS via static analysis
...
PR-URL: https://github.com/nodejs/node/pull/35249
Reviewed-By: Mary Marchini <oss@mmarchini.me >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2020-09-28 18:27:25 -07:00
Rich Trott
eec4a5b671
repl: standardize Control key indications
...
Throughout our messages and docs, we refer to the Control key in a
surprisingly varied number of ways:
* Control
* Ctrl
* Cntl
* varied capitalization on the above (e.g., ctrl vs. Ctrl)
Then, in key combinations:
* One of the items from the previous list followed by `-`
* ... or followed by `+`
* ... surrounded or not by `<` and `>`
* ... and inside backticks or not
* ... or just `^`
This is the start of standardization on the formulation recommended by
the Microsoft Style Guide (e.g., **Ctrl+C**).
PR-URL: https://github.com/nodejs/node/pull/35270
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-09-28 06:55:07 -07:00
Pooja D.P
73900983f0
test: replace annonymous functions with arrow
...
PR-URL: https://github.com/nodejs/node/pull/34921
Reviewed-By: Harshitha K P <harshitha014@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2020-09-27 16:39:49 +09:00
Rich Trott
325df03a6e
test,child_process: add tests for signalCode value
...
Prior to this change, none of the child_process tests checked the
signalCode property for a value other than null. Add a check to an
existing test.
PR-URL: https://github.com/nodejs/node/pull/35327
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2020-09-26 06:43:04 -07:00
Bartosz Sosnowski
abd8cdfc4e
win, child_process: sanitize env variables
...
On Windows environment variables are case-insensitive. When spawning
child process certain apps can get confused if some of the variables are
duplicated.
This adds a step on Windows to normalizeSpawnArguments that removes such
duplicates, keeping only the first (in lexicographic order) entry in the
env key of options. This is partly already done for the PATH entry.
Fixes: https://github.com/nodejs/node/issues/35129
PR-URL: https://github.com/nodejs/node/pull/35210
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2020-09-24 18:25:18 +02:00
Robert Nagy
6be80e1893
stream: fix legacy pipe error handling
...
Fixes: https://github.com/nodejs/node/issues/35237
PR-URL: https://github.com/nodejs/node/pull/35257
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-09-23 04:33:05 -07:00
Dan Fabulich
3b10f7f933
process: change default --unhandled-rejections=throw
...
This is a semver-major change that resolves DEP0018.
All users that have set an unhandledRejection hook or set a non-default
value for the --unhandled-rejections flag will see no change in behavior
after this change.
Refs: https://nodejs.org/dist/latest/docs/api/deprecations.html#deprecations_dep0018_unhandled_promise_rejections
PR-URL: https://github.com/nodejs/node/pull/33021
Fixes: https://github.com/nodejs/node/issues/20392
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Mary Marchini <oss@mmarchini.me >
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2020-09-22 12:29:32 -07:00
Robert Nagy
2b9003b165
stream: don't destroy on async iterator success
...
Destroying on async iterator completion ignores autoDestroy.
PR-URL: https://github.com/nodejs/node/pull/35122
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-09-21 21:38:49 +00:00
Robert Nagy
5461794b12
https: set requestTimeout default to 0
...
Fixes: https://github.com/nodejs/node/issues/35261
PR-URL: https://github.com/nodejs/node/pull/35264
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-09-21 08:32:26 -07:00
DrunkenPoney
17ebd464cc
readline: fix key name for function keys with modifiers
...
Fixes: https://github.com/nodejs/node/issues/35251
PR-URL: https://github.com/nodejs/node/pull/35268
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-09-21 07:42:15 -07:00
Matteo Collina
9c62e0e384
stream: move to internal/streams
...
Move all the streams constructors to internal/streams
and avoid a circular dependencies between the modules.
See: https://github.com/nodejs/readable-stream/issues/348
PR-URL: https://github.com/nodejs/node/pull/35239
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2020-09-21 08:23:06 +00:00
Jordan Harband
9cf9e4aebc
fs: loosen validation to allow objects with an own toString function
...
PR-URL: https://github.com/nodejs/node/pull/34993
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is >
2020-09-15 16:46:50 -07:00