Commit Graph

6781 Commits

Author SHA1 Message Date
Antoine du Hamel
c08a361f70
doc: add history entries for DEP0162 on fs.md
PR-URL: https://github.com/nodejs/node/pull/42608
Refs: https://github.com/nodejs/node/pull/42149
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-04-08 11:16:00 +01:00
Livia Medeiros
4fade6acb4
doc: fix brackets position
PR-URL: https://github.com/nodejs/node/pull/42649
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-08 11:15:52 +01:00
Rich Trott
8055c7ba5d doc: copyedit corepack.md
PR-URL: https://github.com/nodejs/node/pull/42620
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-04-07 22:27:39 -07:00
Juan José Arboleda
3c752648d4 2022-04-07, Version 17.9.0 (Current)
Notable Changes:

* (SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) https://github.com/nodejs/node/pull/42427
* deps: update undici to 4.16.0 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/42414
* doc: add @meixg to collaborators (Xuguang Mei) https://github.com/nodejs/node/pull/42576

PR-URL: https://github.com/nodejs/node/pull/42613
2022-04-07 17:42:55 -05:00
K.C.Ashish Kumar
28d8614add
http: document that ClientRequest inherits from OutgoingMessage
http: fix extends for ClientRequest from Stream to http.OutgoingMessage

http: added page entry for http.OutgoingMessage

http: updated order of links

http: included entry for http.OutgoingMessage

http: removed unnecessary entry from md file

PR-URL: https://github.com/nodejs/node/pull/42642
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-04-07 17:48:43 +01:00
Rich Trott
9191b42c83
doc: simplify Http2Stream encoding text
PR-URL: https://github.com/nodejs/node/pull/42597
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2022-04-06 04:03:10 +01:00
Darshan Sen
0187bc5cdc
v8: make v8.writeHeapSnapshot() error codes consistent
This change makes the error codes returned by v8.writeHeapSnapshot()
consistent across all platforms by using the libuv APIs instead of
fopen(), fwrite() and fclose(). This also starts reporting potential
errors that might happen during the write operations.

Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/42577
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-04-05 14:55:51 +01:00
Rich Trott
08aab07982
doc: remove obsolete stream API selection text
PR-URL: https://github.com/nodejs/node/pull/42586
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-04-05 13:17:03 +01:00
Colin Ihrig
54819f08e0
test_runner: support 'only' tests
This commit introduces a CLI flag and test runner functionality
to support running a subset of tests that are indicated by an
'only' option passed to the test.

PR-URL: https://github.com/nodejs/node/pull/42514
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-04 15:14:49 +01:00
Livia Medeiros
0c9273d126
fs: fix write methods param validation and docs
The FS docs wrongfully indicated support for passing object with an own 
`toString` function property to `FileHandle.prototype.appendFile`, 
`FileHandle.prototype.writeFile`, `FileHandle.prototype.write`, 
`fsPromises.writeFile`, and `fs.writeSync`. This commit fixes that, and 
adds some test to ensure the actual behavior is aligned with the docs.
It also fixes a bug that makes the process crash if a non-buffer object 
was passed to `FileHandle.prototype.write`.

Refs: https://github.com/nodejs/node/pull/34993
PR-URL: https://github.com/nodejs/node/pull/41677
Refs: https://github.com/nodejs/node/issues/41666
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-04 12:57:59 +02:00
Antoine du Hamel
560cbc5849
stream: expose web streams globals, remove runtime experimental warning
PR-URL: https://github.com/nodejs/node/pull/42225
Fixes: https://github.com/nodejs/node/issues/40950
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2022-04-04 09:36:54 +01:00
Himself65
e6a7300a10
process: disallow some uses of Object.defineProperty() on process.env
Disallow the use of Object.defineProperty() to hide entries in
process.env or make them immutable.

PR-URL: https://github.com/nodejs/node/pull/28006
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-04 09:24:17 +01:00
Tobias Nießen
d83e7a0b77
doc: remove faulty justification for 128-bit AES
This sentence implies that AES-128 is preferred over AES-256 because
of a related-key attack from 2009. However, that attack by Alex
Biryukov, Orr Dunkelman, Nathan Keller, Dmitry Khovratovich, and Adi
Shamir, while impressive, is only effective against variants of
AES-256 with a reduced number of rounds and it requires related keys.
This means that the attack is not effective against AES-256 as it is
used within TLS.

(AES-128 is still often preferred over AES-256 simply because it is
believed to be sufficiently secure and because it is faster.)

PR-URL: https://github.com/nodejs/node/pull/42578
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-04-03 21:56:00 +01:00
Antoine du Hamel
ae1f6db088
doc: fix documentation of FileHandle.prototype.appendFile
PR-URL: https://github.com/nodejs/node/pull/42588
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-04-03 21:48:44 +01:00
Tobias Nießen
84ea25223e
doc: change "OCSP Request" to "OCSP request"
PR-URL: https://github.com/nodejs/node/pull/42582
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-04-03 14:45:13 +01:00
Filip Skokan
e12cfd85ae
doc: aes webcrypto unwrap is not a node-specific extensions
PR-URL: https://github.com/nodejs/node/pull/42561
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-04-03 11:11:11 +01:00
Rich Trott
b07dc4d19f doc: simplify recommendations in process.md
Remove recommendation that has no explanation. Make the other
recommendation less wordy.

PR-URL: https://github.com/nodejs/node/pull/42556
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-04-02 23:12:54 -07:00
Rich Trott
b71779517d doc: clarify recommendations in stream.md
PR-URL: https://github.com/nodejs/node/pull/42555
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-04-02 22:46:39 -07:00
Rich Trott
c9bb345b05 doc: simplify recommendation in webcrypto.md
PR-URL: https://github.com/nodejs/node/pull/42554
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-04-02 22:36:56 -07:00
Rich Trott
70dae240f0 doc: update DEP0102 text
PR-URL: https://github.com/nodejs/node/pull/42553
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-04-02 22:35:38 -07:00
Rich Trott
059b890009
doc: remove util.promisify() content in readline.md
PR-URL: https://github.com/nodejs/node/pull/42552
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-03 06:03:04 +01:00
Antoine du Hamel
2dea9ccd8a
doc: add introduction sentence for CJS
PR-URL: https://github.com/nodejs/node/pull/42491
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-04-02 19:29:22 +01:00
Paolo Insogna
b9e97979f7
doc: document breaking change in http.IncomingMessage 'close' event
PR-URL: https://github.com/nodejs/node/pull/42521
Fixes: https://github.com/nodejs/node/issues/38924
Refs: https://github.com/nodejs/node/pull/33035
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-01 15:58:14 +02:00
Rich Trott
fd18b0e1d7
doc: remove extraneous comma
PR-URL: https://github.com/nodejs/node/pull/42548
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-04-01 14:54:14 +01:00
Tobias Nießen
d484cba6a0
doc: guide towards x509.fingerprint256
Recommend using x509.fingerprint256 instead of x509.fingerprint and
x509.fingerprint512 and suggest using it instead of x509.serialNumber
in order to uniquely identify certificates.

PR-URL: https://github.com/nodejs/node/pull/42516
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
2022-04-01 11:35:27 +01:00
Rich Trott
85f679fff1
doc: fix comment text in async_hooks example
PR-URL: https://github.com/nodejs/node/pull/42499
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-03-30 16:58:03 +01:00
Daniel Roe
eb3ca87a87
doc: add stability class to legacy status description
PR-URL: https://github.com/nodejs/node/pull/42525
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-03-30 17:49:29 +02:00
Tobias Nießen
1000eb168a
doc: suggest checkHost in checkServerIdentity docs
Refs: https://github.com/nodejs/node/pull/42470

PR-URL: https://github.com/nodejs/node/pull/42495
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-03-29 18:55:41 +01:00
theanarkh
e5200392a2
net,dns: trace tcp connection and dns by perf_hooks
use the perf_hooks to trace the time spent by net.connect, dns.lookup,
dns.lookupService, dns.resolvexxx.

PR-URL: https://github.com/nodejs/node/pull/42390
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-03-29 16:43:28 +01:00
Xuguang Mei
8a96ff7e54
doc: fix question promise API example
PR-URL: https://github.com/nodejs/node/pull/42465
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-03-28 11:44:21 +01:00
Rich Trott
fe95507403
doc: remove comma splice in events.md
PR-URL: https://github.com/nodejs/node/pull/42484
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-03-27 23:33:06 +01:00
Alba Mendez
01a230032b
doc: clarify napi_finalize behavior
We currently defer finalizer callbacks until the loop is idle.
Warn users that the weak reference returned by napi_wrap()
isn't guaranteed to be valid just because the finalizer hasn't
yet been called.

PR-URL: https://github.com/nodejs/node/pull/42461
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-03-27 14:57:13 +01:00
Tobias Nießen
934a3aa28f
crypto: make authTagLength optional for CC20P1305
PR-URL: https://github.com/nodejs/node/pull/42427
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2022-03-27 00:28:19 +00:00
Greg Poole
6e54851357
doc: expand history for conditional exports changes in v12
Fixes: https://github.com/nodejs/node/issues/36162

PR-URL: https://github.com/nodejs/node/pull/42339
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-03-26 16:40:52 +00:00
Rich Trott
99c46a62da
doc: change comma-splice to two sentences
PR-URL: https://github.com/nodejs/node/pull/42455
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-03-26 14:52:30 +00:00
Anupama Codippily
e387269586
doc: fix typo in async_context.md
PR-URL: https://github.com/nodejs/node/pull/42444
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-03-23 17:06:34 +00:00
Bryan English
3579f6d044 2022-03-22, Version 17.8.0 (Current)
Notable changes:

doc:
  * add @ShogunPanda to collaborators (Shogun) https://github.com/nodejs/node/pull/42362
  * deprecate string coercion in `fs.write`, `fs.writeFileSync` (Livia Medeiros) https://github.com/nodejs/node/pull/42149
http:
  * (SEMVER-MINOR) trace http client by perf_hooks (theanarkh) https://github.com/nodejs/node/pull/42345
deps:
  * upgrade npm to 8.5.5 (npm team) https://github.com/nodejs/node/pull/42382
  * update undici to 4.15.1 (Michaël Zasso) https://github.com/nodejs/node/pull/42246

