Commit Graph

35302 Commits

Author SHA1 Message Date
Tobias Nießen
a336444c7f
tls: fix handling of x509 subject and issuer
When subject and verifier are represented as strings, escape special
characters (such as '+') to guarantee unambiguity. Previously, different
distinguished names could result in the same string when encoded. In
particular, inserting a '+' in a single-value Relative Distinguished
Name (e.g., L or OU) would produce a string that is indistinguishable
from a multi-value Relative Distinguished Name. Third-party code that
correctly interprets the generated string representation as a
multi-value Relative Distinguished Name could then be vulnerable to an
injection attack, e.g., when an attacker includes a single-value RDN
with type OU and value 'HR + CN=example.com', the string representation
produced by unpatched versions of Node.js would be
'OU=HR + CN=example.com', which represents a multi-value RDN.

Node.js itself is not vulnerable to this attack because the current
implementation that parses such strings into objects does not handle '+'
at all. This oversight leads to incorrect results, but at the same time
appears to prevent injection attacks (as described above).

With this change, the JavaScript objects representing the subject and
issuer Relative Distinguished Names are constructed in C++ directly,
instead of (incorrectly) encoding them as strings and then (incorrectly)
decoding the strings in JavaScript.

This addresses CVE-2021-44533.

CVE-ID: CVE-2021-44533
PR-URL: https://github.com/nodejs-private/node-private/pull/300
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-01-10 22:38:05 +00:00
Tobias Nießen
50439b446f
tls: drop support for URI alternative names
Previously, Node.js incorrectly accepted uniformResourceIdentifier (URI)
subject alternative names in checkServerIdentity regardless of the
application protocol. This was incorrect even in the most common cases.
For example, RFC 2818 specifies (and RFC 6125 confirms) that HTTP over
TLS only uses dNSName and iPAddress subject alternative names, but not
uniformResourceIdentifier subject alternative names.

Additionally, name constrained certificate authorities might not be
constrained to specific URIs, allowing them to issue certificates for
URIs that specify hosts that they would not be allowed to issue dNSName
certificates for.

Even for application protocols that make use of URI subject alternative
names (such as SIP, see RFC 5922), Node.js did not implement the
required checks correctly, for example, because checkServerIdentity
ignores the URI scheme.

As a side effect, this also fixes an edge case. When a hostname is not
an IP address and no dNSName subject alternative name exists, the
subject's Common Name should be considered even when an iPAddress
subject alternative name exists.

It remains possible for users to pass a custom checkServerIdentity
function to the TLS implementation in order to implement custom identity
verification logic.

This addresses CVE-2021-44531.

CVE-ID: CVE-2021-44531
PR-URL: https://github.com/nodejs-private/node-private/pull/300
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-01-10 22:38:05 +00:00
Tobias Nießen
466e5415a2
crypto,tls: implement safe x509 GeneralName format
This change introduces JSON-compatible escaping rules for strings that
include X.509 GeneralName components (see RFC 5280). This non-standard
format avoids ambiguities and prevents injection attacks that could
previously lead to X.509 certificates being accepted even though they
were not valid for the target hostname.

These changes affect the format of subject alternative names and the
format of authority information access. The checkServerIdentity function
has been modified to safely handle the new format, eliminating the
possibility of injecting subject alternative names into the verification
logic.

Because each subject alternative name is only encoded as a JSON string
literal if necessary for security purposes, this change will only be
visible in rare cases.

This addresses CVE-2021-44532.

CVE-ID: CVE-2021-44532
PR-URL: https://github.com/nodejs-private/node-private/pull/300
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-01-10 22:38:05 +00:00
Tobias Nießen
26a5c583ab
src: remove unused x509 functions
These functions are currently not being used and their security should
be audited before any potential future use.

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:02 +00:00
nikoladev
63bb6dcf0f
doc: align links in table to top
PR-URL: https://github.com/nodejs/node/pull/41396
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
2022-01-10 22:36:54 +00:00
Michael Dawson
ed77955fb7 doc: add guidance on order vulns are listed in
Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/41429
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2022-01-10 12:05:20 -05: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
Rich Trott
c8d38e4933
tools: use GITHUB_ACTIONS env var in inactivity scripts
Don't rewrite the README if we're not running inside a GitHub Action.

