Commit Graph

31872 Commits

Author SHA1 Message Date
Rich Trott
4952747b37 doc: use kbd element in process doc
PR-URL: https://github.com/nodejs/node/pull/35584
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2020-10-12 06:37:06 -07:00
Guy Bedford
f3ce2811dd module: use Wasm CJS lexer when available
PR-URL: https://github.com/nodejs/node/pull/35583
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
2020-10-12 04:24:41 -07:00
cjihrig
2d83e743d9 tools: update ESLint to 7.11.0
Update ESLint to 7.11.0

PR-URL: https://github.com/nodejs/node/pull/35578
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-10-11 23:42:04 +00:00
Yash Ladha
2e4930b36f src: reduced substring calls
Reduced the number of substring calls by 1 as it is a linear time
complexity function. Thus having a larger path might lead to decrease in
performance. Also removed unnecessary string allocation happening in the
block.

PR-URL: https://github.com/nodejs/node/pull/34808
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2020-10-11 22:22:56 +00:00
cjihrig
4cfa5dfccd fs: update rm/rmdir validation messages
The validation code for the rm/rmdir functions treated the
options as distinct parameters instead of the options properties
that they are. This commit updates the validation to treat them
like properties.

PR-URL: https://github.com/nodejs/node/pull/35565
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
2020-10-11 16:53:07 +00:00
cjihrig
0b31b9d358 fs: use validateBoolean() in rm/rmdir validation
PR-URL: https://github.com/nodejs/node/pull/35565
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
2020-10-11 16:53:06 +00:00
Anna Henningsen
eee522ac29 lib: add EventTarget-related browser globals
Add

- Event
- EventTarget
- MessagePort
- MessageChannel
- MessageEvent

to the set of global objects, since they are available now and behave
like they do in the browser.

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

PR-URL: https://github.com/nodejs/node/pull/35496
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
2020-10-11 14:35:17 +00:00
Anna Henningsen
705d888387 worker: make MessageEvent class more Web-compatible
PR-URL: https://github.com/nodejs/node/pull/35496
Fixes: https://github.com/nodejs/node/issues/35495
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
2020-10-11 14:35:16 +00:00
Rich Trott
828518c208 tools: refloat 7 Node.js patches to cpplint.py
Cherry-pick 12c8b4d154
Original commit message:
    This commit is a suggestion for adding a rule for NULL usages in the
    code base. This will currently report a number of errors which could be
    ignored using // NOLINT (readability/null_usage)

    PR-URL: https://github.com/nodejs/node/pull/17373
    Reviewed-By: Jon Moss <me@jonathanmoss.me>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Timothy Gu <timothygu99@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>

Refs: 12c8b4d154

Cherry-pick fc81e80191
Original commit message:

    Update cpplint.py to check for inline headers when the corresponding
    header is already included.

    PR-URL: https://github.com/nodejs/node/pull/21521
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: James M Snell <jasnell@gmail.com>

Refs: fc81e80191

Cherry-pick cbc3dd997e
Original commit message:

    src, tools: add check for left leaning pointers

    This commit adds a rule to cpplint to check that pointers in the code
    base lean to the left and not right, and also fixes the violations
    reported.

    PR-URL: https://github.com/nodejs/node/pull/21010
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: James M Snell <jasnell@gmail.com>

Refs: cbc3dd997e

Cherry-pick 902998190a
Original commit message:

    tools: fix cpplint.py header rules

    THIS COMMIT SHOULD GO WITH THE NEXT. IT WILL FIND NEW LINT.

    PR-URL: https://github.com/nodejs/node/pull/26306
    Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

Refs: 902998190a

Cherry-pick 0a25ace9c3
Original commit message:

    tools: move cpplint configuration to .cpplint

    PR-URL: https://github.com/nodejs/node/pull/27098
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>

Refs: 0a25ace9c3