PR-URL: https://github.com/nodejs/node/pull/42425
2022-03-22 10:34:05 -04:00
cjihrig
432d1b50e0 test: add initial test module
This commit adds a new 'test' module that exposes an API
for creating JavaScript tests. As the tests execute, TAP
output is written to standard output. This commit only supports
executing individual test files, and does not implement
command line functionality for a full test runner.

PR-URL: https://github.com/nodejs/node/pull/42325
Refs: https://github.com/nodejs/node/issues/40954
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-03-21 22:21:09 +00:00
Rich Trott
87089bf8c6
doc: standardize typography for _semantic versioning_
PR-URL: https://github.com/nodejs/node/pull/42401
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-03-21 17:57:10 +00:00
Tobias Nießen
6559261556
doc,test: clarify ChaCha20-Poly1305 usage
PR-URL: https://github.com/nodejs/node/pull/42323
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-03-21 16:41:39 +00:00
Tobias Nießen
298cc8212a
doc: unify import order in CCM example
Refs: https://github.com/nodejs/node/pull/39043

PR-URL: https://github.com/nodejs/node/pull/42394
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-03-21 14:31:51 +00:00
Rich Trott
4e2fefc2d0
doc: update property name
Property name `min` was updated in 23637e9a3b
to `lowest` but an instance of `min` was missed.

PR-URL: https://github.com/nodejs/node/pull/42398
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2022-03-21 05:12:33 +00:00
Tobias Nießen
fff95aeea9
doc: add that chacha20-poly1305 is IETF version
PR-URL: https://github.com/nodejs/node/pull/42370
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2022-03-19 00:11:04 +00:00
theanarkh
3f3fa6d990
http: trace http client by perf_hooks
PR-URL: https://github.com/nodejs/node/pull/42345
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
2022-03-18 15:15:08 +00:00
Aroyan
f4b7f6d52e
doc: fix Embedder's Guide link to V8 official docs
PR-URL: https://github.com/nodejs/node/pull/42373
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-03-17 09:25:43 +00:00
Rich Trott
82d896bc07
doc: revise async_hooks docs
The only significant change is to replace AsyncHooks with `AsyncHook`.

PR-URL: https://github.com/nodejs/node/pull/42337
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-03-17 05:42:19 +00:00
Danielle Adams
4586ac49f2
2022-03-15, Version 16.14.1 'Gallium' (LTS)
Notable changes:

* doc:
  * add release key for Bryan English (Bryan English) https://github.com/nodejs/node/pull/42102

PR-URL: https://github.com/nodejs/node/pull/42200
2022-03-15 22:31:35 -04:00
Bradley Farias
a01302b8df
esm: make extension-less errors in type:module actionable
PR-URL: https://github.com/nodejs/node/pull/42301
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-03-15 00:59:32 +00:00
Randall Leeds
4d072fecd2
doc: fix async iterable pipeline signal examples
Fix the pipeline examples to show that async generators receive
an AbortSignal wrapped in an object.

PR-URL: https://github.com/nodejs/node/pull/42258
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-03-14 23:43:31 +00:00
Damjan Cvetko
c649573a2a
doc: clarify path search in child_process.spawn
The documentation about command lookup could be more clear and note
differences between Windows and Linux/OSX.
Current text gives the impression that if one passes `options.env`
without `PATH`, the path search will fall back on `process.env.PATH`.
In reality, passing environment without `PATH` to `execvp` causes it
to look for the binary only in `/usr/bin:/bin`.
Also Windows behaves different and more in line with the current
documentation text.

PR-URL: https://github.com/nodejs/node/pull/41418
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-03-15 00:39:26 +01:00
Darshan Sen
625c1e841a
doc: clarify the meaning of legacy status
Fixes: https://github.com/nodejs/node/issues/42230
Fixes: https://github.com/nodejs/node/issues/42232

Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/42269
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-03-14 05:10:08 +00:00
Mikael Finstad
b481beecd8
doc: improve pipe description
I spent hours trying to make it work only to
learn that it's not supported in node anymore,
so I thought I'd save other people the time in the future.

https://groups.google.com/g/nodejs/c/SxNKLclbM5k?pli=1

PR-URL: https://github.com/nodejs/node/pull/42295
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.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: Mestery <mestery@protonmail.com>
2022-03-13 08:45:35 +00:00
Geoffrey Booth
a30e0de005
esm: add runtime warning for specifier resolution flag
PR-URL: https://github.com/nodejs/node/pull/42252
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-03-10 12:43:47 +01:00
Xuguang Mei
a7164fdd1a
doc: remove outdated timeout.unref content
resolve: https://github.com/nodejs/node/issues/42239

PR-URL: https://github.com/nodejs/node/pull/42241
Fixes: https://github.com/nodejs/node/issues/42239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-03-10 02:14:59 +00:00
Antoine du Hamel
fd5e70f267
doc: fix version history for net.Socket and net.Server
Refs: https://github.com/nodejs/node/pull/41310

PR-URL: https://github.com/nodejs/node/pull/42268
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2022-03-09 19:34:29 +00:00
Stewart X Addison
72c0c4b09b
2022-03-09, Version 17.7.0 (Current)
Notable changes:

* (SEMVER-MINOR) crypto: add KeyObject.prototype.equals method (Filip Skokan) https://github.com/nodejs/node/pull/42093
* (SEMVER-MINOR) net: add new options to net.Socket and net.Server (Paolo Insogna) https://github.com/nodejs/node/pull/41310
* (SEMVER-MINOR) src: allow preventing InitializeInspector in env (Shelley Vohr) https://github.com/nodejs/node/pull/35025
* doc: add release key for Bryan English (Bryan English) https://github.com/nodejs/node/pull/42102

Dependency Updates:

* deps: update nghttp2 to 1.47.0 (Yash Ladha) https://github.com/nodejs/node/pull/42127
* deps: upgrade npm to 8.5.2 (npm team) https://github.com/nodejs/node/pull/42122

New Collaborators:

* doc: add JakobJingleheimer to collaborators list (Jacob Smith) https://github.com/nodejs/node/pull/42185
* doc: move bnoordhuis back to collaborators (Ben Noordhuis) https://github.com/nodejs/node/pull/42064

PR-URL: https://github.com/nodejs/node/pull/42254
2022-03-09 17:47:02 +00:00
Paolo Insogna
eacd45656a
http: make TCP noDelay enabled by default
PR-URL: https://github.com/nodejs/node/pull/42163
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-03-09 14:37:49 +00:00
Livia Medeiros
4b198ffa7e
doc: deprecate string coercion in fs.write, fs.writeFileSync
This also affects `fs.writeFile`, `fs.appendFile`, and
`fs.appendFileSync`

Refs: https://github.com/nodejs/node/pull/41677

PR-URL: https://github.com/nodejs/node/pull/42149
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-03-08 22:21:24 +00:00
Roch Devost
409c594887
lib: fix AsyncResource.bind not using 'this' from the caller by default
PR-URL: https://github.com/nodejs/node/pull/42177
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-03-08 22:00:55 +00:00
Tobias Nießen
9412441da0
doc: remove refs to old OpenSSL list-* commands
The last release line that did not support the new openssl list command
was OpenSSL 1.1.0, which reached its end-of-life status years ago.

PR-URL: https://github.com/nodejs/node/pull/42235
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-03-08 17:33:27 +00:00
Matt Probert
14f60fb9a6
doc: readline 'line' event emits final line
Updated docs to reflect current behaviour of readline:
final line of input will be emitted via `'line'` event
when input stream `'end'` event is emitted even when
the input is not newline terminated.

Refs: https://github.com/nodejs/node-v0.x-archive/issues/7238

PR-URL: https://github.com/nodejs/node/pull/42214
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-03-07 21:08:40 +00:00
Tobias Nießen
ae59bcb7b1
doc: remove erroneous comma in cluster explainer
PR-URL: https://github.com/nodejs/node/pull/42238
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-03-07 01:09:24 +00:00
Rafael Silva
7262d6321b
http2: add edge case to GOAWAY request
PR-URL: https://github.com/nodejs/node/pull/42190
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-03-06 18:23:34 +00:00
Rich Trott
5dd6a5bd3c
doc: remove "considered" for clarity
"considered undefined" suggests that it's not REALLY undefined. It's
really undefined. Be firm!

PR-URL: https://github.com/nodejs/node/pull/42218
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-03-06 18:12:28 +00:00
Xuguang Mei
3d4f3ca5eb
src: skip revoke_data_object if uuid is not found
Fix: https://github.com/nodejs/node/issues/42206

PR-URL: https://github.com/nodejs/node/pull/42212
Fixes: https://github.com/nodejs/node/issues/42206
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-03-06 09:24:42 +00:00
Antoine du Hamel
de3a86b553
doc: clarify that some modules don't work when compiled without ssl
PR-URL: https://github.com/nodejs/node/pull/42198
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-03-05 22:43:29 +00:00
Rafael Silva
91cc4fa32d
doc: add note about nghttp2 hd pair size
PR-URL: https://github.com/nodejs/node/pull/42172
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-03-05 15:28:15 +00:00
Antoine du Hamel
29bb2bb57d
doc: use parenthesis instead of em dash
PR-URL: https://github.com/nodejs/node/pull/42202
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-03-03 19:45:30 +00:00
Juan José Arboleda
7724e78e47 doc: add missing single-quotes to http.OutgoingMessage
PR-URL: https://github.com/nodejs/node/pull/42162
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-03-02 14:30:37 -05:00
apeltop
d50efc691c
doc: fix typos
PR-URL: https://github.com/nodejs/node/pull/42146
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-03-02 14:55:53 +00:00
小菜
04c68ba54a
http: add default argument for Agent.prototype.getName
PR-URL: https://github.com/nodejs/node/pull/41906
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-02-27 15:01:01 +00:00
Livia Medeiros
80bfb9b21a
fs: adjust default length for fs.readSync and fsPromises/read
Makes default length reasonable when nonzero offset is set.

PR-URL: https://github.com/nodejs/node/pull/42128
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-02-27 12:56:09 +00:00
Antoine du Hamel
6ee4228498
crypto: validate this value for webcrypto.getRandomValues
PR-URL: https://github.com/nodejs/node/pull/41760
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-02-26 17:12:48 +00:00
Filip Skokan
aa97c9d973
crypto: add KeyObject.prototype.equals method
PR-URL: https://github.com/nodejs/node/pull/42093
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-02-26 13:51:09 +00:00
apeltop
5f21a2b746
doc: remove repeated a word
PR-URL: https://github.com/nodejs/node/pull/42138
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-02-26 10:52:52 +00:00
Arnold Zokas
debd87cd9b
doc: document change to IncomingMessage.headers enumerability
The IncomingMessage.headers property was made non-enumerable
in PR #35281.

