Commit Graph

34023 Commits

Author SHA1 Message Date
Voltrex
672a8a38b6 src: add JSDoc typings for v8
Added JSDoc typings for the `v8` lib module.

PR-URL: https://github.com/nodejs/node/pull/38944
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-07-07 18:16:10 -04:00
Jacob
6a4b4ce488 doc: add annotation to writeFile data as Object
Fixes: https://github.com/nodejs/node/issues/39152

PR-URL: https://github.com/nodejs/node/pull/39167
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-07-07 21:38:20 +00:00
Rich Trott
92573721c7 doc: fix boldface punctuation for full sentences
If an entire sentence is in boldface, then generally the terminating
punctuation should as well.

PR-URL: https://github.com/nodejs/node/pull/39278
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-07-07 11:01:08 -07:00
Robert Nagy
a8a86387fa tty: enable buffering
HWM was set to 0 which would cause e.g. stdout.write(...) to
always return false.

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

PR-URL: https://github.com/nodejs/node/pull/39253
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-07-07 14:50:47 +02:00
Cyrille Bourgois
9b68d84656 doc: fix constants usage in fs.access example
PR-URL: https://github.com/nodejs/node/pull/39289
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-07-07 09:00:09 +00:00
Michael Dawson
4de6f207dc doc: use "repository" in guides versus repo
Fix remaining instances in the guides where we
use repo instead of repository.

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

PR-URL: https://github.com/nodejs/node/pull/39198
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2021-07-06 08:51:37 -04:00
Rich Trott
12622c5f86 test: remove workaround code in debugger test
Remove code that made a check more lenient to account for a known issue
that is no longer reproducible.

Refs: https://github.com/nodejs/node-inspect/issues/35

PR-URL: https://github.com/nodejs/node/pull/39238
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
2021-07-05 21:17:55 -07:00
Michaël Zasso
d45e0ebd4d tools: take ownership of deps/v8/tools/node
The files are not maintained nor used upstream anymore.

PR-URL: https://github.com/nodejs/node/pull/39222
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-07-06 01:40:54 +00:00
Richard Lau
953860b67c build: shorten path used in tarball build workflow
Shorten the path to the workspace for the GitHub Actions `build-tarball`
workflow to avoid `execvp: printf: Argument list too long` errors from
`make`.

GitHub currently runs workflows in a `/home/runner/work/my-repo/my-repo`
directory where `my-repo` is the repository name and is repeated twice
(the second is from the git checkout). Some of the command lines in the
Node.js build, e.g. the `ar` command to create static libraries, pass
several fully qualified paths to filenames so the workflow directory is
repeat many times. The most recent V8 update added more files to the
command and has now tipped the command line length over the maximum
allowed when using forks of the `node` repository with a longer name
(e.g. `node-auto-test` and the private fork used to prepare security
releases).

Use GitHub's `RUNNER_TEMP` environment variable to extract the source
tarball into the temporary directory on the GitHub runner. This is
currently `/home/runner/work/_temp` and is not dependent on the name
of the repository.

PR-URL: https://github.com/nodejs/node/pull/39192
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-07-05 23:45:56 +00:00
Michael Dawson
ce666d769d doc: update Node-api version matrix
- add 14.x version in which Node-api version 8
  was added.

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

PR-URL: https://github.com/nodejs/node/pull/39197
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2021-07-05 18:28:10 -04:00
Rich Trott
2fd687ae1f doc: remove onboarding-extras
Migrate last bit of onboarding-extras content to collaborator-guide and
remove onboarding-extras.

PR-URL: https://github.com/nodejs/node/pull/39252
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-07-05 14:01:20 -07:00
Rich Trott
b31c6c91ec doc: move Sam Ruby to emeritus
Sam confirmed in email that they are not opposed to moving to emeritus
at this time.

PR-URL: https://github.com/nodejs/node/pull/39264
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sam Ruby <rubys@intertwingly.net>
2021-07-05 13:55:16 -07:00
cjihrig
6dfdb0a37c tools: update ESLint to 7.30.0
Update ESLint to 7.30.0

PR-URL: https://github.com/nodejs/node/pull/39242
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-07-05 20:07:02 +00:00
Beth Griggs
70cf0dce4e 2021-07-05, Version 16.4.2 (Current)
Notable changes:

Node.js 16.4.1 introduced a regression in the Windows installer on
non-English locales that is being fixed in this release. There is no
need to download this release if you are not using the Windows
installer.

PR-URL: https://github.com/nodejs/node/pull/39270
2021-07-05 18:23:26 +01:00
Rich Trott
c3952cf1d2 doc: update AUTHORS file
PR-URL: https://github.com/nodejs/node/pull/39250
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-07-05 09:27:03 -07:00
Richard Lau
ef3969542d 2021-07-05, Version v14.17.3 'Fermium' (LTS)
Notable changes:

Node.js 14.17.2 introduced a regression in the Windows installer on
non-English locales that is being fixed in this release. There is no
need to download this release if you are not using the Windows
installer.