Cherry-pick afa9a7206c
Original commit message:

    tools: refloat update link to google styleguide for cpplint

    This commit updates two old links to Google's C++ styleguide which
    currently result in a 404 when accessed.

    PR-URL: https://github.com/nodejs/node/pull/30876
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: David Carlier <devnexen@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Richard Lau <riclau@uk.ibm.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>

Refs: afa9a7206c

Cherry-pick e23bf8f771
Original commit message:

    tools,src: refloat forbid usage of v8::Persistent

    `v8::Persistent` comes with the surprising catch that it requires
    manual cleanup. `v8::Global` doesn’t, making it easier to use,
    and additionally provides move semantics. New code should always
    use `v8::Global`.

    PR-URL: https://github.com/nodejs/node/pull/31018
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Richard Lau <riclau@uk.ibm.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: David Carlier <devnexen@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Gus Caplan <me@gus.host>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>

PR-URL: https://github.com/nodejs/node/pull/35569
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-10-11 06:14:03 -07:00
Rich Trott
7dd786bb89 tools: bump cpplint.py to 1.4.6
Refs: https://github.com/cpplint/cpplint/releases/tag/1.4.6

PR-URL: https://github.com/nodejs/node/pull/35569
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-10-11 06:13:46 -07:00
Antoine du Hamel
900f28aa6d doc: fixup perf_hooks
PR-URL: https://github.com/nodejs/node/pull/35527
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-10-11 10:00:52 +00:00
cjihrig
91e0d9bc30
fs: remove extraneous assignments in rmdir()
validateRmOptions() doesn't return a value, so this commit
removes the assignment. The options passed to
validateRmdirOptions() are not used again after validation, so
this commit removes the assignment.

PR-URL: https://github.com/nodejs/node/pull/35567
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2020-10-10 21:57:34 -04:00
cjihrig
94b0908503
fs: simplify validateRmOptions() error handling
PR-URL: https://github.com/nodejs/node/pull/35567
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2020-10-10 21:57:26 -04:00
Anna Henningsen
278d38f4cf
src: add maybe versions of EmitExit and EmitBeforeExit
This addresses a TODO comment, and removes invalid `.ToLocalChecked()`
calls from our code base.

PR-URL: https://github.com/nodejs/node/pull/35486
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-10-11 02:20:53 +02:00
cjihrig
275153ddc4 fs: use errno constant with ERR_FS_EISDIR
This commit updates rm() to use the EISDIR constant with
ERR_FS_EISDIR instead of hard coding -21.

PR-URL: https://github.com/nodejs/node/pull/35563
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-10-10 23:23:36 +00:00
cjihrig
71a48c338a
doc: remove incorrect synchronous label
fsPromises.rm() is not synchronous.

PR-URL: https://github.com/nodejs/node/pull/35561
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-10 18:16:55 -04:00
cjihrig
b8bd456839
doc: make fs.rm()'s force docs consistent
This commit updates the documentation for the force option to
fs.rm(). Prior to this commit, the documentation was inconsistent
with the surrounding documentation.

PR-URL: https://github.com/nodejs/node/pull/35561
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-10 18:16:55 -04:00
James M Snell
83eaaf9731
src: remove unused AsyncWrapObject
Following the crypto subsystem refactor, this is now unused.
Begone!!

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

PR-URL: https://github.com/nodejs/node/pull/35511
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-10 08:36:13 -07:00
James M Snell
2310f679a1
src: move node_binding to modern THROW_ERR*
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/35469
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2020-10-10 08:17:48 -07:00
James M Snell
eb322bbe7f
src: move node_contextify to modern THROW_ERR_*
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/35470
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2020-10-10 08:01:49 -07:00
James M Snell
b28ba4b177
src: move node_process to modern THROW_ERR*
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/35472
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2020-10-10 08:00:32 -07:00
Pooja D.P
ff4928f85f doc: simplify wording in tracing APIs doc
PR-URL: https://github.com/nodejs/node/pull/35556
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-10 05:55:04 -07:00
Rich Trott
91f0544889 doc: improve SIGINT error text
* add kbd elements
* correct period/parenthesis order
* make fragment a full sentence