PR-URL: https://github.com/nodejs/node/pull/41422
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2022-01-10 10:14:31 +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
Jacob Smith
f0274635e1
meta: correct my name in AUTHORS
PR-URL: https://github.com/nodejs/node/pull/41444
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-01-10 10:13:13 +00:00
Node.js GitHub Bot
f17b73cebd
meta: update AUTHORS
PR-URL: https://github.com/nodejs/node/pull/41449
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-01-09 13:45:51 +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
e247089057
tools: replace while+exec() with matchAll()
PR-URL: https://github.com/nodejs/node/pull/41406
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2022-01-09 03:46:56 +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
Michael Dawson
46f4d5e2a6 doc: add @RaisinTen to the TSC
Refs: https://github.com/nodejs/TSC/issues/1141

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

PR-URL: https://github.com/nodejs/node/pull/41419
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
2022-01-07 14:18:13 -05:00
Rich Trott
b161440cd3
stream: remove unused function argument
watchClosed() is only ever called with an anonymous function for the
action parameter. This anonymous funciton does not take any arguments.
Remove unused argument from invocation of action().

PR-URL: https://github.com/nodejs/node/pull/41403
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-07 16:49:16 +00:00
Colin Ihrig
b6b6510187
deps: upgrade to libuv 1.43.0
Notable changes:

- `uv_ip_name()` has been added.
- On Windows, `uv_fs_read()` and `uv_fs_write()` now return
  `UV_EBADF` instead of `UV_EPERM` when the file descriptor
  was opened with incorrect flags. This matches the behavior
  on other platforms.
- Streams can be reset and attempted to read from after
  EOF is read.
- The main thread now has a valid ID instead of `NULL`.
- `uv_cpu_info()` now supports `aarch64`.
- Several minor issues related to mingw32 have been fixed.

PR-URL: https://github.com/nodejs/node/pull/41398
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-01-07 02:45:31 +00:00
Rich Trott
95e1f92722
tools: fix argv bug in find-inactive-tsc.mjs
The argument supplied is expected to be text, not numeric.

This wasn't causing issues with the automated job because it does not
send an argument. It uses the default.

PR-URL: https://github.com/nodejs/node/pull/41394
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2022-01-07 02:01:18 +00:00
alexcfyung
f6e5050579
build: start build on z/OS
Update configure.py, Makefile, and common.gypi to get the
build started on z/OS.

Co-authored-by: Gaby Baghdadi <baghdadi@ca.ibm.com>
Co-authored-by: Wayne Zhang <zsw007@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/41273
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
2022-01-06 15:54:32 +00:00
David Sanders
79b21eead2
build,tools,win: trim unused VCBUILD_PYTHON_LOCATION variable
PR-URL: https://github.com/nodejs/node/pull/41235
Refs: https://github.com/nodejs/node/pull/18621
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2022-01-06 15:24:36 +00:00
David Sanders
461313d608
src: do IWYU for some STL includes
PR-URL: https://github.com/nodejs/node/pull/41236
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-01-06 15:24:28 +00:00
Geoffrey Booth
8dd0658e87
esm: refactor esm tests out of test/message
PR-URL: https://github.com/nodejs/node/pull/41352
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2022-01-06 11:07:52 +00:00
Michael Dawson
0b4e9ae656
test: mark test-performance-eventloopdelay flaky
Refs: https://github.com/nodejs/node/issues/41286

This is one of the remaining high indicende failures
in the CI. Mark as flaky while it is investigated.

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

PR-URL: https://github.com/nodejs/node/pull/41409
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-06 01:14:28 +00:00
Rich Trott
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
Richard Lau
59558807ce
doc: fix example commands for REPLACEME updates
Split the two example command lines for updating the `REPLACEME` tags
into separate `console` fenced code blocks. This fixes some stray
"`" characters and makes each example one-click copiable when viewing
the guide in GitHub's web UI.