PR-URL: https://github.com/nodejs/node/pull/39269
2021-07-05 17:03:09 +01:00
Richard Lau
cf1abe4b88 2021-07-05, Version 12.22.3 'Erbium' (LTS)
Notable changes:

Node.js 12.22.2 introduced a regression in the Windows installer on
non-English locales that is being fixed in this release. There is no
need to download this release if you are not using the Windows
installer.

PR-URL: https://github.com/nodejs/node/pull/39268
2021-07-05 16:50:08 +01:00
Michaël Zasso
3cce8f5add meta: use form schema for bug report template
PR-URL: https://github.com/nodejs/node/pull/39194
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-07-05 15:17:36 +00:00
Darshan Sen
b2ae12d422 stream: throw on premature close in Readable[AsyncIterator]
Fixes: https://github.com/nodejs/node/issues/39086
Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/39117
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-07-05 15:17:28 +00:00
npm-robot
3590b5db55 deps: upgrade npm to 7.19.1
PR-URL: https://github.com/nodejs/node/pull/39225
Reviewed-By: Ruy Adorno <ruyadorno@github.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-07-05 11:05:13 -04:00
Richard Lau
e9cf12057d win,msi: use localized "Authenticated Users" name
Well known user account names are localized on Windows. Look up the
"Authenticated Users" user by its security identifier to get the
localized name.

PR-URL: https://github.com/nodejs/node/pull/39241
Fixes: https://github.com/nodejs/node/issues/39224
Refs: e817ba70f5
Refs: https://hackerone.com/reports/1211160
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-07-05 07:54:40 -04:00
Anna Henningsen
64e4837011 readline: allow completer to rewrite existing input
Sometimes, it makes sense for a completer to change the existing
input, e.g. by adjusting the casing (imagine a completer that
corrects `Number.isNan` to `Number.IsNaN`, for example).

This commit allows that in the readline implemention.

PR-URL: https://github.com/nodejs/node/pull/39178
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-07-05 11:27:36 +00:00
legendecas
392213a387 node-api: cctest on v8impl::Reference
PR-URL: https://github.com/nodejs/node/pull/38970
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
2021-07-05 13:55:51 +08:00
Robert Nagy
0738a2b7bd stream: finished should error on errored stream
Calling finished before or after a stream has errored or closed
should end up with the same behavior.

PR-URL: https://github.com/nodejs/node/pull/39235
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-07-04 20:52:39 -07:00
Rich Trott
68548fd661 doc: fix color contrast for anchor marks in dark mode
Currently, in its dark mode, our website background color is #090C15 and
our anchor marks are #707070 for a contrast ratio of 3.94 to 1, falling
short of the WCAG AA 4.5 to 1. This changes the mark color in dark mode
only to #7A7A7A for a color contrast of 4.55 to 1.

PR-URL: https://github.com/nodejs/node/pull/39168
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-07-04 19:57:42 -07:00
Rich Trott
8703d22c4f tools: remove armv6 from test tools
CI no longer tests armv6.

PR-URL: https://github.com/nodejs/node/pull/39162
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-07-04 19:56:09 -07:00
Rich Trott
62321267b0 test: remove checks for armv6
We no longer have armv6 in our regular CI. Remove checks.

PR-URL: https://github.com/nodejs/node/pull/39162
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-07-04 19:56:07 -07:00
Rich Trott
c2e6822153 test: move test-debugger-address to parallel
The test uses `--inspect=0` so it uses an OS-selected port rather than
the default port. This means it can be run in the parallel directory.

PR-URL: https://github.com/nodejs/node/pull/39236
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-07-04 07:42:48 -07:00
Rich Trott
2d542f5cb5 tools: update path-parse to 1.0.7
path-parse 1.0.6 is vulnerable to ReDoS. Update to 1.0.7. Uh, not that a
ReDoS is likely to affect us in this tool.

Refs: 09e1086512

PR-URL: https://github.com/nodejs/node/pull/39232
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-07-04 07:41:31 -07:00
Rich Trott
32b6f4be53 test: remove common.enoughTestCpu
All hosts in CI return true for common.enoughTestCpu. At least for our
CI, it is always true, so we can remove it.

PR-URL: https://github.com/nodejs/node/pull/39161
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-07-04 07:26:59 -07:00
Mary Marchini
7868062ddb meta: add @nodejs/actions as CODEOWNERS
PR-URL: https://github.com/nodejs/node/pull/39119
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-07-04 06:26:43 +00:00
FrankEntriken
92fde1ea70 doc: rename datatypes to data types
PR-URL: https://github.com/nodejs/node/pull/39209
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2021-07-03 16:54:21 -07:00
Rich Trott
dcea251435 doc: normalize CSS variable names and indentation
PR-URL: https://github.com/nodejs/node/pull/39199
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-07-03 10:27:14 -07:00
Rich Trott
e8b086228a doc: remove unnecessary module format comments
Now that the docs have toggles for CJS vs. ESM, there is no need to
include a comment explaining which module type is being used.