PR-URL: https://github.com/nodejs/node/pull/35558
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2020-10-10 05:16:37 -07:00
Myles Borins
dabc6ddddc deps: upgrade npm to 7.0.0-rc.4
PR-URL: https://github.com/nodejs/node/pull/35576
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-10-10 08:33:05 +00:00
Robert Nagy
d70c0ed250 http: allow passing array of key/val into writeHead
Enables an optimization when the user already has the headers
in an array form, e.g. when proxying.

PR-URL: https://github.com/nodejs/node/pull/35274
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-10 10:11:41 +02:00
Myles Borins
8d8e06a345
doc: move package.import content higher
This is currently at the end of the doc, it likely should be found
right after the documentation about `package.exports`. Refactored the
docs while duplicating content as little as possible.

Co-authored-by: Guy Bedford <guybedford@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Rich Trott <rtrott@gmail.com>
Signed-off-by: Myles Borins <mylesborins@github.com>

PR-URL: https://github.com/nodejs/node/pull/35535
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2020-10-09 15:10:23 -04:00
Antoine du Hamel
bd45124f00 doc: harmonize changes list ordering
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/139

PR-URL: https://github.com/nodejs/node/pull/35454
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2020-10-09 18:46:47 +00:00
Antoine du Hamel
9fedb044e7 doc: changes description must end with a period
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/139

PR-URL: https://github.com/nodejs/node/pull/35454
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2020-10-09 18:46:46 +00:00
Antoine du Hamel
125523bffe doc: harmonize version list style in YAML comments
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/139

PR-URL: https://github.com/nodejs/node/pull/35454
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2020-10-09 18:46:45 +00:00
Antoine du Hamel
6eace7749d doc: fix missing PR-URLs in YAML comments
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/139

PR-URL: https://github.com/nodejs/node/pull/35454
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2020-10-09 18:46:45 +00:00
Antoine du Hamel
b3c3e0115f doc: remove outstanding YAML comment
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/139

PR-URL: https://github.com/nodejs/node/pull/35454
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2020-10-09 18:46:44 +00:00
Antoine du Hamel
4cc06922dc doc: harmonize YAML comments style in deprecations.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/139

PR-URL: https://github.com/nodejs/node/pull/35454
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2020-10-09 18:46:43 +00:00
Denys Otrishko
ce11b1c395 build: fix landed message for multiple commits in commit-queue
PR-URL: https://github.com/nodejs/node/pull/35226
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2020-10-09 18:37:53 +00:00
Michael Dawson
ccfa661d6c doc: refactor the n-api matrix
- refactor the n-api matrix and add v7

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

PR-URL: https://github.com/nodejs/node/pull/35345
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2020-10-09 14:26:34 -04:00
Denys Otrishko
5509c1b7e5
build: add Commit Queue actions url to failure comment
PR-URL: https://github.com/nodejs/node/pull/35206
Refs: https://docs.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2020-10-09 11:05:32 -07:00
davkor
de7a1abfc2 build: fuzzer that targets node::LoadEnvironment()
Refs: https://github.com/nodejs/node/pull/34761
Refs: https://github.com/nodejs/node/issues/33724

PR-URL: https://github.com/nodejs/node/pull/34844
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2020-10-09 12:37:26 -04:00
Luigi Pinca
b474901438 test: add ALPNProtocols option to clientOptions
Without this, the session is destroyed with the following error

```
Error [ERR_HTTP2_ERROR]: Protocol error
    at Http2Session.onSessionInternalError (internal/http2/core.js:756:26)
Emitted 'error' event on ClientHttp2Session instance at:
    at emitClose (internal/http2/core.js:1010:10)
    at internal/http2/core.js:1048:7
    at finish (internal/streams/writable.js:731:5)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  code: 'ERR_HTTP2_ERROR',
  errno: -505
}
```

The test then calls `session.close()` which tries to write to a
destroyed socket. As a result, an unhandled `ECONNRESET` error is
emitted in the v12 release line.