PR-URL: https://github.com/nodejs/node/pull/41269
Refs: https://github.com/nodejs/node/pull/39544
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2022-01-05 19:44:38 +00:00
Rich Trott
55ceaec111 tools,benchmark,lib,test: enable no-case-declarations lint rule
PR-URL: https://github.com/nodejs/node/pull/41385
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-01-05 07:42:19 -08:00
Rich Trott
e7d4e6b680 tools: remove conditional assignment in custom ESLint rule
These changes no-duplicate-require.js so that it doesn't use an
assignment in a conditional, which can be easy to misread as a
comparison rather than an assignment. It also means we change a do/while
(which we don't use much in our code) to the much more common while
construct.

PR-URL: https://github.com/nodejs/node/pull/41325
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2022-01-05 06:11:29 -08:00
Cheng Zhao
a706342368
src: add kNoBrowserGlobals flag for Environment
PR-URL: https://github.com/nodejs/node/pull/40532
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-01-05 11:01:49 +00:00
Antoine du Hamel
f34c0e0bc0
tls: use optional chaining to simplify checks
PR-URL: https://github.com/nodejs/node/pull/41337
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2022-01-05 11:01:29 +00:00
Node.js GitHub Bot
1344b36fe3
tools: update lint-md-dependencies to @rollup/plugin-node-resolve@13.1.2
PR-URL: https://github.com/nodejs/node/pull/41369
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-01-05 11:54:02 +01:00
Rich Trott
78b3af99b3
meta: add required fields in issue templates
Make sure there is at least one required field in each issue template.
Leave the title blank to enforce that as a required field as well.

PR-URL: https://github.com/nodejs/node/pull/41378
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-05 10:05:34 +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
Shaw
bad65ea69d http: remove duplicate code
This line of code has been implemented in the prepareError function.

PR-URL: https://github.com/nodejs/node/pull/39239
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2022-01-04 19:55:40 -08:00
Rich Trott
bd9272628f
build: use list for mutable retval rather than tuple
We define `retval` as a tuple and then replace the tuple by "appending"
items with `+=` but that actually creates a new tuple every time.
Because it is intended to be mutable, use a list instead, then return a
tuple from the function, as it should be immutable outside the function.

PR-URL: https://github.com/nodejs/node/pull/41372
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-01-05 03:50:14 +00:00
Node.js GitHub Bot
513e9fd0b6 tools: update doc to rehype-raw@6.1.1
PR-URL: https://github.com/nodejs/node/pull/41367
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-01-04 19:34:36 -08:00
Michael Dawson
3f403e5e28 node-api: add missing initialization of last error
- Add missing initiatlization of last error which
  was reported by coverity.

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

PR-URL: https://github.com/nodejs/node/pull/41290
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-01-04 18:33:13 -05:00
Michael Dawson
c85e67b600 test: mark test-repl-sigint-nested-eval as flaky
Refs: https://github.com/nodejs/node/issues/41123

- This is one of the remaining high occurance flaky
  tests from the reliability reports and recent
  failures in the CI. Mark as flaky until issue
  is resolved under referenced issue.

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

PR-URL: https://github.com/nodejs/node/pull/41302
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-04 15:59:25 -05:00
Node.js GitHub Bot
ad747a8956
meta: update AUTHORS
PR-URL: https://github.com/nodejs/node/pull/41374
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-01-04 11:58:45 +00:00
Robert Nagy
48e784043d stream: don't emit finish after destroy
PR-URL: https://github.com/nodejs/node/pull/40852
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-01-03 16:32:44 +01:00
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
Darshan Sen
64cc066f59
timers: use ref counts to count timers
The additional objects that were getting added and deleted from the
activeTimersMap object were slowing down the rest of the timers code,
so this change falls back to using the ref counts to count the active
timers inside process.getActiveResourcesInfo().

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

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

PR-URL: https://github.com/nodejs/node/pull/41231
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-01-02 15:28:23 +00: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
Anna Henningsen
a4795ada8b src: split out async stack corruption detection from inline fn
This is fairly expensive code that unnecessarily bloats the
contents of the inline function.

PR-URL: https://github.com/nodejs/node/pull/41331
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-01-01 18:36:51 +00:00
Anna Henningsen
69ea6775f4 src: store native async execution resources as v8::Local
This is possible because the async stack is always expected
to match the native call stack, and saves performance overhead
that comes from the usage of `v8::Global`.

PR-URL: https://github.com/nodejs/node/pull/41331
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-01-01 18:36:50 +00:00
Anna Henningsen
6932fb8bac src: guard slightly costly check in MakeCallback more strongly
PR-URL: https://github.com/nodejs/node/pull/41331
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-01-01 18:36:49 +00:00
Rich Trott
5f07d00c60
tools: remove last of error-masking in commit-queue.sh
Remove the lats of the unintentional error-masking in commit-queue.sh.

With this change, `tools/lint-sh.js . --from-npx` at last passes.

PR-URL: https://github.com/nodejs/node/pull/41356
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-01-01 17:25:36 +00:00