PR-URL: https://github.com/nodejs/node/pull/27744
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
libuv does not map 100% of errors. When an unmapped error is
encountered, the Map returns undefined, which is then
unsuccessfully destructured, causing an exception. This commit
adds a default value in the event of an unmapped error.
PR-URL: https://github.com/nodejs/node/pull/29288
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/node/pull/29294
Fixes: https://github.com/nodejs/node/issues/29243
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Splits the node.js specific tweak intialization of NewContext into a new
helper MaybeInitializeContext so that embedders with existing contexts
can still use them in a Node.js Environment now that primordials are
initialized and required so early.
Update MaybeInitializeContext to return MaybeLocal,
PR-URL: https://github.com/nodejs/node/pull/28544
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Our project relies on the Developer Certificate of Origin as a passive
alternative to a Contributor License Agreement. The PR template seems
like a great place to surface the text to help new contributors be
aware of the DCO and it's implications.
PR-URL: https://github.com/nodejs/node/pull/24023
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
There are currently two implementations of this function.
This commit removes the redundancy, and removes "lazy" from
the name.
PR-URL: https://github.com/nodejs/node/pull/29285
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
When timeEnd function is called, display result with a suitable
time unit instead of a big amount of milliseconds.
Refs: https://github.com/nodejs/node/issues/29099
PR-URL: https://github.com/nodejs/node/pull/29251
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This test covers a regression where 'end' was not emitted in the case
of keepalive requests without parsing the full body.
PR-URL: https://github.com/nodejs/node/pull/29263
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This reverts commit 779a05d5d1.
PR-URL: https://github.com/nodejs/node/pull/29263
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Since there's a comment about the 'base64' validation needed, and this
will result in a breaking change, so this should be removed.
PR-URL: https://github.com/nodejs/node/pull/29201
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Also removed redundant statments as extends is self-explanatory.
PR-URL: https://github.com/nodejs/node/pull/29255
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/29256
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
If we are not going to emit 'close' then there is no reason to
schedule it.
PR-URL: https://github.com/nodejs/node/pull/29194
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit removes unused using declarations in
src/node_contextify.cc.
PR-URL: https://github.com/nodejs/node/pull/29222
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Co-Authored-By: Anna Henningsen <anna@addaleax.net>
PR-URL: https://github.com/nodejs/node/pull/25436
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* ```mjs -> ```js as our linting of doc code fragments
does not recognize this tag, IIRC.
* Add semicolons to a code fragment.
* Fix ASCII sorting in bottom references.
PR-URL: https://github.com/nodejs/node/pull/29242
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
This commit adds a recursive option to fs.rmdir(),
fs.rmdirSync(), and fs.promises.rmdir(). The implementation
is a port of the npm module rimraf.
PR-URL: https://github.com/nodejs/node/pull/29168
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Adds missing extends Http2Session for ClientHttp2Session
and ServerHttp2Session.
PR-URL: https://github.com/nodejs/node/pull/29252
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/29253
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Also removes the redundant statement explained by "extends Stream".
PR-URL: https://github.com/nodejs/node/pull/29254
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
async iterator should not depend on internal API for better compat
with streamlike objects.
PR-URL: https://github.com/nodejs/node/pull/29176
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
It's a sync request, which doesn't require the loop parameter to be set.
PR-URL: https://github.com/nodejs/node/pull/29275
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Allow passing true for emitClose option for fs
streams.
Fixes: https://github.com/nodejs/node/issues/29177
PR-URL: https://github.com/nodejs/node/pull/29212
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
i2d_SSL_SESSION() can return a value <= 0 when the session is malformed
or otherwise invalid. Handle that case.
This change comes without a regression test because I couldn't figure
out a good way to generate an existing but invalid session in a timely
fashion.
Fixes: https://github.com/nodejs/node/issues/29202
PR-URL: https://github.com/nodejs/node/pull/29225
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
I don't think so, Tim.
PR-URL: https://github.com/nodejs/node/pull/29234
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit moves the tooltest target to come before the jstest target
to make the console output consistent with it was before I introduced
the tooltest target.
Currently the output looks like this which is might give the impression
that only one test was run:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -s tooltest
.
----------------------------------------------------------------------
Ran 1 test in 0.000s
Compared to the usual:
[03:58|% 100|+ 2739|- 0]: Done
PR-URL: https://github.com/nodejs/node/pull/29220
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/29198
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
We want to read a bytes file and decode the contents as utf-8 so we can
compare against a utf-8 pattern.
PR-URL: https://github.com/nodejs/node/pull/29208
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/29213
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
These tests are run in allow_failures mode on Python 3.7.1 and they
bypasses the Python version checks in ./configure by directly running
./configure.py.
PR-URL: https://github.com/nodejs/node/pull/29196
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/29195
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>