PR-URL: https://github.com/nodejs/node/pull/35482
Refs: https://github.com/nodejs/node/pull/34859
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-10-09 16:28:01 +02:00
Anna Henningsen
1d5fa88eb8 cli: add --node-memory-debug option
Add a public switch that turns on features for debugging memory
leaks inside of Node.js core.

PR-URL: https://github.com/nodejs/node/pull/35537
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2020-10-09 06:13:50 -07:00
Rich Trott
936ce85c0b doc: use sentence case for class property
Change the one instance of the Class Property heading in our docs to
Class property to match style with other headers.

PR-URL: https://github.com/nodejs/node/pull/35540
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-10-09 06:10:16 -07:00
cclauss
c8b950a7af build: gitHub actions: Python 3.9 and actions/setup-python@v2
PR-URL: https://github.com/nodejs/node/pull/35521
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-10-09 03:36:15 +00:00
Antoine du Hamel
78f2b11ecd doc: add history entry for exports patterns
PR-URL: https://github.com/nodejs/node/pull/35410
Refs: https://github.com/nodejs/node/pull/34718
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-09 01:01:52 +02:00
Antoine du Hamel
ef1af47b26 doc: fix deprecation history
PR-URL: https://github.com/nodejs/node/pull/35455
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-08 22:53:19 +00:00
Antoine du Hamel
96c37b3312 doc: fix util.inspect change history
PR-URL: https://github.com/nodejs/node/pull/35528
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-10-08 22:44:04 +00:00
Yohanan Baruchel
f512ce6aa0 lib: change http client path assignment
- change http client path assignment from  to  (it's more
appropriate in this case).
- since the inner condition is the only referencing the variable, moved
the assignment to the inner condition.

PR-URL: https://github.com/nodejs/node/pull/35508
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
2020-10-08 21:42:39 +00:00
Ian Sutherland
4e9f3cc6fe
fs: add rm method
This PR introduces a new method fs.rm that provides the behaviour of
rimraf when used with the recursive: true and force: true options.

PR-URL: https://github.com/nodejs/node/pull/35494
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruy Adorno <ruyadorno@github.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2020-10-08 13:23:44 -07:00
Shelley Vohr
6141ca318a
build: improved release lint error message
PR-URL: https://github.com/nodejs/node/pull/35523
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-10-08 11:22:04 -07:00
Rich Trott
ce84bacdc6 doc: improve kbd element rendering
* better vertical alignment with text
* slightly larger "key" size
* remove top light area (from box-shadow)

PR-URL: https://github.com/nodejs/node/pull/35497
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-10-08 04:43:42 -07:00
Aastha Gupta
0f41bcabf3 src: fix freeing unintialized pointer bug in ParseSoaReply
ares_expand_name doesn't guarantee that pointer variable is initialized
if return code is ARES_EBADNAME or ARES_ENOMEM. But current usage of the
function in the codebase thinks otherwise.

There seems to be an assumption that pointer is always initialized even
though it is a local variable and we create a unique pointer soon after
calling ares_expand_name. This could potentially crash the program with
an invalid free pointer.

I was able to crash it by poisoning the memory and some manual hooks.

By moving the unique_ptr after checking the return code we can fix the
problem. As the underlying function guarantees that pointer is
initialized when the status is ARES_SUCCESS.

PR-URL: https://github.com/nodejs/node/pull/35502
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-08 04:38:46 -07:00
Anna Henningsen
ee5f849fda src: fix compiler warning in env.cc
../src/env.cc:1227:22: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
      ForEachBaseObject([this](BaseObject* obj) {
                     ^~~~

PR-URL: https://github.com/nodejs/node/pull/35547
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-10-08 09:51:09 +00:00
Shelley Vohr
ccc822c7c8
src: expose v8::Isolate setup callbacks
PR-URL: https://github.com/nodejs/node/pull/35512
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-07 18:32:53 -07:00