PR-URL: https://github.com/nodejs/node/pull/42095
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2022-02-23 18:16:50 +00:00
Bryan English
175638b7a4 2022-02-22, Version 17.6.0 (Current)
Notable changes:

- doc: deprecate notice for process methods (Yash Ladha) https://github.com/nodejs/node/pull/41587
- stream: revert `map` spec compliance (Benjamin Gruenbaum) https://github.com/nodejs/node/pull/41931
- build: remove broken x32 arch support (Ben Noordhuis) https://github.com/nodejs/node/pull/41905
- (SEMVER-MINOR) esm: support https remotely and http locally under flag (Bradley Farias) https://github.com/nodejs/node/pull/36328
- (SEMVER-MINOR) fs: support copy of relative links with cp and cpSync (Marcos Bjoerkelund) https://github.com/nodejs/node/pull/41819
- (SEMVER-MINOR) lib: add FormData global when fetch is enabled (Michaël Zasso) https://github.com/nodejs/node/pull/41956
- (SEMVER-MINOR) readline: bind keystroke `ctrl`+`6` to redo (Ray) https://github.com/nodejs/node/pull/41662
- process: deprecate multipleResolves (Benjamin Gruenbaum) https://github.com/nodejs/node/pull/41872
  - Documentation-only.

Dependency updates:

- deps: upgrade npm to 8.5.1 (npm-robot) https://github.com/nodejs/node/pull/42039
- deps: update undici to 3e267ece5f (Michaël Zasso) https://github.com/nodejs/node/pull/41955
- deps: upgrade npm to 8.5.0 (npm-robot) https://github.com/nodejs/node/pull/41925

New collaborators:

- doc: add marsonya to collaborators (Akhil Marsonya) https://github.com/nodejs/node/pull/41991
- doc: add joesepi to collaborators (Joe Sepi) https://github.com/nodejs/node/pull/41914

PR-URL: https://github.com/nodejs/node/pull/42072
2022-02-22 17:31:17 -08:00
Michael Dawson
6847fec384 doc: clarify persistent ref behavior
Add explanation of case to be careful of
in order to avoid native memory being kept
alive.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/42035
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-02-22 12:05:10 -05:00
Antoine du Hamel
470c2845cc
crypto: clarify require("crypto").getRandomValues is Node.js specific
Refs: https://github.com/nodejs/node/pull/41779
Refs: https://github.com/nodejs/node/pull/41760
PR-URL: https://github.com/nodejs/node/pull/41782
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-02-22 17:51:50 +01:00
Tobias Nießen
16650ee2a3
doc: clarify supported versus enabled TLS ciphers
PR-URL: https://github.com/nodejs/node/pull/42063
Refs: https://github.com/nodejs/node/issues/42059
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-22 15:26:52 +00:00
Paolo Insogna
45b5ca810a
net: add new options to net.Socket and net.Server
PR-URL: https://github.com/nodejs/node/pull/41310
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-22 10:58:30 +00:00
legendecas
c071bd581a doc: add missing api entries on performance
PR-URL: https://github.com/nodejs/node/pull/42018
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-02-22 11:46:23 +08:00
Michaël Zasso
4944ad0b9e
lib: enable fetch by default
PR-URL: https://github.com/nodejs/node/pull/41811
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2022-02-21 12:34:13 +00:00
Alexandru Comanescu
7643c5239d doc: fix typo in http2 endAfterHeaders description
PR-URL: https://github.com/nodejs/node/pull/42060
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-02-20 05:55:03 -08:00
wbt
246227f4bc
fs: fix default length parameter for fs.read
Currently, specifying an `offset` without a `length`
throws an `ERR_OUT_OF_RANGE` error.
This commit provides a more sensible default.
This change should only affect cases
where no length is specified and a nonzero offset is,
which are currently throwing errors.

PR-URL: https://github.com/nodejs/node/pull/40349
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-19 18:22:46 +01:00
Antoine du Hamel
5d4da62514
tools: lint deprecation codes
Add a rule to make sure deprecation codes are in order.

PR-URL: https://github.com/nodejs/node/pull/41992
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-19 18:14:09 +01:00
Michaël Zasso
68c4b8d56d
lib: add FormData global when fetch is enabled
PR-URL: https://github.com/nodejs/node/pull/41956
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-18 15:46:32 +00:00
Xuguang Mei
7d75e3f542
debugger: add debugger alias for exec(expr)
https://github.com/nodejs/node/issues/41794

PR-URL: https://github.com/nodejs/node/pull/41907
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2022-02-17 19:23:20 +00:00
Derek Wolpert
4a690c43b8
doc: adjust a/an word usage
PR-URL: https://github.com/nodejs/node/pull/41915
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-02-17 14:59:41 +00:00
Ray
680f3a5e9b
doc: remove extra <td>
PR-URL: https://github.com/nodejs/node/pull/42006
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-16 13:58:03 +00:00
Antoine du Hamel
daf8a468d5
doc: fix deprecation number
Refs: https://github.com/nodejs/node/pull/41872
Refs: https://github.com/nodejs/node/pull/41896

PR-URL: https://github.com/nodejs/node/pull/41990
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-02-15 19:55:56 +01:00
Marcos Bjoerkelund
cee626d0f5
fs: support copy of relative links with cp and cpSync
Fixes: https://github.com/nodejs/node/issues/41693

PR-URL: https://github.com/nodejs/node/pull/41819
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-02-15 12:14:04 +00:00
Yash Ladha
337e70ddb7
doc: deprecate notice for process methods
Documentation of deprecation notice `_getActiveRequestsInfo` and
`_getActiveHandlesInfo` since they are internal usage and can be removed
in future releases.

PR-URL: https://github.com/nodejs/node/pull/41587
Refs: https://github.com/nodejs/node/pull/40813
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-15 13:02:39 +01:00
Xuguang Mei
ee38bbd4cf
doc: fix bug in readable.unshift code example
PR-URL: https://github.com/nodejs/node/pull/41944
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-02-15 12:01:36 +01:00
Xuguang Mei
9fb7ac3bbd
stream: need to cleanup event listeners if last stream is readable
fix: https://github.com/nodejs/node/issues/35452

PR-URL: https://github.com/nodejs/node/pull/41954
Fixes: https://github.com/nodejs/node/issues/35452
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-02-15 10:15:14 +00:00
Antoine du Hamel
849991c6c4
crypto: expose Web Crypto API on the global scope
PR-URL: https://github.com/nodejs/node/pull/41938
Refs: https://developer.mozilla.org/en-US/docs/Web/API/crypto_property
Refs: https://github.com/nodejs/node/pull/41782
Refs: https://w3c.github.io/webcrypto
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2022-02-14 16:14:49 +00:00
Mestery
b53f927a52
doc: add missing buffer in the stream/consumers import example
PR-URL: https://github.com/nodejs/node/pull/41961
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-02-14 15:23:01 +00:00
Benjamin Gruenbaum
60b8e79599 process: runtime deprecate multipleResolves
PR-URL: https://github.com/nodejs/node/pull/41896
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-13 23:30:36 +02:00
Tobias Nießen
829a34ac1d
doc: fix typo in readableStream.locked description
PR-URL: https://github.com/nodejs/node/pull/41923
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-13 15:49:05 +00:00
Xuguang Mei
9651f44000
doc: fix wrong indent in stream documentation
PR-URL: https://github.com/nodejs/node/pull/41943
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-12 17:57:43 +00:00
Rich Trott
86fba23b1f
doc: emphasize security warning in vm module doc
Refs: https://github.com/nodejs/node/issues/40718

PR-URL: https://github.com/nodejs/node/pull/41916
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-12 17:09:13 +00:00
Austin Cheney
dfacb80914
doc: clarify tls.Server 'connection' event documentation
PR-URL: https://github.com/nodejs/node/pull/41917
Fixes: https://github.com/nodejs/node/issues/41880
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-02-12 12:49:03 +01:00
Ben Noordhuis
214d7da675
build: remove broken x32 arch support
I added support for x32 back in 2014 but it's been in a state of
disrepair ever since, not in the least because it was never a fully
supported architecture in upstream V8.

V8 dropped x32 support entirely in or around 2018 so the removal from
Node's build system is long overdue.

Refs: https://github.com/nodejs/node/issues/40576

PR-URL: https://github.com/nodejs/node/pull/41905
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-02-11 08:52:24 +00:00
Elad Nava
217366e308 cluster: respect listen backlog set by workers
PR-URL: https://github.com/nodejs/node/pull/41623
Co-authored-by: Ouyang Yadong <oyydoibh@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-02-10 22:58:10 +01:00
Ruy Adorno
36dadfa382
2022-02-10, Version 17.5.0 (Current)
Notable changes:

lib:
  * (SEMVER-MINOR) add fetch (Michaël Zasso) https://github.com/nodejs/node/pull/41749
module:
  * unflag esm json modules (Geoffrey Booth) https://github.com/nodejs/node/pull/41736
node-api:
  * (SEMVER-MINOR) add node_api_symbol_for() (Darshan Sen) https://github.com/nodejs/node/pull/41329
stream:
  * (SEMVER-MINOR) add iterator helper find (linkgoron) https://github.com/nodejs/node/pull/41849
  * (SEMVER-MINOR) add toArray (Benjamin Gruenbaum) https://github.com/nodejs/node/pull/41553
  * (SEMVER-MINOR) add forEach method (Benjamin Gruenbaum) https://github.com/nodejs/node/pull/41445
  * (SEMVER-MINOR) support some and every (Benjamin Gruenbaum) https://github.com/nodejs/node/pull/41573
