Commit Graph

6781 Commits

Author SHA1 Message Date
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
notroid5
3d5a7de83c
doc: clarify escaping for ES modules
This should make it clear(er) how to escape special characters like `#`
and `?`.

Ref: https://github.com/nodejs/node/issues/41052

PR-URL: https://github.com/nodejs/node/pull/41074
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-12-07 11:45:04 +00:00
James M Snell
8bce46aff1
timers: add experimental scheduler api
Adds experimental implementations of the yield and wait APIs being
explored at https://github.com/WICG/scheduling-apis.

When I asked the WHATWG folks about the possibility of standardizing the
[awaitable versions of setTimeout/setImmediate](https://github.com/whatwg/html/issues/7340)
that we have implemented in `timers/promises`, they pointed at the work
in progress scheduling APIs draft as they direction they'll be going.
While there is definitely a few thing in that draft that have
questionable utility to Node.js, the yield and wait APIs map cleanly to
the setImmediate and setTimeout we already have.

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

PR-URL: https://github.com/nodejs/node/pull/40909
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-12-05 07:36:50 -08:00
Henadzi
069d2bd250 doc: add explicit declaration of fd with null val
In example of implementing a writable stream with extending on
Writable add explicit declaration of 'fd' (file descriptor)
variable with null value.
It will make this example more similar to readable stream's one.
And will make it easier to figure out in topic.

PR-URL: https://github.com/nodejs/node/pull/40704
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-12-04 17:29:21 +01:00
Michael Dawson
ea65e1f6bb node-api,doc: document parms which can be optional
Fixes: https://github.com/nodejs/abi-stable-node/issues/252

I've been through the Node-api methods and I believe
this is the last places where optional parameters
were not documented.

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

PR-URL: https://github.com/nodejs/node/pull/41021
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-12-03 16:19:00 -05:00
Ruben Bridgewater
85764c0e1a
util: add numericSeparator to util.inspect
This adds the `numericSeparator` option to util.inspect. Using it
separates numbers by thousands adding the underscore accordingly.

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

PR-URL: https://github.com/nodejs/node/pull/41003
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-12-03 14:56:43 +00:00
Rich Trott
97b8eb62fe
doc: expand entries for isIP(), isIPv4(), and isIPv6()
Closes: https://github.com/nodejs/node/issues/40966

PR-URL: https://github.com/nodejs/node/pull/41028
Fixes: https://github.com/nodejs/node/issues/40966
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2021-12-02 21:22:48 +00:00
Ruben Bridgewater
dab8ab2837
assert,util: compare RegExp.lastIndex while using deep equal checks
Compare the `lastIndex` property of regular expressions next to the
flags and source property.

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

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

PR-URL: https://github.com/nodejs/node/pull/41020
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2021-12-02 08:01:40 +00:00
James M Snell
722f113e0d
lib: add AbortSignal.timeout
Refs: https://github.com/whatwg/dom/pull/1032
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/40899
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-12-01 16:26:24 -08:00
Luigi Pinca
255b1db932
doc: specify that message.socket can be nulled
The `socket` property of the `IncomingMessage` object is nulled on the
server after calling `message.destroy()` and on the client after a
request completes and the socket is kept alive.

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

PR-URL: https://github.com/nodejs/node/pull/41014
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2021-12-01 19:47:20 +00:00
Michaël Zasso
79731df608
2021-11-30, Version 17.2.0 (Current)
Notable changes:

async_hooks:
  * (SEMVER-MINOR) expose async_wrap providers (Rafael Gonzaga) https://github.com/nodejs/node/pull/40760
deps:
  * (SEMVER-MINOR) update V8 to 9.6.180.14 (Michaël Zasso) https://github.com/nodejs/node/pull/40488
lib:
  * (SEMVER-MINOR) add reason to AbortSignal (James M Snell) https://github.com/nodejs/node/pull/40807
src:
  * (SEMVER-MINOR) add x509.fingerprint512 to crypto module (3nprob) https://github.com/nodejs/node/pull/39809
stream:
  * deprecate thenable support (Antoine du Hamel) https://github.com/nodejs/node/pull/40860
  * fix finished regression when working with legacy Stream (Matteo Collina) https://github.com/nodejs/node/pull/40858

PR-URL: https://github.com/nodejs/node/pull/40983
2021-11-30 18:45:03 +01:00
Bradley Farias
1998e83983 esm: working mock test
PR-URL: https://github.com/nodejs/node/pull/39240
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2021-11-29 14:54:01 -06:00
Mestery
005e933ff4
doc: fix JSDoc in ESM loaders examples
PR-URL: https://github.com/nodejs/node/pull/40984
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-29 17:28:34 +00:00
Rich Trott
43e1278014
doc: add information on suppressing initial break in debugger
Closes: https://github.com/nodejs/node/issues/40857

PR-URL: https://github.com/nodejs/node/pull/40960
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-26 08:58:39 +00:00
Tobias Nießen
230bce8e86
doc: improve grammar in API description
PR-URL: https://github.com/nodejs/node/pull/40959
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-26 08:58:32 +00:00
Antoine du Hamel
1cea3918af
stream: deprecate thenable support
Deprecate support for returning thenables in stream
implementation methods. This is causing more confusion
and issues than it's worth, and never was documented.

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

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/40860
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-26 08:58:24 +00:00
FrankQiu
24292b46ba
doc: remove experimental abortcontroller flag
PR-URL: https://github.com/nodejs/node/pull/38968
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-11-25 11:59:47 -08:00
Geoffrey Booth
6dfbf04474 module: import assertions improvements
PR-URL: https://github.com/nodejs/node/pull/40785
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-11-24 15:50:05 +00:00
Geoffrey Booth
616a574e8f doc: fix spelling of 'WebAssembly'
PR-URL: https://github.com/nodejs/node/pull/40785
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-11-24 15:50:04 +00:00
James M Snell
7633c86eeb
lib: add reason to AbortSignal
A new reason property was recently added to the AbortSignal spec.

```js
const ac = new AbortController();
ac.abort(new Error('boom!'));
console.loc(ac.signal.reason);  // Error('boom!');
```

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

PR-URL: https://github.com/nodejs/node/pull/40807
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2021-11-24 06:46:43 -08:00
Michael Dawson
0b4d06657b doc: clarify more optional parameters in node-api
Refs: https://github.com/nodejs/abi-stable-node/issues/252

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

PR-URL: https://github.com/nodejs/node/pull/40888
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-11-22 16:08:41 -05:00
Guy Bedford
e31d1cb55d doc: define "types", "deno" community conditions
PR-URL: https://github.com/nodejs/node/pull/40708
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-11-20 16:41:06 -08:00
Michael Dawson
a37b9c80ef doc: document optional params in napi_get_cb_info
Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/40821
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-11-19 16:46:21 -05:00
Robert Nagy
340b770d3f stream: unify writableErrored and readableErrored
Both of these should always refer to the same error, hence
there is no reason to separate them.

PR-URL: https://github.com/nodejs/node/pull/40799
Refs: https://github.com/nodejs/node/pull/40696
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-18 14:31:43 +01:00
Robert Nagy
415726b8c4 stream: add writableAborted
PR-URL: https://github.com/nodejs/node/pull/40802
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-11-18 07:40:13 +01:00
Luigi Pinca
aa394ab5b9 doc: fix added: info for Readable.fromWeb()
`stream.Readable.fromWeb()` was added to Node.js v17.0.0 via a99c230305.

PR-URL: https://github.com/nodejs/node/pull/40820
Refs: https://github.com/nodejs/node/issues/40818
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-11-18 07:19:30 +01:00
Idan Attias
4265f2769b src,doc: add SyntaxError napi support
Add `napi_create_syntax_error` and `napi_throw_syntax_error`.

Fixes: https://github.com/nodejs/node-addon-api/issues/1099

PR-URL: https://github.com/nodejs/node/pull/40736
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-11-16 16:30:45 -05:00
Robert Nagy
f2170253b6 stream: add errored and closed props
PR-URL: https://github.com/nodejs/node/pull/40696
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-13 11:19:32 +02:00
Rafael Gonzaga
d10085bcb1
async_hooks: expose async_wrap providers
docs: add asyncWrapProviders api doc

tests(async_hooks): use internalBinding for comparisson

fix(test-async-wrap): lint error

docs: use REPLACEME for asyncWrapProviders

update: use freeze and copy for asyncWrapProviders

update(async_hooks): use primordials on asyncWrapProviders

fix: use common to expect error

docs(asyncWrapProviders): rephrase return type

fix: lint md

fix: lint md

docs(async_hooks): typo

Co-authored-by: Stephen Belanger <admin@stephenbelanger.com>

update(asyncWrapProviders): add __proto__ as null

Co-authored-by: Simone Busoli <simone.busoli@gmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>

test: adjust __proto__ assertion

docs: add DEP0111 link

PR-URL: https://github.com/nodejs/node/pull/40760
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2021-11-12 21:48:34 +00:00
Evan Lucas
2d005bb961 doc: fix transform stream example
There was a missing callback in the Transform#flush example
implementation.

PR-URL: https://github.com/nodejs/node/pull/40777
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-11-11 16:34:27 -08:00
voltrexmaster
4d414274c8 doc: fix linter-enforced formatting in crypto.md
The markdown-linter (lint-md) is failing because of a missing newline
caused by 79d681501d.

PR-URL: https://github.com/nodejs/node/pull/40780
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-11-10 11:02:08 -08:00
3nprob
79d681501d src: add x509.fingerprint512 to crypto module
PR-URL: https://github.com/nodejs/node/pull/39809
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-10 15:26:28 +01:00
Michaël Zasso
b022d19272
2021-11-09, Version 17.1.0 (Current)
Notable changes:

doc:
  * add VoltrexMaster to collaborators (voltrexmaster) https://github.com/nodejs/node/pull/40566
esm:
  * (SEMVER-MINOR) add support for JSON import assertion (Antoine du Hamel) https://github.com/nodejs/node/pull/40250
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
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/40758
2021-11-09 20:06:12 +01:00
Steven
43a267f673 doc: fix corepack grammar for --force flag
PR-URL: https://github.com/nodejs/node/pull/40762
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-11-09 18:12:48 +01:00
Tobias Nießen
dd601619d3
doc: clarify getAuthTag with authTagLength
Refs: https://github.com/nodejs/node/issues/40272
Refs: https://github.com/nodejs/node/pull/20235

PR-URL: https://github.com/nodejs/node/pull/40713
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-11-09 16:45:46 +01:00
Antoine du Hamel
2cc7a91a5d esm: add support for JSON import assertion
Remove V8 flag for import assertions, enabling support for the syntax;
require the import assertion syntax for imports of JSON.

Support import assertions in user loaders.

Use both resolved module URL and import assertion type as the key for
caching modules.

Co-authored-by: Geoffrey Booth <webadmin@geoffreybooth.com>

PR-URL: https://github.com/nodejs/node/pull/40250
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2021-11-03 20:06:55 -07:00
Guy Bedford
2e2a6fecd9 doc: update cjs-module-lexer repo link
PR-URL: https://github.com/nodejs/node/pull/40707
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-11-02 21:01:50 -07:00
Rich Trott
75d5d72f48 doc: format v8.md in preparation for stricter linting
PR-URL: https://github.com/nodejs/node/pull/40647
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-11-01 19:04:34 -07:00
Stephen Belanger
da82844493 v8: multi-tenant promise hook api
PR-URL: https://github.com/nodejs/node/pull/39283
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-11-01 11:08:59 -07:00
Rich Trott
86099a375a tools: avoid unnecessary escaping in markdown formatter
Update mdast-util-to-markdown to 1.2.4 which reduces unnecessary
escaping of `_` and some other characters. Re-run markdown formatter.

PR-URL: https://github.com/nodejs/node/pull/40645
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-10-31 09:36:05 -07:00
Rich Trott
571e0b1b3f doc: final round of markdown format changes
Once the README and find-inactive-collaborators.mjs changes land here,
we can introduce markdown formatting as a step in the toolchain
somewhere.

Before this lands, https://github.com/nodejs/node-core-utils/pull/578
will need to land and be included in a node-core-utils release.

PR-URL: https://github.com/nodejs/node/pull/40645
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-10-31 09:36:02 -07:00
FrankQiu
b63313ae43
doc: remove --experimental-modules documentation
PR-URL: https://github.com/nodejs/node/pull/38974
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-10-31 13:17:37 +01:00
ryan
17d0830cf8 doc: fix markdown syntax and HTML tag misses
PR-URL: https://github.com/nodejs/node/pull/40608
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
2021-10-28 09:22:57 -07:00
Tobias Nießen
2a71eb75db doc: ref OpenSSL legacy provider from crypto docs
This adds a link to the --openssl-legacy-provider flag to the
"Support for weak or compromised algorithms" section.

PR-URL: https://github.com/nodejs/node/pull/40593
Refs: https://github.com/nodejs/node/pull/40478
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-10-27 18:32:15 +00:00
Daniel Nalborczyk
e55ab893e4 doc: add node: url scheme
PR-URL: https://github.com/nodejs/node/pull/40573
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
2021-10-27 09:15:20 +00:00
Daniel Nalborczyk
3165eb9dc8 doc: call cwd function
PR-URL: https://github.com/nodejs/node/pull/40573
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
2021-10-27 09:15:19 +00:00
Daniel Nalborczyk
3d163d3214 doc: remove unused imports
PR-URL: https://github.com/nodejs/node/pull/40573
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
2021-10-27 09:15:18 +00:00
Guy Bedford
687debbf0a doc: correct esm spec scope lookup definition
PR-URL: https://github.com/nodejs/node/pull/40592
Fixes: https://github.com/nodejs/node/issues/40578
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2021-10-26 16:02:54 -07:00
Guy Bedford
f0dcac89c7 module: resolver & spec hardening /w refactoring
PR-URL: https://github.com/nodejs/node/pull/40510
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-10-24 14:44:59 -07:00
Michaël Zasso
40d890d31d doc: improve async_context introduction
- Rename "Async_context" to "Asynchronous context tracking" in toc.
- Use named imports to show how `AsyncLocalStorage` and `AsyncResource`
  can be imported.

PR-URL: https://github.com/nodejs/node/pull/40560
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2021-10-24 12:36:03 +00:00
Rich Trott
a749c1f20c doc: use GFM footnotes in webcrypto.md
PR-URL: https://github.com/nodejs/node/pull/40477
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-10-23 06:13:21 -07:00
Ray Wang
14f6c67eda
doc: describe buffer limit of v8.serialize
PR-URL: https://github.com/nodejs/node/pull/40243
Fixes: https://github.com/nodejs/node/issues/40059
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-10-23 08:47:19 +02:00
Juan José Arboleda
ced518c61a doc: fix fs.symlink code example
Fixes: https://github.com/nodejs/node/issues/40413

PR-URL: https://github.com/nodejs/node/pull/40414
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-10-23 00:44:59 +02:00
Richard Lau
816e92e696 doc: update for changed --dns-result-order default
Update documentation to match the changed `--dns-result-order` default
value in Node.js 17.

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

PR-URL: https://github.com/nodejs/node/pull/40538
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-10-22 22:26:30 +00:00
Antoine du Hamel
4c81b34428 doc: add missing entry in globals.md
Refs: https://github.com/nodejs/node/pull/39759#issuecomment-947236795

PR-URL: https://github.com/nodejs/node/pull/40531
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-10-22 22:26:21 +00:00
Michael Dawson
f27f8d256e doc: clarify behavior of napi_extended_error_info
Fix up example and make it more explicit on how
you need to use napi_extended_error_info in order to
help people avoid what might be a common mistake that
we made in node-addon-api.

Refs: https://github.com/nodejs/node-addon-api/issues/1089

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

PR-URL: https://github.com/nodejs/node/pull/40458
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-10-20 16:01:50 -04:00
Richard Lau
7ed303beba
2021-10-20, Version 16.12.0 (Current)
Notable Changes:

Experimental ESM Loader Hooks API:

Node.js ESM Loader hooks have been consolidated to represent the steps involved needed to facilitate future loader chaining:
1. `resolve`: `resolve` [+ `getFormat`]
2. `load`: `getFormat` + `getSource` + `transformSource`

For consistency, `getGlobalPreloadCode` has been renamed to `globalPreload`.

A loader exporting obsolete hook(s) will trigger a single deprecation warning (per loader) listing the errant hooks.

Contributed by Jacob Smith, Geoffrey Booth, and Bradley Farias - https://github.com/nodejs/node/pull/37468

Other Notable Changes:

deps:
  * upgrade npm to 8.1.0 (npm team) https://github.com/nodejs/node/pull/40463
doc:
  * deprecate (doc-only) http abort related (dr-js) https://github.com/nodejs/node/pull/36670
vm:
  * (SEMVER-MINOR) add support for import assertions in dynamic imports (Antoine du Hamel) https://github.com/nodejs/node/pull/40249

PR-URL: https://github.com/nodejs/node/pull/40504
2021-10-20 10:40:02 -04:00
Rich Trott
d0b58c0287 doc: format doc/api/*.md with markdown formatter
PR-URL: https://github.com/nodejs/node/pull/40403
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-10-20 11:59:11 +02:00
Luigi Pinca
78e8f082ab doc: specify that maxFreeSockets is per host
The `maxFreeSockets` option specifies the maximum number of free
sockets per host.

PR-URL: https://github.com/nodejs/node/pull/40483
Fixes: https://github.com/nodejs/node/issues/40446
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-10-19 20:19:51 +02:00
Beth Griggs
d6c3a10757
2021-10-19, Version 17.0.0 (Current)
Notable Changes:

Deprecations and Removals:

- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup`
  options
  (Antoine du Hamel) [https://github.com/nodejs/node/pull/39793]
- doc: deprecate (doc-only) http abort related
  (dr-js) [https://github.com/nodejs/node/pull/36670]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
  (Guy Bedford) [https://github.com/nodejs/node/pull/40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
  (Guy Bedford) [https://github.com/nodejs/node/pull/40117]

OpenSSL 3.0:

Node.js now includes OpenSSL 3.0, specifically https://github.com/quictls/openssl
which provides QUIC support.

While OpenSSL 3.0 APIs should be mostly compatible with those provided
by OpenSSL 1.1.1, we do anticipate some ecosystem impact due to
tightened restrictions on the allowed algorithms and key sizes.

If you hit an `ERR_OSSL_EVP_UNSUPPORTED` error in your application with
Node.js 17, it’s likely that your application or a module you’re using
is attempting to use an algorithm or key size which is no longer allowed
by default with OpenSSL 3.0. A command-line option,
`--openssl-legacy-provider`, has been added to revert to the legacy
provider as a temporary workaround for these tightened restrictions.

For details about all the features in
OpenSSL 3.0 please see https://www.openssl.org/blog/blog/2021/09/07/OpenSSL3.Final.
(Daniel Bevenius) [https://github.com/nodejs/node/pull/38512]

Contributed in https://github.com/nodejs/node/pull/38512, https://github.com/nodejs/node/pull/40478

V8 9.5:

The V8 JavaScript engine is updated to V8 9.5. This release comes with
additional supported types for the `Intl.DisplayNames` API and Extended
`timeZoneName` options in the `Intl.DateTimeFormat` API. You can read
more details in the V8 9.5 release post https://v8.dev/blog/v8-release-95.
(Michaël Zasso) [https://github.com/nodejs/node/pull/40178]

Readline Promise API:

The `readline` module provides an interface for reading data from a
Readable stream (such as `process.stdin`) one line at a time.
(Antoine du Hamel) [https://github.com/nodejs/node/pull/37947]

Other Notable Changes:

- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
  (treysis) [https://github.com/nodejs/node/pull/39987]
- (SEMVER-MAJOR) errors: print Node.js version on fatal exceptions that
  cause exit
  (Divlo) [https://github.com/nodejs/node/pull/38332]
- deps: upgrade npm to 8.1.0
  (npm team) [https://github.com/nodejs/node/pull/40463]
- (SEMVER-MINOR) fs: add FileHandle.prototype.readableWebStream()
  (James M Snell) [https://github.com/nodejs/node/pull/39331]
- (SEMVER-MAJOR) lib: add structuredClone() global
  (Ethan Arrowood) [https://github.com/nodejs/node/pull/39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
  (Khaidi Chu) [https://github.com/nodejs/node/pull/39176]
- (SEMVER-MAJOR) stream: finished should error on errored stream
  (Robert Nagy) [https://github.com/nodejs/node/pull/39235]

Semver-Major Commits:

- (SEMVER-MAJOR) build: compile with C++17 (MSVC)
  (Richard Lau) [https://github.com/nodejs/node/pull/38807]
- (SEMVER-MAJOR) build: compile with --gnu++17
  (Richard Lau) [https://github.com/nodejs/node/pull/38807]
- (SEMVER-MAJOR) deps: update V8 to 9.5.172.19
  (Michaël Zasso) [https://github.com/nodejs/node/pull/40178]
- (SEMVER-MAJOR) deps,test,src,doc,tools: update to OpenSSL 3.0
  (Daniel Bevenius) [https://github.com/nodejs/node/pull/38512]
- (SEMVER-MAJOR) dgram: tighten `address` validation in `socket.send`
  (Voltrex) [https://github.com/nodejs/node/pull/39190]
- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup` options
  (Antoine du Hamel) [https://github.com/nodejs/node/pull/39793]
- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
  (treysis) [https://github.com/nodejs/node/pull/39987]
- (SEMVER-MAJOR) doc: update minimum supported FreeBSD to 12.2
  (Michaël Zasso) [https://github.com/nodejs/node/pull/40179]
- (SEMVER-MAJOR) errors: disp ver on fatal except that causes exit
  (Divlo) [https://github.com/nodejs/node/pull/38332]
- (SEMVER-MAJOR) fs: fix rmsync error swallowing
  (Nitzan Uziely) [https://github.com/nodejs/node/pull/38684]
- (SEMVER-MAJOR) fs: aggregate errors in fsPromises to avoid error swallowing
  (Nitzan Uziely) [https://github.com/nodejs/node/pull/38259]
- (SEMVER-MAJOR) lib: add structuredClone() global
  (Ethan Arrowood) [https://github.com/nodejs/node/pull/39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
  (Khaidi Chu) [https://github.com/nodejs/node/pull/39176]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
  (Guy Bedford) [https://github.com/nodejs/node/pull/40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
  (Guy Bedford) [https://github.com/nodejs/node/pull/40117]
- (SEMVER-MAJOR) readline: validate `AbortSignal`s and remove unused event listeners
  (Antoine du Hamel) [https://github.com/nodejs/node/pull/37947]
- (SEMVER-MAJOR) readline: introduce promise-based API
  (Antoine du Hamel) [https://github.com/nodejs/node/pull/37947]
- (SEMVER-MAJOR) readline: refactor `Interface` to ES2015 class
  (Antoine du Hamel) [https://github.com/nodejs/node/pull/37947]
- (SEMVER-MAJOR) src: allow CAP\_NET\_BIND\_SERVICE in SafeGetenv
  (Daniel Bevenius) [https://github.com/nodejs/node/pull/37727]
- (SEMVER-MAJOR) src: return Maybe from a couple of functions
  (Darshan Sen) [https://github.com/nodejs/node/pull/39603]
- (SEMVER-MAJOR) src: allow custom PageAllocator in NodePlatform
  (Shelley Vohr) [https://github.com/nodejs/node/pull/38362]
- (SEMVER-MAJOR) stream: fix highwatermark threshold and add the missing error
  (Rongjian Zhang) [https://github.com/nodejs/node/pull/38700]
- (SEMVER-MAJOR) stream: don't emit 'data' after 'error' or 'close'
  (Robert Nagy) [https://github.com/nodejs/node/pull/39639]
- (SEMVER-MAJOR) stream: do not emit `end` on readable error
  (Szymon Marczak) [https://github.com/nodejs/node/pull/39607]
- (SEMVER-MAJOR) stream: forward errored to callback
  (Robert Nagy) [https://github.com/nodejs/node/pull/39364]
- (SEMVER-MAJOR) stream: destroy readable on read error
  (Robert Nagy) [https://github.com/nodejs/node/pull/39342]
- (SEMVER-MAJOR) stream: validate abort signal
  (Robert Nagy) [https://github.com/nodejs/node/pull/39346]
- (SEMVER-MAJOR) stream: unify stream utils
  (Robert Nagy) [https://github.com/nodejs/node/pull/39294]
- (SEMVER-MAJOR) stream: throw on premature close in Readable\
  (Darshan Sen) [https://github.com/nodejs/node/pull/39117]
- (SEMVER-MAJOR) stream: finished should error on errored stream
  (Robert Nagy) [https://github.com/nodejs/node/pull/39235]
- (SEMVER-MAJOR) stream: error Duplex write/read if not writable/readable
  (Robert Nagy) [https://github.com/nodejs/node/pull/34385]
- (SEMVER-MAJOR) stream: bypass legacy destroy for pipeline and async iteration
  (Robert Nagy) [https://github.com/nodejs/node/pull/38505]
- (SEMVER-MAJOR) url: throw invalid this on detached accessors
  (James M Snell) [https://github.com/nodejs/node/pull/39752]
- (SEMVER-MAJOR) url: forbid certain confusable changes from being introduced by toASCII
  (Timothy Gu) [https://github.com/nodejs/node/pull/38631]

PR-URL: https://github.com/nodejs/node/pull/40119
2021-10-19 16:12:20 +01:00
simon-id
07bbb07119 lib: add unsubscribe method to non-active DC channels
PR-URL: https://github.com/nodejs/node/pull/40433
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-10-19 14:46:14 +00:00
simon-id
d0670e7559 lib: add return value for DC channel.unsubscribe
PR-URL: https://github.com/nodejs/node/pull/40433
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-10-19 14:46:13 +00:00
Daniel Bevenius
1d2f37d970 src: add --openssl-legacy-provider option
This commit adds an option to Node.js named --openssl-legacy-provider
and if specified will load OpenSSL 3.0 Legacy provider.

$ ./node --help
...
--openssl-legacy-provider  enable OpenSSL 3.0 legacy provider

Example usage:

$ ./node --openssl-legacy-provider  -p 'crypto.createHash("md4")'
Hash {
  _options: undefined,
  [Symbol(kHandle)]: Hash {},
  [Symbol(kState)]: { [Symbol(kFinalized)]: false }
}

Co-authored-by: Richard Lau <rlau@redhat.com>

Refs: https://github.com/nodejs/node/issues/40455
PR-URL: https://github.com/nodejs/node/pull/40478
Refs: https://github.com/nodejs/node/issues/40455
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-10-18 15:43:16 +02:00
Isaac Brodsky
4cf5563147 doc: indicate n-api out params that may be NULL
This is useful information to have for applications that don't need to read the other properties. The implementation checks for `nullptr`, see: https://github.com/nodejs/node/blob/master/src/js_native_api_v8.cc#L2879

PR-URL: https://github.com/nodejs/node/pull/40371
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-10-13 17:25:22 -04:00
Mark Skelton
15ce81a464 doc: remove ESLint comments which were breaking the CJS/ESM toggles
PR-URL: https://github.com/nodejs/node/pull/40408
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-10-12 05:06:35 +00:00
OliverOdo
4f68839910 doc: fix missing variable in deepStrictEqual example
PR-URL: https://github.com/nodejs/node/pull/40396
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-10-11 09:32:03 +00:00
Constantine Kim
ca6adcf37e doc: fix asyncLocalStorage.run() description
The description that store is not available
when asynchronous operation is created within
the callback is not accurate

PR-URL: https://github.com/nodejs/node/pull/40381
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2021-10-11 06:59:03 +00:00
Ignacio Carbajo
7dd3adf6dd doc: fix typos in n-api docs
PR-URL: https://github.com/nodejs/node/pull/40402
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-10-10 21:31:56 +00:00
Arslan Ali
0d50dfdf61 doc: improve phrasing in fs.md
PR-URL: https://github.com/nodejs/node/pull/40255
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-10-09 16:12:13 +02:00
Antoine du Hamel
08ffbd115e vm: add support for import assertions in dynamic imports
PR-URL: https://github.com/nodejs/node/pull/40249
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2021-10-09 08:44:53 +00:00
Danielle Adams
879ff775d0
2021-10-08, Version 16.11.0 (Current)
Notable changes:

    * crypto:
      * update root certificates (Richard Lau) https://github.com/nodejs/node/pull/40280
    * deps:
      * upgrade npm to 8.0.0 (npm team) https://github.com/nodejs/node/pull/40369
      * update `nghttp2` to v1.45.1 (thunder-coding) https://github.com/nodejs/node/pull/40206
      * update V8 to 9.4.146.19 (Michaël Zasso) https://github.com/nodejs/node/pull/40285
    * tools:
      * update certdata.txt (Richard Lau) https://github.com/nodejs/node/pull/40280

    PR-URL: https://github.com/nodejs/node/pull/40319
2021-10-08 13:06:10 -04:00
Guy Bedford
ccee352630 doc: esm resolver spec refactoring for deprecations
PR-URL: https://github.com/nodejs/node/pull/40314
Refs: https://github.com/nodejs/node/pull/37206
Refs: https://github.com/nodejs/node/pull/40117
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-10-08 07:35:02 -07:00
ylemkimon
b77e36cc45
doc: note readStream.path if fd is specified
it'll be `undefined` if `fd` is specified.

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

PR-URL: https://github.com/nodejs/node/pull/40252
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-10-07 17:09:30 +08:00
Justin
2ac95c6f16 doc: fix the inline code-block at the NodeDhKeyGenParams class
PR-URL: https://github.com/nodejs/node/pull/40341
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
2021-10-06 18:49:33 +00:00
Justin
f1c196d6a4 doc: correct the codeblock for hmacImportParams.hash
PR-URL: https://github.com/nodejs/node/pull/40340
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2021-10-06 18:49:25 +00:00
Juan José Arboleda
87da53c812 doc: fix typo in stream docs
PR-URL: https://github.com/nodejs/node/pull/40337
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-10-06 08:32:55 +00:00
Michaël Zasso
0d2b6aca60 doc: assign missing deprecation number
Refs: https://github.com/nodejs/node/pull/36670

PR-URL: https://github.com/nodejs/node/pull/40324
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-10-05 10:52:30 +00:00
Tobias Nießen
4bd8e0efa0 doc: fix typo in ESM example
Refs: https://github.com/nodejs/node/pull/37468

PR-URL: https://github.com/nodejs/node/pull/40275
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-10-04 02:41:51 +00:00
Mason Malone
03d25fe816 doc: fix typo in esm.md
_subpath_ is not defined in this context. This is pretty clearly meant
to be _packageSubpath_, which is the second argument to
`PACKAGE_SELF_RESOLVE`

PR-URL: https://github.com/nodejs/node/pull/40273
Reviewed-By: Guy Bedford <guybedford@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: James M Snell <jasnell@gmail.com>
2021-10-03 15:20:08 +00:00
Jacob
6199441b00 doc: correct ESM load hook table header
`resolve` does not return a `source` property

PR-URL: https://github.com/nodejs/node/pull/40234
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-10-03 15:19:49 +00:00
cjihrig
396b14b6c6
util: expose stripVTControlCharacters()
This commit exposes the existing stripVTControlCharacters()
method with docs and some additional input validation.

PR-URL: https://github.com/nodejs/node/pull/40214
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-10-01 22:56:58 -04:00
Vincent Weevers
1e89238abe doc: reorder stream 'readable' paragraphs
Fixes: https://github.com/nodejs/node/issues/40136

PR-URL: https://github.com/nodejs/node/pull/40212
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2021-09-30 19:09:33 +00:00
Brian White
1798674bc9 doc: fix typo in fs
PR-URL: https://github.com/nodejs/node/pull/40257
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-09-29 15:17:42 +00:00
Arslan Ali
88b497a11b doc: fix typo in fs.md
PR-URL: https://github.com/nodejs/node/pull/40254
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-09-29 09:41:41 +00:00
Michaël Zasso
d9ebc04e9b
2021-09-28, Version 14.18.0 'Fermium' (LTS)
Notable changes:

assert:
  * change status of legacy asserts (James M Snell) https://github.com/nodejs/node/pull/38113
buffer:
  * (SEMVER-MINOR) introduce Blob (James M Snell) https://github.com/nodejs/node/pull/36811
  * (SEMVER-MINOR) add base64url encoding option (Filip Skokan) https://github.com/nodejs/node/pull/36952
child_process:
  * (SEMVER-MINOR) allow `options.cwd` receive a URL (Khaidi Chu) https://github.com/nodejs/node/pull/38862
  * (SEMVER-MINOR) add timeout to spawn and fork (Nitzan Uziely) https://github.com/nodejs/node/pull/37256
  * (SEMVER-MINOR) allow promisified exec to be cancel (Carlos Fuentes) https://github.com/nodejs/node/pull/34249
  * (SEMVER-MINOR) add 'overlapped' stdio flag (Thiago Padilha) https://github.com/nodejs/node/pull/29412
cli:
  * (SEMVER-MINOR) add -C alias for --conditions flag (Guy Bedford) https://github.com/nodejs/node/pull/38755
  * (SEMVER-MINOR) add --node-memory-debug option (Anna Henningsen) https://github.com/nodejs/node/pull/35537
dns:
  * (SEMVER-MINOR) add "tries" option to Resolve options (Luan Devecchi) https://github.com/nodejs/node/pull/39610
  * (SEMVER-MINOR) allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) https://github.com/nodejs/node/pull/38099
doc:
  * (SEMVER-MINOR) add missing change to resolver ctor (Luan Devecchi) https://github.com/nodejs/node/pull/39610
  * refactor fs docs structure (James M Snell) https://github.com/nodejs/node/pull/37170
errors:
  * (SEMVER-MINOR) remove experimental from --enable-source-maps (Benjamin Coe) https://github.com/nodejs/node/pull/37362
esm:
  * deprecate legacy main lookup for modules (Guy Bedford) https://github.com/nodejs/node/pull/36918
fs:
  * (SEMVER-MINOR) allow empty string for temp directory prefix (Voltrex) https://github.com/nodejs/node/pull/39028
  * (SEMVER-MINOR) allow no-params fsPromises fileHandle read (Nitzan Uziely) https://github.com/nodejs/node/pull/38287
  * (SEMVER-MINOR) add support for async iterators to `fsPromises.writeFile` (HiroyukiYagihashi) https://github.com/nodejs/node/pull/37490
  * improve fsPromises readFile performance (Nitzan Uziely) https://github.com/nodejs/node/pull/37608
  * (SEMVER-MINOR) add fsPromises.watch() (James M Snell) https://github.com/nodejs/node/pull/37179
  * (SEMVER-MINOR) allow `position` parameter to be a `BigInt` in read and readSync (Darshan Sen) https://github.com/nodejs/node/pull/36190
http2:
  * (SEMVER-MINOR) add support for sensitive headers (Anna Henningsen) https://github.com/nodejs/node/pull/34145
  * (SEMVER-MINOR) allow setting the local window size of a session (Yongsheng Zhang) https://github.com/nodejs/node/pull/35978
inspector:
  * mark as stable (Gireesh Punathil) https://github.com/nodejs/node/pull/37748
module:
  * (SEMVER-MINOR) add support for `URL` to `import.meta.resolve` (Antoine du Hamel) https://github.com/nodejs/node/pull/38587
  * (SEMVER-MINOR) add support for `node:`‑prefixed `require(…)` calls (ExE Boss) https://github.com/nodejs/node/pull/37246
net:
  * (SEMVER-MINOR) introduce net.BlockList (James M Snell) https://github.com/nodejs/node/pull/34625
node-api:
  * (SEMVER-MINOR) allow retrieval of add-on file name (Gabriel Schulhof) https://github.com/nodejs/node/pull/37195
os:
  * (SEMVER-MINOR) add os.devNull (Luigi Pinca) https://github.com/nodejs/node/pull/38569
perf_hooks:
  * (SEMVER-MINOR) introduce createHistogram (James M Snell) https://github.com/nodejs/node/pull/37155
process:
  * (SEMVER-MINOR) add api to enable source-maps programmatically (legendecas) https://github.com/nodejs/node/pull/39085
  * (SEMVER-MINOR) add `'worker'` event (James M Snell) https://github.com/nodejs/node/pull/38659
  * (SEMVER-MINOR) add direct access to rss without iterating pages (Adrien Maret) https://github.com/nodejs/node/pull/34291
readline:
  * (SEMVER-MINOR) add AbortSignal support to interface (Nitzan Uziely) https://github.com/nodejs/node/pull/37932
  * (SEMVER-MINOR) add support for the AbortController to the question method (Mattias Runge-Broberg) https://github.com/nodejs/node/pull/33676
  * (SEMVER-MINOR) add history event and option to set initial history (Mattias Runge-Broberg) https://github.com/nodejs/node/pull/33662
repl:
  * (SEMVER-MINOR) add auto‑completion for `node:`‑prefixed `require(…)` calls (ExE Boss) https://github.com/nodejs/node/pull/37246
src:
  * (SEMVER-MINOR) call overload ctor from the original ctor (Darshan Sen) https://github.com/nodejs/node/pull/39768
  * (SEMVER-MINOR) add a constructor overload for CallbackScope (Darshan Sen) https://github.com/nodejs/node/pull/39768
  * (SEMVER-MINOR) allow to negate boolean CLI flags (Michaël Zasso) https://github.com/nodejs/node/pull/39023
  * (SEMVER-MINOR) add --heapsnapshot-near-heap-limit option (Joyee Cheung) https://github.com/nodejs/node/pull/33010
  * (SEMVER-MINOR) add way to get IsolateData and allocator from Environment (Anna Henningsen) https://github.com/nodejs/node/pull/36441
  * (SEMVER-MINOR) allow preventing SetPrepareStackTraceCallback (Shelley Vohr) https://github.com/nodejs/node/pull/36447
  * (SEMVER-MINOR) add maybe versions of EmitExit and EmitBeforeExit (Anna Henningsen) https://github.com/nodejs/node/pull/35486
stream:
  * (SEMVER-MINOR) add readableDidRead if has been read from (Robert Nagy) https://github.com/nodejs/node/pull/39589
  * (SEMVER-MINOR) pipeline accept Buffer as a valid first argument (Nitzan Uziely) https://github.com/nodejs/node/pull/37739
tls:
  * (SEMVER-MINOR) allow reading data into a static buffer (Andrey Pechkurov) https://github.com/nodejs/node/pull/35753
tools:
  * (SEMVER-MINOR) add `Worker` to type-parser (James M Snell) https://github.com/nodejs/node/pull/38659
url:
  * (SEMVER-MINOR) expose urlToHttpOptions utility (Yongsheng Zhang) https://github.com/nodejs/node/pull/35960
util:
  * (SEMVER-MINOR) expose toUSVString (Robert Nagy) https://github.com/nodejs/node/pull/39814
v8:
  * (SEMVER-MINOR) implement v8.stopCoverage() (Joyee Cheung) https://github.com/nodejs/node/pull/33807
  * (SEMVER-MINOR) implement v8.takeCoverage() (Joyee Cheung) https://github.com/nodejs/node/pull/33807
worker:
  * (SEMVER-MINOR) add setEnvironmentData/getEnvironmentData (James M Snell) https://github.com/nodejs/node/pull/37486

PR-URL: https://github.com/nodejs/node/pull/39990
2021-09-28 13:27:26 +02:00
Arslan Ali
fda1402b79 doc: fix typo in packages.md
PR-URL: https://github.com/nodejs/node/pull/40230
Fixes: https://github.com/nodejs/node/issues/40228
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-09-27 23:32:13 +00:00
Antoine du Hamel
78962d1ca1 doc: mark readline promise implementation as experimental
Refs: https://github.com/nodejs/node/pull/37947#issuecomment-921538713

PR-URL: https://github.com/nodejs/node/pull/40211
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-09-27 17:53:15 +00:00
Gary Ho
8037d1749a
doc: fix example of crypto.generateKeySync
doc: fix the example of crypto.generateKeySync

The "options" argument must be an object.

PR-URL: https://github.com/nodejs/node/pull/40225
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2021-09-27 15:58:08 +02:00
dr-js
4b030d0573 doc: deprecate (doc-only) http abort related
Refs: https://github.com/nodejs/node/pull/36641
Refs: https://github.com/nodejs/node/issues/36617#issuecomment-751443964

Documentation-only deprecate `.aborted` property and `'abort'`,
`'aborted'` event in `http`, and suggest using the corresponding
Stream API instead.

Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Rich Trott <rtrott@gmail.com>
Co-authored-by: Robert Nagy <ronagy@icloud.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/36670
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-09-27 12:43:58 +02:00
Artur K
44b173e013 http: use 0 as default for requests limit
PR-URL: https://github.com/nodejs/node/pull/40192
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
2021-09-27 11:45:24 +02:00
Clément Nardi
2b02d2f844 doc: update fs.watchFile doc
The current wording suggests to compare Date objects, which won't work.

PR-URL: https://github.com/nodejs/node/pull/40134
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-09-26 08:36:22 +00:00
Gerhard Stöbich
b0ef0807e0 doc: add version when diagnostics_channel APIs were added
Add a yaml section to document when diagnostics_channel APIs were
introduced.

PR-URL: https://github.com/nodejs/node/pull/40208
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-09-25 16:11:27 +00:00
Antoine du Hamel
026bd82e30
fs: add stream utilities to FileHandle
PR-URL: https://github.com/nodejs/node/pull/40009
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-09-25 07:57:31 -07:00
Rebhi Alfa
25ffd39f33
doc: fix typo in 'maxHeaderSize'
PR-URL: https://github.com/nodejs/node/pull/40164
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-09-25 07:41:20 -07:00
m3m0ry
5134b0e05c
doc: fix buffer api example code's token error
Buffer's Blob api example code has some token error

PR-URL: https://github.com/nodejs/node/pull/40125
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-09-25 07:30:40 -07:00
xuchaobei
5f3c1b68d3 doc: fix typo in async_hooks.md
PR-URL: https://github.com/nodejs/node/pull/40187
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-09-24 10:43:17 +02:00
Beth Griggs
8d5675e3fe
2021-09-22, Version 16.10.0 (Current)
Notable changes:

crypto:
  * (SEMVER-MINOR) add rsa-pss keygen parameters (Filip Skokan) https://github.com/nodejs/node/pull/39927
doc:
  * add Ayase-252 to collaborators (Qingyu Deng) https://github.com/nodejs/node/pull/40078
fs:
  * (SEMVER-MINOR) make `open` and `close` stream override optional when unused (Antoine du Hamel) https://github.com/nodejs/node/pull/40013
http:
  * (SEMVER-MINOR) limit requests per connection (Artur K) https://github.com/nodejs/node/pull/40082
src:
  * (SEMVER-MINOR) add --no-global-search-paths cli option (Cheng Zhao) https://github.com/nodejs/node/pull/39754
  * (SEMVER-MINOR) add option to disable global search paths (Cheng Zhao) https://github.com/nodejs/node/pull/39754
  * (SEMVER-MINOR) make napi_create_reference accept symbol (JckXia) https://github.com/nodejs/node/pull/39926
stream:
  * (SEMVER-MINOR) add signal support to pipeline generators (Robert Nagy) https://github.com/nodejs/node/pull/39067

PR-URL: https://github.com/nodejs/node/pull/40175
2021-09-22 21:38:17 +01:00
Luigi Pinca
e1bca102a7 doc: fix typos in http.md
PR-URL: https://github.com/nodejs/node/pull/40161
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-09-22 20:10:26 +02:00
Guy Bedford
36e2ffe6dc module: subpath folder mappings EOL
PR-URL: https://github.com/nodejs/node/pull/40121
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-09-21 23:15:02 -07:00
Rich Trott
0991dfcece doc: add blank line between comments
Upcoming remark-based formatting/linting will add a blank line between
comments in markdown. This is in preparation for that change.

PR-URL: https://github.com/nodejs/node/pull/40160
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-09-21 18:40:04 -07:00
RISHABH BUDHIRAJA
479658ba98 doc: changes default values for fs.read fns
PR-URL: https://github.com/nodejs/node/pull/39163
Fixes: https://github.com/nodejs/node/issues/39034
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
2021-09-21 08:43:45 +00:00