PR-URL: https://github.com/nodejs/node/pull/39219
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-07-03 10:25:52 -07:00
Richard Lau
8f3d0d6c6a tools: remove unused lint-pr-commit-message.sh
`tools/lint-pr-commit-message.sh` was previously used to lint the
commit message of the first commit in a pull request but is now no
longer used -- commit message linting is now done in a GitHub actions
workflow which does not call this script.

PR-URL: https://github.com/nodejs/node/pull/39120
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-07-03 16:44:50 +00:00
Rich Trott
975bbbc443 doc: use more consistent formatting for deprecations
Most deprecations do not end with a full-stop/period, but three of them
do. Well, not anymore after this change.

PR-URL: https://github.com/nodejs/node/pull/39218
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-07-03 07:45:58 -07:00
Rich Trott
a1f07e5a25 doc: update AUTHORS
Thinking it is probably better to run this frequently and do small quick
timely updates to AUTHORS rather than waiting months like we usually do
and having a lot of little issues to sort out. If this works well, maybe
it can be a scheduled GitHub Action or something the bot does for us.

PR-URL: https://github.com/nodejs/node/pull/39217
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-07-03 07:44:39 -07:00
Rich Trott
5e8aeac93f doc: use "pull request" instead of "PR" in packages.md
PR-URL: https://github.com/nodejs/node/pull/39213
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-07-03 07:43:09 -07:00
Rich Trott
9b99037798 doc: move v8.stopCoverage() to expected location in doc
PR-URL: https://github.com/nodejs/node/pull/39212
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-07-03 07:41:37 -07:00
Rich Trott
9ad96e2889 doc: move vm.measureMemory() to expected location in doc
PR-URL: https://github.com/nodejs/node/pull/39211
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2021-07-03 07:35:20 -07:00
Rich Trott
ebcef6872a tools: update @babel/eslint-parser to 7.14.7
PR-URL: https://github.com/nodejs/node/pull/39160
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-07-03 07:32:58 -07:00
Guy Bedford
8189dcc52a repl: ensure correct syntax err for await parsing
PR-URL: https://github.com/nodejs/node/pull/39154
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-07-02 15:52:11 -07:00
Robert Nagy
954217adda stream: error Duplex write/read if not writable/readable
If writable/readable has been explicitly disabled then using
a Duplex as writable/readable should fail.

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

PR-URL: https://github.com/nodejs/node/pull/34385
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-07-02 22:11:16 +02:00
Joyee Cheung
1544e69b93 inspector: move inspector async hooks to environment
Since async hooks are per-environment and putting them in
the environment allows us to serialize them for the
snapshot automatically.

PR-URL: https://github.com/nodejs/node/pull/39112
Refs: https://github.com/nodejs/node/pull/38905
Refs: https://github.com/nodejs/node/issues/35711
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-07-02 22:13:25 +08:00
Robert Nagy
320339630d stream: use finished for pump
Re-use existing compat logic for pump by using
finished.

PR-URL: https://github.com/nodejs/node/pull/39203
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-07-02 10:12:45 +02:00
Rich Trott
97bd33cefd tools: update remark-preset-lint-node to 2.4.1
PR-URL: https://github.com/nodejs/node/pull/39201
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-07-01 23:25:14 -07:00
Richard Lau
e5f9ef62f6 doc: fix CHANGELOG.md formatting
Fix typo for line break tag.

PR-URL: https://github.com/nodejs/node/pull/39223
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-07-02 05:45:26 +02:00
AkshayK
e817ba70f5 win,msi: set install directory permission
Explicitly set permission for Windows install directory.

Refs: https://hackerone.com/reports/1211160
PR-URL: https://github.com/nodejs-private/node-private/pull/269
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-07-01 15:45:27 +01:00
Ben Noordhuis
cac4f90468 deps: uv: cherry-pick 99c29c9c2c9b
Original commit message:

    idna: fix OOB read in punycode decoder

    Reported by Eric Sesterhenn in collaboration with
    Cure53 and ExpressVPN.

    Reported-By: Eric Sesterhenn <eric.sesterhenn@x41-dsec.de>
    PR-URL: https://github.com/libuv/libuv-private/pull/1
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Richard Lau <rlau@redhat.com>

CVE-ID: CVE-2021-22918
Refs: https://hackerone.com/reports/1209681
PR-URL: https://github.com/nodejs-private/node-private/pull/267
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-07-01 15:45:01 +01:00
Beth Griggs
5ba2442e82 2021-07-01, Version 16.4.1 (Current)
This is a security release.

Notable changes:

Vulnerabilities fixed:

- **CVE-2021-22918**: libuv upgrade - Out of bounds read (Medium)
- **CVE-2021-22921**: Windows installer - Node Installer Local Privilege Escalation (Medium)

PR-URL: https://github.com/nodejs-private/node-private/pull/271
2021-07-01 15:37:30 +01:00