deps:
  * upgrade npm to 8.4.1 (npm team) [#41836](https://github.com/nodejs/node/pull/41836)

PR-URL: https://github.com/nodejs/node/pull/41897
2022-02-10 13:23:49 -05:00
Rich Trott
edc8c6eef1
doc: edit process.config deprecation text
PR-URL: https://github.com/nodejs/node/pull/41889
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-02-10 06:41:58 +00:00
Bradley Farias
ceadb473e6 esm: support https remotely and http locally under flag
Co-authored-by: Jacob Smith <3012099+JakobJingleheimer@users.noreply.github.com>
Co-authored-by: James M Snell <jasnell@gmail.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
Co-authored-by: James Sumners <james@sumners.email>
PR-URL: https://github.com/nodejs/node/pull/36328
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2022-02-09 19:47:12 -08:00
Danielle Adams
2455b26fdb
2022-02-08, Version 16.14.0 'Gallium' (LTS)
Notable changes:

Importing JSON modules now requires experimental import assertions
syntax

This release adds experimental support for the import assertions stage 3
proposal.

To keep Node.js ESM implementation as compatible as possible with the
HTML spec, import assertions are now required to import JSON modules
(still behind the `--experimental-json-modules` CLI flag):

```mjs
import info from './package.json' assert { type: 'json' };
```

Or use dynamic import:

```mjs
const info = await import('./package.json', {
  assert: { type: 'json' }
});
```

Contributed by Antoine du Hamel and Geoffrey Booth https://github.com/nodejs/node/pull/40250

Other notable changes:

* async_hooks:
  * (SEMVER-MINOR) expose async_wrap providers (Rafael Gonzaga) https://github.com/nodejs/node/pull/40760
* child_process:
  * (SEMVER-MINOR) add support for URL to `cp.fork` (Antoine du Hamel) https://github.com/nodejs/node/pull/41225
* doc:
  * add @Mesteery to collaborators (Mestery) https://github.com/nodejs/node/pull/41543
  * add @bnb as a collaborator (Tierney Cyren) https://github.com/nodejs/node/pull/41100
* esm:
  * (SEMVER-MINOR) graduate capturerejections to supported (James M Snell) https://github.com/nodejs/node/pull/41267
  * (SEMVER-MINOR) add EventEmitterAsyncResource to core (James M Snell) https://github.com/nodejs/node/pull/41246
* events:
  * (SEMVER-MINOR) propagate weak option for kNewListener (James M Snell) https://github.com/nodejs/node/pull/40899
* fs:
  * (SEMVER-MINOR) accept URL as argument for `fs.rm` and `fs.rmSync` (Antoine du Hamel) https://github.com/nodejs/node/pull/41132
* lib:
  * (SEMVER-MINOR) make AbortSignal cloneable/transferable (James M Snell) https://github.com/nodejs/node/pull/41050
  * (SEMVER-MINOR) add AbortSignal.timeout (James M Snell) https://github.com/nodejs/node/pull/40899
  * (SEMVER-MINOR) add reason to AbortSignal (James M Snell) https://github.com/nodejs/node/pull/40807
  * (SEMVER-MINOR) add unsubscribe method to non-active DC channels (simon-id) https://github.com/nodejs/node/pull/40433
  * (SEMVER-MINOR) add return value for DC channel.unsubscribe (simon-id) https://github.com/nodejs/node/pull/40433
* loader:
  * (SEMVER-MINOR) return package format from defaultResolve if known (Gabriel Bota) https://github.com/nodejs/node/pull/40980
* perf_hooks:
  * (SEMVER-MINOR) multiple fixes for Histogram (James M Snell) https://github.com/nodejs/node/pull/41153
* process:
  * (SEMVER-MINOR) add `getActiveResourcesInfo()` (Darshan Sen) https://github.com/nodejs/node/pull/40813
* src:
  * (SEMVER-MINOR) add x509.fingerprint512 to crypto module (3nprob) https://github.com/nodejs/node/pull/39809
  * (SEMVER-MINOR) add flags for controlling process behavior (Cheng Zhao) https://github.com/nodejs/node/pull/40339
* stream:
  * (SEMVER-MINOR) add filter method to readable (Benjamin Gruenbaum) https://github.com/nodejs/node/pull/41354
  * (SEMVER-MINOR) add isReadable helper (Robert Nagy) https://github.com/nodejs/node/pull/41199
  * (SEMVER-MINOR) add map method to Readable (Benjamin Gruenbaum) https://github.com/nodejs/node/pull/40815
  * deprecate thenable support (Antoine du Hamel) https://github.com/nodejs/node/pull/40860
* util:
  * (SEMVER-MINOR) pass through the inspect function to custom inspect functions (Ruben Bridgewater) https://github.com/nodejs/node/pull/41019
  * (SEMVER-MINOR) add numericSeparator to util.inspect (Ruben Bridgewater) https://github.com/nodejs/node/pull/41003
  * (SEMVER-MINOR) always visualize cause property in errors during inspection (Ruben Bridgewater) https://github.com/nodejs/node/pull/41002
* timers:
  * (SEMVER-MINOR) add experimental scheduler api (James M Snell) https://github.com/nodejs/node/pull/40909
* v8:
  * (SEMVER-MINOR) multi-tenant promise hook api (Stephen Belanger) https://github.com/nodejs/node/pull/39283

PR-URL: https://github.com/nodejs/node/pull/41804
2022-02-08 14:28:28 -05:00
Rich Trott
08be585712
doc: remove unneeded ellipsis in header
The ellipsis in `All together` is not needed. I've had it on my list of
"small things to take care of when you get a chance" for a while. The
Microsoft Style Guide says to not use ellipses except in certain cases,
and that reminded me to do it. The day has arrived!

PR-URL: https://github.com/nodejs/node/pull/41888
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2022-02-08 17:42:52 +00:00
Benjamin Gruenbaum
5942c90296 doc: fix webstream close reject state state doc
The `closed` promise may reject. Document the states where it rejects
based on the spec.

Fixes: https://github.com/nodejs/node/issues/41858

PR-URL: https://github.com/nodejs/node/pull/41860
Co-Authored-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-02-08 18:32:28 +02:00
Benjamin Gruenbaum
1f17592116
process: deprecate multipleResolves
Deprecate the process multipleResolves event to detect when a promise is
resolved more than once because it never really worked.

Fixes: https://github.com/nodejs/node/issues/41554

PR-URL: https://github.com/nodejs/node/pull/41872
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-02-08 14:24:59 +00:00
Ray
a0668572c7
readline: bind keystroke ctrl+6 to redo
1. Any keystroke emits `0x1E` will do redo action.
2. Fix bug of undo/redo.
3. More detailed document.
4. Unit tests.

PR-URL: https://github.com/nodejs/node/pull/41662
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-07 17:40:05 +00:00
linkgoron
42ad4137aa
stream: add iterator helper find
Continue iterator-helpers work by adding `find` to readable streams.

PR-URL: https://github.com/nodejs/node/pull/41849
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-02-07 07:24:17 +00:00
Tobias Nießen
e4dfe5466f
doc: use Oxford comma in crypto docs
PR-URL: https://github.com/nodejs/node/pull/41875
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-02-06 17:57:53 +00:00
Rafael Silva
1c7a74e6f7
doc: add stream pipelining note on Http usage
PR-URL: https://github.com/nodejs/node/pull/41796
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-06 09:28:55 +00:00
Tobias Nießen
37cb16574a
doc: improve SSL_OP_PRIORITIZE_CHACHA description
The cipher should be spelled "ChaCha20-Poly1305", i.e., with a hyphen
between the encryption and MAC algorithm names. Also change "when client
does" to "when the client does."

PR-URL: https://github.com/nodejs/node/pull/41866
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-02-05 23:36:32 +00:00
Tobias Nießen
b8d994a23a
doc: add missing commas in cluster docs
PR-URL: https://github.com/nodejs/node/pull/41865
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-02-05 22:50:24 +00:00
Mohammed Keyvanzadeh
8c4b8b201a
lib: replace validator and error
Refs: https://github.com/nodejs/node/pull/41660

PR-URL: https://github.com/nodejs/node/pull/41678
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-05 08:36:48 -08:00
Antoine du Hamel
913c125e98
doc: add history information for Corepack
PR-URL: https://github.com/nodejs/node/pull/41813
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-05 08:25:09 -08:00
James M Snell
8e681d51b4
worker: graduate get/setEnvironmentData APIs
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/41272
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2022-02-05 07:52:04 -08:00
Rich Trott
ee8c2bed8b doc: add comments to empty blocks in worker_threads text
PR-URL: https://github.com/nodejs/node/pull/41831
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-02-05 12:58:29 +00:00
Rich Trott
8997bd8af2 doc: remove empty block from console.timeEnd() example
PR-URL: https://github.com/nodejs/node/pull/41831
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-02-05 12:58:28 +00:00
Bar Admoni
38007df999
cluster: make kill to be just process.kill
Make `Worker.prototype.kill` to be just `process.kill` without
preforming graceful disconnect beforehand.

Refs: https://github.com/nodejs/node/issues/33715
PR-URL: https://github.com/nodejs/node/pull/34312
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-05 00:15:24 +01:00
Gerhard Stöbich
9e892e22e3
doc: add overhead hints for heap snapshot generation
Added some hints that creation of an heap snapshot has significant
overhead on memory requirement and event loop utilization.

PR-URL: https://github.com/nodejs/node/pull/41822
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-02-04 19:16:41 +00:00
Tobias Nießen
f069793fd4
doc: fix X509 CA acronym capitalization
PR-URL: https://github.com/nodejs/node/pull/41841
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-02-04 03:46:30 +00:00
Tobias Nießen
09f95541b1
doc: use sentence case for X509 error codes header
Refs: https://github.com/nodejs/node/pull/33889

PR-URL: https://github.com/nodejs/node/pull/41829
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-02-03 20:20:52 +00:00
Yash Ladha
0f84217f42
async_hooks: fix imports in context example
Added imports for packages that is mentioned in the example of
async_hooks context example.

PR-URL: https://github.com/nodejs/node/pull/39229
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2022-02-03 12:30:36 +00:00
Tony Gorez
064783cf5a
doc: add note about resource type in async_hooks
PR-URL: https://github.com/nodejs/node/pull/41797
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
2022-02-03 10:49:34 +00:00
Ateş Göral
f94f113bad
doc: use example.com for examples
PR-URL: https://github.com/nodejs/node/pull/41827
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-02-03 06:39:01 +00:00
Tobias Nießen
cd5689eed3
doc: align tls port types with net port types
PR-URL: https://github.com/nodejs/node/pull/41799
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-02-02 21:03:56 +00:00
Tobias Nießen
68ef009f82
doc: use UDPv4/UDPv6 consistently with TCPv4/TCPv6
(Arguably, the whole terminology is not perfect, but at least it will be
consistent with TCP now.)

PR-URL: https://github.com/nodejs/node/pull/41824
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-02-02 19:48:54 +00:00
Michaël Zasso
86b77f7d0f
tools,doc: use V8::DisposePlatform
V8::ShutdownPlatform has been deprecated and does the same.

PR-URL: https://github.com/nodejs/node/pull/41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-02-02 17:25:01 +01:00
Tobias Nießen
dcf4890a32
doc: improve wording surrounding TLS 1.3 ciphers
Spelling out numbers makes this part easier to read. Also remove the
unnecessary word 'last'.

PR-URL: https://github.com/nodejs/node/pull/41778
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-02-01 23:08:39 +00:00
Richard Lau
1c23c1ed25
2022-02-01, Version 14.19.0 'Fermium' (LTS)
Notable changes:

Corepack:
Node.js now includes Corepack, a script that acts as a bridge between
Node.js projects and the package managers they are intended to be used
with during development.
In practical terms, Corepack will let you use Yarn and pnpm without
having to install them - just like what currently happens with npm,
which is shipped in Node.js by default.

Contributed by Maël Nison - https://github.com/nodejs/node/pull/39608

ICU updated:
ICU has been updated to 70.1. This updates timezone database to 2021a3,
including bringing forward the start for DST for Jordan from March to
February.

Contributed by Michaël Zasso - https://github.com/nodejs/node/pull/40658

New option to disable loading of native addons:
A new command line option `--no-addons` has been added to disallow
loading of native addons.

Contributed by Dominic Elm - https://github.com/nodejs/node/pull/39977

Updated Root Certificates:
Root certificates have been updated to those from Mozilla's Network
Security Services 3.71.

Contributed by Richard Lau - https://github.com/nodejs/node/pull/40280

Other Notable Changes:

crypto:
  * (SEMVER-MINOR) make FIPS related options always available (Vít Ondruch) https://github.com/nodejs/node/pull/36341
lib:
  * (SEMVER-MINOR) add unsubscribe method to non-active DC channels (simon-id) https://github.com/nodejs/node/pull/40433
  * (SEMVER-MINOR) add return value for DC channel.unsubscribe (simon-id) https://github.com/nodejs/node/pull/40433
module:
  * (SEMVER-MINOR) support pattern trailers (Guy Bedford) https://github.com/nodejs/node/pull/39635
src:
  * (SEMVER-MINOR) make napi_create_reference accept symbol (JckXia) https://github.com/nodejs/node/pull/39926

PR-URL: https://github.com/nodejs/node/pull/41696
2022-02-01 08:30:03 -05:00
Michaël Zasso
6ec2253926
lib: add fetch
Fixes: https://github.com/nodejs/node/issues/19393

PR-URL: https://github.com/nodejs/node/pull/41749
Refs: https://github.com/nodejs/undici/pull/1183
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2022-02-01 08:17:50 +00:00
Geoffrey Booth
15f1a45c5f
module: unflag esm json modules
PR-URL: https://github.com/nodejs/node/pull/41736
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2022-01-31 22:16:37 +00:00
Rich Trott
4fbe9e549c
doc: use Object.hasOwn() in util doc
Swtich from `hasOwnProperty()` to `Object.hasOwn()`.

PR-URL: https://github.com/nodejs/node/pull/41780
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-01-31 09:16:18 +00:00
Tobias Nießen
6b428e72f9
doc: remove section on "recent" ECDH changes
The ECDH API changes were made more than six years ago and this
section is not helpful for new applications. The behavior of the ECDH
APIs should be explained in the relevant sections, not in a note.

Refs: https://github.com/nodejs/node/pull/3511

PR-URL: https://github.com/nodejs/node/pull/41773
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-01-31 07:47:13 +00:00
Ben McCann
253f934462
doc: clarify that import also uses main
PR-URL: https://github.com/nodejs/node/pull/41720
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-01-30 14:26:22 +00:00
Tobias Hernstig
3dd3a3cc20
doc: update modules.md wording
PR-URL: https://github.com/nodejs/node/pull/41728
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-01-30 14:26:14 +00:00
Benjamin Gruenbaum
d2ac192351
stream: add reduce
PR-URL: https://github.com/nodejs/node/pull/41669
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-01-30 14:07:32 +00:00
Tobias Nießen
0172d1d48c
doc: avoid incomplete sentence in cluster docs
PR-URL: https://github.com/nodejs/node/pull/41701
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2022-01-28 16:55:03 +00:00
Harshil jain
a4183b666e
doc: improve docs to give descriptive info for the platform property
PR-URL: https://github.com/nodejs/node/pull/41650
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
2022-01-28 00:12:01 +00:00
Antoine du Hamel
40ef144b65
doc: fix link to npm documentation
The previous link led to an old page that does not document all the
`package.json` fields used by npm.

PR-URL: https://github.com/nodejs/node/pull/41712
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-27 23:35:23 +00:00
Benjamin Gruenbaum
830007dafd stream: add asIndexedPairs
Add the asIndexedPairs method for readable streams.

PR-URL: https://github.com/nodejs/node/pull/41681
Refs: https://github.com/tc39/proposal-iterator-helpers#asindexedpairs
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-01-27 13:04:49 +02:00
Rich Trott
c15639dbdc
doc: clarify treatment of non-string base in URL()
PR-URL: https://github.com/nodejs/node/pull/41685
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-01-27 05:45:53 +00:00
Tobias Nießen
6fc6ba74f5
doc: remove unadvisable cluster example
Applications should usually keep track of workers themselves to prevent
cross-referencing workers from different "groups" that are assigned to
separate tasks.

Additionally, it is unreasonable to assume that the 'data' event emitted
by a socket object will be an integer. While the example works when the
argument is a string (or Buffer), it can result in various issues (e.g.,
when id === '__proto__' since cluster.workers has a non-null prototype).

Refs: 5f08c3cfa1

PR-URL: https://github.com/nodejs/node/pull/41668
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
2022-01-25 19:36:51 +00:00
Michael Dawson
a2dead4171 doc: clarify parameter for napi_get_cb_info
Refs: https://github.com/nodejs/help/issues/3698

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/41635
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-01-25 11:39:23 -05:00
Rich Trott
6023bedc07
doc: revise url.resolve() text
PR-URL: https://github.com/nodejs/node/pull/41661
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
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>
2022-01-25 03:43:55 +00:00
Rich Trott
88a3bd5fcd
doc: clarify treatment of non-string argument to new URL()
Closes: https://github.com/nodejs/node/issues/41653

PR-URL: https://github.com/nodejs/node/pull/41658
Fixes: https://github.com/nodejs/node/issues/41653
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-01-25 02:04:22 +00:00
Antoine du Hamel
5d88f59fdb
doc: fix documentation for MODULE_NOT_FOUND and ERR_MODULE_NOT_FOUND
PR-URL: https://github.com/nodejs/node/pull/41645
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-24 21:59:26 +00:00
Darshan Sen
726711fe4e node-api: add node_api_symbol_for()
Fixes: https://github.com/nodejs/node/issues/41294

Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/41329
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-01-24 16:35:07 -05:00
Tobias Nießen
3657c14598
doc: improve TLS/SSL introduction
PR-URL: https://github.com/nodejs/node/pull/41649
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-01-24 19:50:37 +00:00
Benjamin Gruenbaum
a8afe26fca stream: add drop and take
This adds the `drop` and `take` methods to readable streams allowing
users easily drop and take items from the stream.

This continues the iterator-helper proposal alignment task.

Co-Authored-By: Robert Nagy <ronagy@icloud.com>
PR-URL: https://github.com/nodejs/node/pull/41630
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-01-23 18:43:16 +02:00
Tobias Nießen
0e6db9c3b0
doc: modernize and simplify cluster example
PR-URL: https://github.com/nodejs/node/pull/41626
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-23 12:14:11 +00:00
Benjamin Gruenbaum
ca489497be
stream: never flatten on toArray
PR-URL: https://github.com/nodejs/node/pull/41615
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-01-23 08:19:53 +00:00
Benjamin Gruenbaum
cc8931a916 stream: support flatMap
Support the `flatMap` method from the iterator helper TC39 proposal on
readable streams.

Co-Authored-By: Robert Nagy <ronagy@icloud.com>
PR-URL: https://github.com/nodejs/node/pull/41612
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-01-23 10:13:17 +02:00
Rich Trott
fbfb61a029
doc: simplify readline/stdin text
PR-URL: https://github.com/nodejs/node/pull/41583
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-01-23 03:21:17 +00:00
Tobias Nießen
312b0fc753
doc: suggest worker threads in cluster docs
The current documentation is incorrect in that it says "A single
instance of Node.js runs in a single thread," which is not true due
to the addition of worker threads.

This patch removes the incorrect statement and instead suggests that
applications consider using worker threads when process isolation is
not needed.

Refs: https://github.com/nodejs/node/pull/20876

PR-URL: https://github.com/nodejs/node/pull/41616
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-01-23 00:15:51 +00:00
Tobias Nießen
18365d8ee6 crypto: change default check(Host|Email) behavior
This changes the default behavior of the X509Certificate functions
checkHost and checkEmail to match the default behavior of OpenSSL's
X509_check_host and X509_check_email functions, respectively, which
is also what RFC 2818 mandates for HTTPS.

Refs: https://github.com/nodejs/node/pull/36804
Refs: https://github.com/nodejs/node/pull/41569

PR-URL: https://github.com/nodejs/node/pull/41600
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2022-01-22 18:36:47 +01:00
Tobias Nießen
5aa4010503 crypto: remove wildcard options for checkEmail
Wildcard options do not affect X509_check_email.

Refs: https://github.com/openssl/openssl/pull/17536
Refs: https://github.com/nodejs/node/pull/41571

PR-URL: https://github.com/nodejs/node/pull/41599
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2022-01-22 15:27:31 +01:00
LiviaMedeiros
b8de7aa4c2 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-01-22 15:20:40 +01:00
Ray
2f1700463b
readline: add feature yank and yank pop
1. `Ctrl-Y` to yank previously deleted text
2. `Meta-Y` to do yank pop (cycle among deleted texts)
3. Use `getCursorPos().rows` to check if we have reached a new line,
instead of `getCursorPos().cols === 0`.
4. document and unittests.

PR-URL: https://github.com/nodejs/node/pull/41301
Fixes: https://github.com/nodejs/node/issues/41252
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
2022-01-22 05:42:48 +00:00
Giora Guttsait
dbe60a2302
doc: improve 'hex' Buffer decoding description and examples
PR-URL: https://github.com/nodejs/node/pull/41598
Fixes: https://github.com/nodejs/node/issues/41594
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-01-22 00:55:24 +01:00
Gabriel Trujillo
806c7c13f3
doc: add note for handling signal events in trace events
Refs: https://github.com/nodejs/node/issues/14802

PR-URL: https://github.com/nodejs/node/pull/41438
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2022-01-21 23:53:43 +00:00
Benjamin Gruenbaum
830cbca810 doc: deprecate buffer.slice
PR-URL: https://github.com/nodejs/node/pull/41596
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-01-22 00:34:36 +01:00
Shalvah
087939471a
doc: demonstrate dangers of buffer.slice()
PR-URL: https://github.com/nodejs/node/pull/41628
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-01-21 15:38:51 +00:00
Tobias Nießen
74867f713a
doc: add missing word in cluster.workers details
PR-URL: https://github.com/nodejs/node/pull/41624
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-01-21 11:13:37 +00:00
Ray
271725a363
readline: undo previous edit when get key code 0x1F
1. Undo previous edit on keystroke `ctrl -` (emit 0x1F)
2. unittests
3. documentation

PR-URL: https://github.com/nodejs/node/pull/41392
Fixes: https://github.com/nodejs/node/issues/41308
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-01-21 10:24:06 +00:00
Benjamin Gruenbaum
5badf46f2a stream: support some and every
This continues on the iterator-helpers work by adding `.some` and
`.every` to readable streams.

Co-Authored-By: Robert Nagy <ronagy@icloud.com>
PR-URL: https://github.com/nodejs/node/pull/41573
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-01-21 12:10:17 +02:00
akhil marsonya
ef35175527
doc: fix async_hooks example in api docs
PR-URL: https://github.com/nodejs/node/pull/41609
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-01-21 02:37:21 +00:00
Tobias Nießen
716aefde41 doc: fix deprecated alias description in cluster
Refs: https://github.com/nodejs/node/pull/36478

PR-URL: https://github.com/nodejs/node/pull/41618
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-20 11:03:22 -08:00
Tobias Nießen
110aa38c9e doc: fix backticks around 'default'
Refs: https://github.com/nodejs/node/pull/41569

PR-URL: https://github.com/nodejs/node/pull/41613
Co-authored-by: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2022-01-20 15:06:58 +01:00
Alex Agranov
12608d3dbc doc: update timingSafeEqual error case
PR-URL: https://github.com/nodejs/node/pull/41507
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2022-01-20 10:55:48 +01:00
Benjamin Gruenbaum
5a407d606a stream: add toArray
Add the toArray method from the TC39 iterator helper proposal to
Readable streams. This also enables a common-use case of converting a
stream to an array.

Co-Authored-By: Robert Nagy <ronagy@icloud.com>
PR-URL: https://github.com/nodejs/node/pull/41553
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-01-20 11:24:29 +02:00
Rich Trott
8e413ff374
doc: simplify util.TextDecoder example
This simplifies the example and makes it runnable. (The current example
has a magic function.) (This also removes an assignment in a condition
which will be flagged if we enable ESLint's no-cond-assign rule.)

PR-URL: https://github.com/nodejs/node/pull/41574
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-20 05:12:39 +00:00
Tobias Nießen
6d666491ce crypto: remove checkIP options argument
None of the supported options have any effect on X509_check_ip_asc.

Refs: https://github.com/openssl/openssl/pull/17536

PR-URL: https://github.com/nodejs/node/pull/41571
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-19 19:10:18 +01:00
Job
d8f6b383f6 doc: fix cjs example code for process.arch
PR-URL: https://github.com/nodejs/node/pull/41593
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-01-19 16:57:13 +01:00
Tobias Nießen
da1b59fc13 crypto: support RFC 2818 compatible checkHost
The 'subject' option should not only accept the values 'always' and
'never' because neither is compatible with RFC 2818, i.e., HTTPS. This
change adds a third value 'default', which implies the behavior that
HTTPS mandates.

The new 'default' case matches the default behavior of OpenSSL for both
DNS names and email addresses.

Future Node.js versions should change the default option value from
'always' to 'default'.

Refs: https://github.com/nodejs/node/pull/36804

PR-URL: https://github.com/nodejs/node/pull/41569
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-01-19 16:05:32 +01:00
Giora Guttsait
119519e1da
doc: remove redunant await calls from stream docs
PR-URL: https://github.com/nodejs/node/pull/41592
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-01-19 14:22:43 +00:00
Antoine du Hamel
56679eb530
doc: recommend package exports instead of requiring folders
PR-URL: https://github.com/nodejs/node/pull/41381
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2022-01-18 18:13:44 +00:00
Rich Trott
7a07df4329
doc: edit async_context context loss text
Make the text more concise and clear.

PR-URL: https://github.com/nodejs/node/pull/41550
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-01-18 18:13:34 +00:00
Mestery
8ed577aae7
doc,readline: add missing node protocol in example
PR-URL: https://github.com/nodejs/node/pull/41560
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-01-18 18:04:09 +00:00
Tobias Nießen
98659c04d5 doc: use sentence case for Web Crypto headers
Refs: https://github.com/nodejs/node/pull/33889

PR-URL: https://github.com/nodejs/node/pull/41577
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-01-18 19:00:29 +01:00
Michaël Zasso
325b9473c0
2022-01-18, Version 17.4.0 (Current)
Notable changes:

child_process:
  * (SEMVER-MINOR) add support for URL to `cp.fork` (Antoine du Hamel) https://github.com/nodejs/node/pull/41225
crypto:
  * (SEMVER-MINOR) alias webcrypto.subtle and webcrypto.getRandomValues on crypto (James M Snell) https://github.com/nodejs/node/pull/41266
doc:
  * add Mesteery to collaborators (Mestery) https://github.com/nodejs/node/pull/41543
events:
  * (SEMVER-MINOR) graduate capturerejections to supported (James M Snell) https://github.com/nodejs/node/pull/41267
  * (SEMVER-MINOR) add EventEmitterAsyncResource to core (James M Snell) https://github.com/nodejs/node/pull/41246
loader:
  * (SEMVER-MINOR) return package format from defaultResolve if known (Gabriel Bota) https://github.com/nodejs/node/pull/40980
perf_hooks:
  * (SEMVER-MINOR) multiple fixes for Histogram (James M Snell) https://github.com/nodejs/node/pull/41153
stream:
  * (SEMVER-MINOR) add filter method to readable (Benjamin Gruenbaum, Robert Nagy) https://github.com/nodejs/node/pull/41354
  * (SEMVER-MINOR) add isReadable helper (Robert Nagy) https://github.com/nodejs/node/pull/41199
  * (SEMVER-MINOR) add map method to Readable (Benjamin Gruenbaum, Robert Nagy) https://github.com/nodejs/node/pull/40815

PR-URL: https://github.com/nodejs/node/pull/41557
2022-01-18 16:03:23 +01:00
Tobias Nießen
eceb2e75d8 doc: make Web Crypto example spec compliant
subtle.sign is not supposed to support strings, and in most Web Crypto
implementations, it does not. Passing a string as the 'data' argument
only works in Node.js, and users should not rely on that oddity. The
Web Crypto spec requires the data argument to be a BufferSource, i.e.,
an ArrayBuffer or an ArrayBufferView.

PR-URL: https://github.com/nodejs/node/pull/41556
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-01-18 15:15:47 +01:00
Tobias Nießen
c4f5a4939a doc: do not reference SSL when discussing SNI
Co-authored-by: Rich Trott <rtrott@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/41549
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-01-18 13:44:38 +01:00
Yu
f458f1b93b
doc: fix typos in esm.md
PR-URL: https://github.com/nodejs/node/pull/41499
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
2022-01-17 16:54:10 +00:00
Rich Trott
8cba65f61a
doc: adjust assignment in condition in stream doc
This is part of an effort to get our code to comply with ESLint
no-cond-assign so that we don't have to disable that rule in our config.

PR-URL: https://github.com/nodejs/node/pull/41510
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-01-17 16:54:01 +00:00
Tobias Nießen
d0d8320de7 doc: improve Web Crypto headings related to ECC
PR-URL: https://github.com/nodejs/node/pull/41542
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2022-01-17 17:40:35 +01:00
Benjamin Gruenbaum
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
Antoine du Hamel
87325917ec
doc: clarify module system selection
Refs: https://github.com/nodejs/node/pull/41345#discussion_r777115823

PR-URL: https://github.com/nodejs/node/pull/41383
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2022-01-17 11:36:19 +01:00
Tobias Nießen
986cf3b986 doc: remove statement about (EC)DHE performance
This statement is misleading in that it says "key generation is
expensive". ECDHE key generation (over the elliptic curves that are
commonly used for TLS) is insanely fast compared to most other types
of key generation.

This statement is irrelevant for TLS 1.3, which requires (EC)DHE.

Even if this statement is somewhat true for TLS 1.2, it does not
justify discouraging the use of (EC)DHE.

PR-URL: https://github.com/nodejs/node/pull/41528
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-01-16 18:36:12 +01:00
Tobias Nießen
b2edcfee46 doc: remove statement about client private keys
This statement was objectively false. Clients usually only need to
generate and/or own a private key if the server sends a
CertificateRequest during the TLS handshake, which is not a common case.

PR-URL: https://github.com/nodejs/node/pull/41505
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2022-01-16 03:57:40 +01: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
Rich Trott
08fc4b5d7e
doc: add missing word in readable.read() text
This adds a missing _is_ in the readable.read() text and makes
small style adjustments.

PR-URL: https://github.com/nodejs/node/pull/41524
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-01-14 17:42:38 +00:00
Antoine du Hamel
18b833455c
doc: add missing YAML tag in esm.md
Refs: https://github.com/nodejs/node/pull/41434

PR-URL: https://github.com/nodejs/node/pull/41516
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-01-14 16:56:47 +00:00
cjihrig
91b9052c4e
doc: expand fs.access() mode parameter docs
This commit expands the documentation for the mode parameter
passed to the fs.access() family of functions.

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:57 -05:00
Tobias Nießen
df507758e6 doc: correct checkHost behavior with wildcards etc
The current documentation is inaccurate in that checkHost does not
necessarily return the given host name, but instead returns the subject
name that matched the given host name.

Refs: https://github.com/nodejs/node/pull/36804

PR-URL: https://github.com/nodejs/node/pull/41468
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2022-01-14 03:41:03 +01:00
Tobias Nießen
5d838d3f34 doc: remove extraneous colon in legacy subject
PR-URL: https://github.com/nodejs/node/pull/41477
Refs: https://github.com/nodejs/node/pull/24358
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-13 17:28:12 +01:00
Rich Trott
25d0fbf12e
doc: remove SameValue comparison reference
Referring to `Object.is()` will be more clear and direct. The
`Object.is()` reference in turn refers to `SameValue` so people can dig
deeper there if they want or need to.

PR-URL: https://github.com/nodejs/node/pull/41460
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2022-01-13 06:17:05 +00: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
Beth Griggs
c4194c0dce
2022-01-10, Version 17.3.1 (Current)
This is a security release.

Notable changes:

Improper handling of URI Subject Alternative Names (Medium)(CVE-2021-44531)
- Accepting arbitrary Subject Alternative Name (SAN) types, unless a PKI
is specifically defined to use a particular SAN type, can result in
bypassing name-constrained intermediates. Node.js was accepting URI SAN
types, which PKIs are often not defined to use. Additionally, when a
protocol allows URI SANs, Node.js did not match the URI correctly.
- Versions of Node.js with the fix for this disable the URI SAN type when
checking a certificate against a hostname. This behavior can be
reverted through the `--security-revert` command-line option.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531

Certificate Verification Bypass via String Injection (Medium)(CVE-2021-44532)
- Node.js converts SANs (Subject Alternative Names) to a string format.
It uses this string to check peer certificates against hostnames when
validating connections. The string format was subject to an injection
vulnerability when name constraints were used within a certificate
chain, allowing the bypass of these name constraints.
- Versions of Node.js with the fix for this escape SANs containing the
problematic characters in order to prevent the injection. This
behavior can be reverted through the `--security-revert` command-line
option.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532

Incorrect handling of certificate subject and issuer fields (Medium)(CVE-2021-44533)
- Node.js did not handle multi-value Relative Distinguished Names
correctly. Attackers could craft certificate subjects containing a
single-value Relative Distinguished Name that would be interpreted as a
multi-value Relative Distinguished Name, for example, in order to inject
a Common Name that would allow bypassing the certificate subject
verification.
- Affected versions of Node.js do not accept multi-value Relative
Distinguished Names and are thus not vulnerable to such attacks
themselves. However, third-party code that uses node's ambiguous
presentation of certificate subjects may be vulnerable.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44533

Prototype pollution via `console.table` properties (Low)(CVE-2022-21824)
- Due to the formatting logic of the `console.table()` function it was
not safe to allow user controlled input to be passed to the `properties`
parameter while simultaneously passing a plain object with at least one
property as the first parameter, which could be `__proto__`. The
prototype pollution has very limited control, in that it only allows an
empty string to be assigned numerical keys of the object prototype.
- Versions of Node.js with the fix for this use a null protoype for the
object these properties are being assigned to.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-21824

PR-URL: https://github.com/nodejs-private/node-private/pull/311
2022-01-10 23:49:27 +00:00
Danielle Adams
f99a2c275d
2022-01-10, Version 16.13.2 'Gallium' (LTS)
This is a security release.

Notable changes:

Improper handling of URI Subject Alternative Names (Medium)(CVE-2021-44531)
- Accepting arbitrary Subject Alternative Name (SAN) types, unless a PKI
is specifically defined to use a particular SAN type, can result in
bypassing name-constrained intermediates. Node.js was accepting URI SAN
types, which PKIs are often not defined to use. Additionally, when a
protocol allows URI SANs, Node.js did not match the URI correctly.
- Versions of Node.js with the fix for this disable the URI SAN type when
checking a certificate against a hostname. This behavior can be
reverted through the `--security-revert` command-line option.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531

Certificate Verification Bypass via String Injection (Medium)(CVE-2021-44532)
- Node.js converts SANs (Subject Alternative Names) to a string format.
It uses this string to check peer certificates against hostnames when
validating connections. The string format was subject to an injection
vulnerability when name constraints were used within a certificate
chain, allowing the bypass of these name constraints.
- Versions of Node.js with the fix for this escape SANs containing the
problematic characters in order to prevent the injection. This
behavior can be reverted through the `--security-revert` command-line
option.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532

Incorrect handling of certificate subject and issuer fields (Medium)(CVE-2021-44533)
- Node.js did not handle multi-value Relative Distinguished Names
correctly. Attackers could craft certificate subjects containing a
single-value Relative Distinguished Name that would be interpreted as a
multi-value Relative Distinguished Name, for example, in order to inject
a Common Name that would allow bypassing the certificate subject
verification.
- Affected versions of Node.js do not accept multi-value Relative
Distinguished Names and are thus not vulnerable to such attacks
themselves. However, third-party code that uses node's ambiguous
presentation of certificate subjects may be vulnerable.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44533

Prototype pollution via `console.table` properties (Low)(CVE-2022-21824)
- Due to the formatting logic of the `console.table()` function it was
not safe to allow user controlled input to be passed to the `properties`
parameter while simultaneously passing a plain object with at least one
property as the first parameter, which could be `__proto__`. The
prototype pollution has very limited control, in that it only allows an
empty string to be assigned numerical keys of the object prototype.
- Versions of Node.js with the fix for this use a null protoype for the
object these properties are being assigned to.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-21824

PR-URL: https://github.com/nodejs-private/node-private/pull/312
2022-01-10 18:36:11 -05:00
Richard Lau
af829837bc
2022-01-10, Version 14.18.3 'Fermium' (LTS)
This is a security release.

Notable changes:

Improper handling of URI Subject Alternative Names (Medium)(CVE-2021-44531)
- Accepting arbitrary Subject Alternative Name (SAN) types, unless a PKI
is specifically defined to use a particular SAN type, can result in
bypassing name-constrained intermediates. Node.js was accepting URI SAN
types, which PKIs are often not defined to use. Additionally, when a
protocol allows URI SANs, Node.js did not match the URI correctly.
- Versions of Node.js with the fix for this disable the URI SAN type when
checking a certificate against a hostname. This behavior can be
reverted through the `--security-revert` command-line option.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531

Certificate Verification Bypass via String Injection (Medium)(CVE-2021-44532)
- Node.js converts SANs (Subject Alternative Names) to a string format.
It uses this string to check peer certificates against hostnames when
validating connections. The string format was subject to an injection
vulnerability when name constraints were used within a certificate
chain, allowing the bypass of these name constraints.
- Versions of Node.js with the fix for this escape SANs containing the
problematic characters in order to prevent the injection. This
behavior can be reverted through the `--security-revert` command-line
option.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532

Incorrect handling of certificate subject and issuer fields (Medium)(CVE-2021-44533)
- Node.js did not handle multi-value Relative Distinguished Names
correctly. Attackers could craft certificate subjects containing a
single-value Relative Distinguished Name that would be interpreted as a
multi-value Relative Distinguished Name, for example, in order to inject
a Common Name that would allow bypassing the certificate subject
verification.
- Affected versions of Node.js do not accept multi-value Relative
Distinguished Names and are thus not vulnerable to such attacks
themselves. However, third-party code that uses node's ambiguous
presentation of certificate subjects may be vulnerable.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44533

Prototype pollution via `console.table` properties (Low)(CVE-2022-21824)
- Due to the formatting logic of the `console.table()` function it was
not safe to allow user controlled input to be passed to the `properties`
parameter while simultaneously passing a plain object with at least one
property as the first parameter, which could be `__proto__`. The
prototype pollution has very limited control, in that it only allows an
empty string to be assigned numerical keys of the object prototype.
- Versions of Node.js with the fix for this use a null protoype for the
object these properties are being assigned to.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-21824

PR-URL: https://github.com/nodejs-private/node-private/pull/310
2022-01-10 23:06:10 +00:00
Richard Lau
92e1abd541
2022-01-10, Version 12.22.9 'Erbium' (LTS)
This is a security release.

Notable changes:

Improper handling of URI Subject Alternative Names (Medium)(CVE-2021-44531)
- Accepting arbitrary Subject Alternative Name (SAN) types, unless a PKI
is specifically defined to use a particular SAN type, can result in
bypassing name-constrained intermediates. Node.js was accepting URI SAN
types, which PKIs are often not defined to use. Additionally, when a
protocol allows URI SANs, Node.js did not match the URI correctly.
- Versions of Node.js with the fix for this disable the URI SAN type when
checking a certificate against a hostname. This behavior can be
reverted through the `--security-revert` command-line option.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531

Certificate Verification Bypass via String Injection (Medium)(CVE-2021-44532)
- Node.js converts SANs (Subject Alternative Names) to a string format.
It uses this string to check peer certificates against hostnames when
validating connections. The string format was subject to an injection
vulnerability when name constraints were used within a certificate
chain, allowing the bypass of these name constraints.
- Versions of Node.js with the fix for this escape SANs containing the
problematic characters in order to prevent the injection. This
behavior can be reverted through the `--security-revert` command-line
option.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532

Incorrect handling of certificate subject and issuer fields (Medium)(CVE-2021-44533)
- Node.js did not handle multi-value Relative Distinguished Names
correctly. Attackers could craft certificate subjects containing a
single-value Relative Distinguished Name that would be interpreted as a
multi-value Relative Distinguished Name, for example, in order to inject
a Common Name that would allow bypassing the certificate subject
verification.
- Affected versions of Node.js do not accept multi-value Relative
Distinguished Names and are thus not vulnerable to such attacks
themselves. However, third-party code that uses node's ambiguous
presentation of certificate subjects may be vulnerable.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44533

Prototype pollution via `console.table` properties (Low)(CVE-2022-21824)
- Due to the formatting logic of the `console.table()` function it was
not safe to allow user controlled input to be passed to the `properties`
parameter while simultaneously passing a plain object with at least one
property as the first parameter, which could be `__proto__`. The
prototype pollution has very limited control, in that it only allows an
empty string to be assigned numerical keys of the object prototype.
- Versions of Node.js with the fix for this use a null protoype for the
object these properties are being assigned to.
- More details will be available at
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-21824

PR-URL: https://github.com/nodejs-private/node-private/pull/309
2022-01-10 22:49:12 +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
David Sanders
e667faf49d
doc: update output in inspector examples
PR-URL: https://github.com/nodejs/node/pull/41390
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-01-10 10:15:23 +00:00
Antoine du Hamel
f65bbce90b
doc: add note regarding unfinished TLA
PR-URL: https://github.com/nodejs/node/pull/41434
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-10 10:13:35 +00:00
Rich Trott
133ad76d0a
doc: add reference for === operator in assert.md
PR-URL: https://github.com/nodejs/node/pull/41442
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-10 10:13:23 +00:00
Antoine du Hamel
7edb50dec7
doc: clarify uncaughtException origin for ESM
Fixes: https://github.com/nodejs/node/issues/41328

PR-URL: https://github.com/nodejs/node/pull/41339
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2022-01-09 11:42:38 +00:00
Rich Trott
1548578931
doc: revise HTTPRequestOptions text
PR-URL: https://github.com/nodejs/node/pull/41407
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-01-08 05:31:40 +00:00
Rich Trott
1744836d9c
doc: add reference for == and != operators
Refs: https://github.com/nodejs/node/pull/41375#issuecomment-1003763712

PR-URL: https://github.com/nodejs/node/pull/41413
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-01-08 04:00:55 +00:00
Rich Trott
51a28c0195
doc: update Abstract Equality Comparison text in assert.md
* Remove link to ECMAScript specification because the term Abstract
  Equality Comparison is no longer used there.
* Edit surprising-results material
* Other minor edits

PR-URL: https://github.com/nodejs/node/pull/41375
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-05 20:35:02 +00:00
Antoine du Hamel
090cdb66c0
doc: document that require.main may be undefined
PR-URL: https://github.com/nodejs/node/pull/41384
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2022-01-05 10:05:25 +00:00
Antoine du Hamel
b4908054d0
doc: clarify entry point behavior when using loader hooks
Fixes: https://github.com/nodejs/node/issues/41275

PR-URL: https://github.com/nodejs/node/pull/41304
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-05 10:54:13 +01:00
Antoine du Hamel
f1658bdc8f
doc: clarify require behavior with non .js extensions
Refs: https://github.com/nodejs/node/discussions/41333

PR-URL: https://github.com/nodejs/node/pull/41345
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
2022-01-02 18:20:02 +01:00
Benjamin Gruenbaum
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
231ec0adf2 doc: revise frozen-intrinsics text
PR-URL: https://github.com/nodejs/node/pull/41342
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-01 22:19:44 -08:00
Dmitry Petrov
dae64a98da
doc: fix example description for worker_threads
PR-URL: https://github.com/nodejs/node/pull/41341
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2021-12-31 00:16:14 +00: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
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
Eric Jacobson
d34fcb68c9
doc: fix sync comment in observer snippet
PR-URL: https://github.com/nodejs/node/pull/41262
Refs: https://github.com/nodejs/node/issues/41259
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2021-12-27 17:08:46 +00:00
James M Snell
353532b9c3
crypto: alias webcrypto.subtle and webcrypto.getRandomValues on crypto
The aliases allow code written to assume that `crypto.subtle` and
`crypto.getRandomValues()` exist on the `crypto` global to just work.

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/41266
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-12-27 14:48:59 +00:00
James M Snell
9a85efaa7f
events: graduate capturerejections to supported
These have been around long enough to warrant graduation.

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/41267
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-12-27 14:14:35 +00:00
Rich Trott
61e60a5e88 doc: remove legacy in-page links in v8.md
Use autogenerated id attributes.

PR-URL: https://github.com/nodejs/node/pull/41291
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-12-25 05:59:32 +00:00
James M Snell
ce4d3adf50
worker: expose BroadcastChannel as a global
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/41271
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-12-24 08:32:48 -08:00
James M Snell
6486a304d3
worker: graduate BroadcastChannel to supported
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/41271
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-12-24 08:32:46 -08:00
Marcos Bérgamo
1e349699c1
doc: include stack trace difference in ES modules
This change highlights in the docs difference between stack traces for
CommonJS modules and ES Modules.

Fixes: https://github.com/nodejs/node/issues/39787

PR-URL: https://github.com/nodejs/node/pull/41157
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-12-24 07:34:33 -08:00
James M Snell
cea76dbf33
buffer: expose Blob as a global
`Blob` is defined as a global in the spec. We have WPT's for it,
and it's graduated experimental. Time to expose it as a global.

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/41270
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2021-12-24 07:26:38 -08:00
James M Snell
99c18f4786
buffer: graduate Blob from experimental
It's time.

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/41270
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2021-12-24 07:26:25 -08:00
Michael Dawson
6ce085c99b doc: fix example in node-api docs
Fixes: https://github.com/nodejs/node/issues/39564

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/41264
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2021-12-23 13:31:54 -05: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
Rafael Gonzaga
5016181697
doc: add usage recommendation for writable._destroy
PR-URL: https://github.com/nodejs/node/pull/41040
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-12-22 16:51:16 +00:00
Rich Trott
2bc1d9245b
doc: make function signature comply with JSDoc comment
PR-URL: https://github.com/nodejs/node/pull/41242
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2021-12-21 06:41:41 +00:00
Gil Pedersen
0fcae7ba16
doc: align maxHeaderSize default with current value
PR-URL: https://github.com/nodejs/node/pull/41183
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-12-19 22:48:05 +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
James M Snell
23637e9a3b
perf_hooks: multiple fixes for Histogram
* The createHistogram(options) options weren't actually implemented
* Add a new count property that tracks the number of samples
* Adds BigInt options for relevant properties
* Adds add(other) method for RecordableHistogram
* Cleans up and expands tests
* Eliminates unnecessary ELDHistogram native class
* Improve/Simplify histogram transfer impl

Signed-off-by: James M Snell <jasnell@gmail.com>

perf_hooks: simplify Histogram constructor options

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/41153
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-12-19 09:56:36 -08:00
Colin Ihrig
a33521bc51
doc: add unhandledRejection to strict mode
`lib/internal/process/promises.js` contains the following comment
about --unhandled-rejections=strict. This commit updates the
docs to reflect this:

// --unhandled-rejections=strict:
// Emit 'uncaughtException'. If it's not handled, print
// the error to stderr and exit the process.
// Otherwise, emit 'unhandledRejection'. If
// 'unhandledRejection' is not
// handled, emit 'UnhandledPromiseRejectionWarning'.

Fixes: https://github.com/nodejs/node/issues/41184

PR-URL: https://github.com/nodejs/node/pull/41194
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-12-19 15:29:06 +00:00
Danielle Adams
aeb9c0e1ed
2021-12-17, Version 17.3.0 (Current)
OpenSSL-3.0.1:

OpenSSL-3.0.1 contains a fix for CVE-2021-4044: Invalid handling of X509_verify_cert() internal errors
in libssl (Moderate). This is a vulnerability in OpenSSL that may be exploited through Node.js.
More information can be read here: https://www.openssl.org/news/secadv/20211214.txt.

Contributed by Richard Lau https://github.com/nodejs/node/pull/41177

Other Notable Changes:

* lib:
    * make AbortSignal cloneable/transferable (James M Snell) https://github.com/nodejs/node/pull/41050
* deps:
    * upgrade npm to 8.3.0 (npm team) https://github.com/nodejs/node/pull/41127
* doc:
    * add @bnb as a collaborator (Tierney Cyren) https://github.com/nodejs/node/pull/41100
* process:
    * add `getActiveResourcesInfo()` (Darshan Sen) https://github.com/nodejs/node/pull/40813
* timers:
    * add experimental scheduler api (James M Snell) https://github.com/nodejs/node/pull/40909

PR-URL: https://github.com/nodejs/node/pull/41167
2021-12-17 18:13:50 -05:00
Mateusz Burzyński
e64f432c0d
doc: fix syntax error in nested conditions example
PR-URL: https://github.com/nodejs/node/pull/41205
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
2021-12-17 17:35:09 +00:00
Robert Nagy
752d75d8bc stream: add isErrored helper
Refs: https://github.com/nodejs/undici/pull/1134

PR-URL: https://github.com/nodejs/node/pull/41121
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2021-12-16 14:28:31 +01:00
AlphaDio
7f6243efd5
doc: fix closing parenthesis
PR-URL: https://github.com/nodejs/node/pull/41190
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2021-12-16 06:52:52 +00:00
Qingyu Deng
ea977fca14
doc: align module resolve algorithm with implementation
Fixes: https://github.com/nodejs/node/issues/38128

PR-URL: https://github.com/nodejs/node/pull/38837
Reviewed-By: Guy Bedford <guybedford@gmail.com>
2021-12-14 19:51:24 +01:00
Darshan Sen
0d9f3bd9e8
process: add getActiveResourcesInfo()
This is supposed to be a public alternative of the private APIs,
`process._getActiveResources()` and `process._getActiveHandles()`. When
called, it returns an array of strings containing the types of the
active resources that are currently keeping the event loop alive.

Signed-off-by: Darshan Sen <darshan.sen@postman.com>

PR-URL: https://github.com/nodejs/node/pull/40813
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-12-14 14:09:08 +00:00
Antoine du Hamel
e5c1fd7a2a
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>
2021-12-13 14:45:09 +00:00
Ruben Bridgewater
4569674e39
util: pass through the inspect function to custom inspect functions
This allows to use more portable custom inspect functions.

Fixes: https://github.com/nodejs/node/issues/35956

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/41019
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-12-11 11:49:45 +00:00
James M Snell
3f72c72bbb
lib: add abortSignal.throwIfAborted()
Refs: https://github.com/whatwg/dom/pull/1034
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/40951
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-12-10 07:51:41 -08:00
Rich Trott
8aa3ce8b59 doc,lib,tools: align multiline comments
These changes are in preparation for enabling a JSDoc lint rule.

PR-URL: https://github.com/nodejs/node/pull/41109
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-12-09 08:31:35 -08:00