Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v19.3.0 release proposal #45831

Merged
merged 97 commits into from
Dec 14, 2022
Merged
Changes from 1 commit
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
c842120
deps: patch V8 to 10.8.168.21
targos Dec 5, 2022
c9cbd1d
test_runner: remove stdout and stderr from error
cjihrig Nov 25, 2022
60c9ac5
deps: update nghttp2 to 1.51.0
anonrig Nov 25, 2022
3a02d50
doc: add link to doc with social processes
mhdawson Nov 22, 2022
7892e23
repl: do not define `wasi` on global with no flag
cola119 Nov 26, 2022
358e2fe
test,crypto: update WebCryptoAPI WPT
panva Nov 21, 2022
de2b6b9
crypto: ensure "x" is present when importing private CFRG webcrypto keys
panva Nov 21, 2022
40037b4
crypto: fix X25519 and X448 webcrypto public CryptoKey usages
panva Nov 21, 2022
9e2e3de
crypto: use DataError for webcrypto keyData import failures
panva Nov 21, 2022
9cd106e
crypto: use DataError for CFRG webcrypto raw and jwk import key checks
panva Nov 21, 2022
d030963
crypto: validate CFRG webcrypto JWK import "d" and "x" are a pair
panva Nov 21, 2022
7cc9998
crypto: fix ECDH webcrypto public CryptoKey usages
panva Nov 21, 2022
845f805
crypto: refactor verify acceptable key usage functions
panva Nov 22, 2022
aabfdef
doc: use console.error for error case in fs, https, net and process
deokjinkim Nov 26, 2022
56eee72
stream: use structuredClone instead of v8
anonrig Nov 27, 2022
049ef34
meta: update AUTHORS
nodejs-github-bot Nov 27, 2022
1784768
buffer: make decodeUTF8 params loose
anonrig Nov 27, 2022
d272faa
fs: fix `nonNativeWatcher` leak of `StatWatchers`
MoLow Nov 17, 2022
fbd2d27
deps: update corepack to 0.15.2
nodejs-github-bot Nov 27, 2022
573eab9
crypto: refactor ArrayBuffer to bigint conversion utils
aduh95 Nov 27, 2022
2e767bf
doc: move os.machine() docs to sorted position
cjihrig Nov 27, 2022
e431612
fs: fix `nonNativeWatcher` watching folder with existing files
MoLow Nov 27, 2022
efc4456
test_runner: add getter and setter to MockTracker
fossamagna Nov 18, 2022
b55bd6e
test: fix typos in test/parallel
deokjinkim Nov 28, 2022
23ff505
doc: define "react-native" community condition
huntie Nov 28, 2022
818028c
src: rename internal module declaration as internal bindings
legendecas Nov 20, 2022
1b98f17
tools: update doc to highlight.js@11.7.0
nodejs-github-bot Nov 29, 2022
238fc64
tools: update lint-md-dependencies to rollup@3.4.0
nodejs-github-bot Nov 29, 2022
027e738
doc: add `options` parameter to eventTarget.removeEventListener
deokjinkim Nov 29, 2022
c0df265
doc: fix actual result of example is different in stream
deokjinkim Nov 29, 2022
c527741
diagnostics_channel: fix diagnostics channel memory leak
theanarkh Nov 29, 2022
c9cba2e
src: use `enum class` instead of `enum` in node_i18n
deokjinkim Nov 30, 2022
4fb7cf8
doc: add missing line in debugger
deokjinkim Nov 30, 2022
6b15994
deps: update undici to 5.13.0
nodejs-github-bot Nov 30, 2022
b010820
doc: add Rafael to the tsc
mhdawson Nov 30, 2022
eb9a383
meta: update AUTHORS info for nstepien
nstepien Nov 30, 2022
1b92028
doc: move streaming instruc to doc/contributing
mhdawson Nov 22, 2022
a79f37a
lib: add missing type of removeEventListener in question
deokjinkim Dec 1, 2022
cd36250
test: fix test-watch-mode-inspect
StefanStojanovic Dec 1, 2022
7647250
test: fix test-watch-mode
StefanStojanovic Dec 1, 2022
a6e2cf2
meta: add .mailmap entry for Stefan Stojanovic
Trott Dec 1, 2022
3e48536
test_runner: don't parse TAP from stderr
cjihrig Dec 2, 2022
99410ef
lib: added SuiteContext class
debadree25 Dec 2, 2022
d64e773
http: make `OutgoingMessage` more streamlike
ronag Dec 2, 2022
e124e2a
doc: use console.error for error case in child_process and dgram
deokjinkim Dec 2, 2022
801fe30
doc: add detail on how api docs are published
mhdawson Nov 25, 2022
79edf25
src: cleanup on disambiguating native modules
mhdawson Nov 28, 2022
418ae9b
tools: remove dependency vulnerability checker
facutuesca Dec 3, 2022
9f51b9e
doc: add doc-only deprecation for headers/trailers setters
Trott Dec 3, 2022
b8b13dc
net: add autoSelectFamily and autoSelectFamilyAttemptTimeout options
ShogunPanda Dec 3, 2022
324ae3d
tools: add GitHub token permissions to label flaky-test issues
gabibguti Dec 4, 2022
376f346
meta: update AUTHORS
nodejs-github-bot Dec 4, 2022
1d823a6
Revert "deps: fix zlib compilation for CPUs without SIMD features"
lpinca Nov 22, 2022
09bc89d
build: rework gyp files for zlib
richardlau Apr 24, 2020
d384b73
tools: update lint-md-dependencies
nodejs-github-bot Dec 4, 2022
029060e
doc: fix actual result of example is different in events
deokjinkim Dec 6, 2022
7718ff8
doc: using console.error for error cases in crypto and events
emirgoren Dec 7, 2022
677eb62
deps: upgrade npm to 9.1.3
npm-cli-bot Dec 7, 2022
4c51c5c
test: fix -Wunused-variable on report-fatalerror
santigimeno Dec 8, 2022
b9c2fc7
net: check `autoSelectFamilyAttemptTimeout` is positive
deokjinkim Dec 5, 2022
102c2dc
benchmark: make benchmarks runnable in older versions of Node.js
joyeecheung Dec 8, 2022
6bc7b7e
test_runner: add resetCalls to MockFunctionContext
fossamagna Dec 8, 2022
8c728d2
doc: disambiguate `native module` to `addon`
daeyeon Nov 29, 2022
353339a
lib: disambiguate `native module` to `builtin module`
daeyeon Nov 29, 2022
9f7bb5c
lib: disambiguate `native module` to `binding`
daeyeon Nov 29, 2022
e874508
lib: check number of arguments in `EventTarget`'s function
deokjinkim Dec 9, 2022
9d6af61
doc: add args of filter option of fs.cp
fossamagna Dec 9, 2022
2e4d37e
crypto: fix CipherBase Update int32 overflow
marco-ippolito Dec 9, 2022
75dbce9
deps: upgrade npm to 9.2.0
npm-cli-bot Dec 9, 2022
e2caf7c
bootstrap: lazy load non-essential modules
joyeecheung Dec 9, 2022
382efdf
benchmark: add variety of inputs to text-encoder
anonrig Dec 10, 2022
691f58e
tls: remove trustcor root ca certificates
bnoordhuis Dec 10, 2022
6962ef0
readline: improve robustness against prototype mutation
aduh95 Dec 10, 2022
302c524
lib: allow Writeable.toWeb() to work on http.Outgoing message
debadree25 Dec 10, 2022
81ab540
src: mark generated `snapshot_data` as `const`
addaleax Dec 10, 2022
95a23e2
build: add python 3.11 support for android
VoltrexKeyva Dec 11, 2022
e075046
meta: update AUTHORS
nodejs-github-bot Dec 11, 2022
b35ebeb
src: make structuredClone work for process.env
bnoordhuis Dec 11, 2022
8a03684
src: simplify NodeBIO::GetMethod initialization
addaleax Dec 11, 2022
d1bd779
test_runner: don't use a symbol for runHook()
cjihrig Dec 6, 2022
4165dcd
test_runner: add t.after() hook
cjihrig Dec 8, 2022
5d7cd36
src: add uvwasi version
MrJithil Dec 11, 2022
5c4475d
test: fix invalid output TAP if there newline in test name
pulkit-30 Dec 11, 2022
cee6f38
watch: add CLI flag to preserve output
debadree25 Dec 11, 2022
ffc0f3d
test_runner: refactor `tap_parser` to use more primordials
aduh95 Dec 11, 2022
924f6ab
test: order list alphabetically in `test-bootstrap-modules`
aduh95 Dec 11, 2022
03db415
build: disable v8 snapshot compression by default
joyeecheung Dec 2, 2022
424419c
test_runner: refactor `tap_lexer` to use more primordials
aduh95 Dec 12, 2022
8a90f5c
doc: buffer.fill empty value
marco-ippolito Dec 12, 2022
b297dd5
test: remove flaky parallel/test-process-wrap test
bnoordhuis Dec 12, 2022
470384e
util: use private symbols in JS land directly
joyeecheung Nov 4, 2022
2fbe2f9
src,lib: group properties used as constants from `util` binding
daeyeon Nov 24, 2022
349b4f8
src: add internal isArrayBufferDetached
anonrig Nov 27, 2022
49840d4
buffer: remove unnecessary lazy loading
aduh95 Dec 12, 2022
b5b56b6
crypto: simplify lazy loading of internal modules
aduh95 Dec 12, 2022
ed8ae88
lib: remove unnecessary lazy loading in `internal/encoding`
aduh95 Dec 12, 2022
84aabcf
2022-12-14, Version 19.3.0 (Current)
targos Dec 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
deps: upgrade npm to 9.2.0
PR-URL: #45780
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
npm-cli-bot authored and targos committed Dec 13, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 75dbce9a071d839484df6e2764464a8b69db282a
8 changes: 5 additions & 3 deletions deps/npm/docs/content/commands/npm-doctor.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ description: Check your npm environment
### Synopsis

```bash
npm doctor
npm doctor [ping] [registry] [versions] [environment] [permissions] [cache]
```

Note: This command is unaware of workspaces.
@@ -33,8 +33,10 @@ Also, in addition to this, there are also very many issue reports due to
using old versions of npm. Since npm is constantly improving, running
`npm@latest` is better than an old version.

`npm doctor` verifies the following items in your environment, and if there
are any recommended changes, it will display them.
`npm doctor` verifies the following items in your environment, and if
there are any recommended changes, it will display them. By default npm
runs all of these checks. You can limit what checks are ran by
specifying them as extra arguments.

#### `npm ping`

2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm-ls.md
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For
example, running `npm ls promzard` in npm's source tree will show:

```bash
npm@9.1.3 /path/to/npm
npm@9.2.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
```
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm.md
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ npm

### Version

9.1.3
9.2.0

### Description

8 changes: 5 additions & 3 deletions deps/npm/docs/output/commands/npm-doctor.html
Original file line number Diff line number Diff line change
@@ -146,7 +146,7 @@ <h2 id="table-of-contents">Table of contents</h2>
</section>

<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre><code class="language-bash">npm doctor
<pre><code class="language-bash">npm doctor [ping] [registry] [versions] [environment] [permissions] [cache]
</code></pre>
<p>Note: This command is unaware of workspaces.</p>
<h3 id="description">Description</h3>
@@ -167,8 +167,10 @@ <h3 id="description">Description</h3>
<p>Also, in addition to this, there are also very many issue reports due to
using old versions of npm. Since npm is constantly improving, running
<code>npm@latest</code> is better than an old version.</p>
<p><code>npm doctor</code> verifies the following items in your environment, and if there
are any recommended changes, it will display them.</p>
<p><code>npm doctor</code> verifies the following items in your environment, and if
there are any recommended changes, it will display them. By default npm
runs all of these checks. You can limit what checks are ran by
specifying them as extra arguments.</p>
<h4 id="npm-ping"><code>npm ping</code></h4>
<p>By default, npm installs from the primary npm registry,
<code>registry.npmjs.org</code>. <code>npm doctor</code> hits a special ping endpoint within the
2 changes: 1 addition & 1 deletion deps/npm/docs/output/commands/npm-ls.html
Original file line number Diff line number Diff line change
@@ -160,7 +160,7 @@ <h3 id="description">Description</h3>
the results to only the paths to the packages named. Note that nested
packages will <em>also</em> show the paths to the specified packages. For
example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
<pre><code class="language-bash">npm@9.1.3 /path/to/npm
<pre><code class="language-bash">npm@9.2.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre>
2 changes: 1 addition & 1 deletion deps/npm/docs/output/commands/npm.html
Original file line number Diff line number Diff line change
@@ -149,7 +149,7 @@ <h2 id="table-of-contents">Table of contents</h2>
<pre><code class="language-bash">npm
</code></pre>
<h3 id="version">Version</h3>
<p>9.1.3</p>
<p>9.2.0</p>
<h3 id="description">Description</h3>
<p>npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
2 changes: 1 addition & 1 deletion deps/npm/lib/commands/completion.js
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ const BaseCommand = require('../base-command.js')
class Completion extends BaseCommand {
static description = 'Tab Completion for npm'
static name = 'completion'
static ignoreImplicitWorkspace = false
static ignoreImplicitWorkspace = true

// completion for the completion command
async completion (opts) {
230 changes: 162 additions & 68 deletions deps/npm/lib/commands/doctor.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
const cacache = require('cacache')
const fs = require('fs')
const fetch = require('make-fetch-happen')
const table = require('text-table')
const Table = require('cli-table3')
const which = require('which')
const pacote = require('pacote')
const { resolve } = require('path')
const semver = require('semver')
const { promisify } = require('util')
const log = require('../utils/log-shim.js')
const ansiTrim = require('../utils/ansi-trim.js')
const ping = require('../utils/ping.js')
const {
registry: { default: defaultRegistry },
@@ -17,6 +16,7 @@ const lstat = promisify(fs.lstat)
const readdir = promisify(fs.readdir)
const access = promisify(fs.access)
const { R_OK, W_OK, X_OK } = fs.constants

const maskLabel = mask => {
const label = []
if (mask & R_OK) {
@@ -34,76 +34,105 @@ const maskLabel = mask => {
return label.join(', ')
}

const subcommands = [
{
groups: ['ping', 'registry'],
title: 'npm ping',
cmd: 'checkPing',
}, {
groups: ['versions'],
title: 'npm -v',
cmd: 'getLatestNpmVersion',
}, {
groups: ['versions'],
title: 'node -v',
cmd: 'getLatestNodejsVersion',
}, {
groups: ['registry'],
title: 'npm config get registry',
cmd: 'checkNpmRegistry',
}, {
groups: ['environment'],
title: 'git executable in PATH',
cmd: 'getGitPath',
}, {
groups: ['environment'],
title: 'global bin folder in PATH',
cmd: 'getBinPath',
}, {
groups: ['permissions', 'cache'],
title: 'Perms check on cached files',
cmd: 'checkCachePermission',
windows: false,
}, {
groups: ['permissions'],
title: 'Perms check on local node_modules',
cmd: 'checkLocalModulesPermission',
windows: false,
}, {
groups: ['permissions'],
title: 'Perms check on global node_modules',
cmd: 'checkGlobalModulesPermission',
windows: false,
}, {
groups: ['permissions'],
title: 'Perms check on local bin folder',
cmd: 'checkLocalBinPermission',
windows: false,
}, {
groups: ['permissions'],
title: 'Perms check on global bin folder',
cmd: 'checkGlobalBinPermission',
windows: false,
}, {
groups: ['cache'],
title: 'Verify cache contents',
cmd: 'verifyCachedFiles',
windows: false,
},
// TODO:
// group === 'dependencies'?
// - ensure arborist.loadActual() runs without errors and no invalid edges
// - ensure package-lock.json matches loadActual()
// - verify loadActual without hidden lock file matches hidden lockfile
// group === '???'
// - verify all local packages have bins linked
// What is the fix for these?
]
const BaseCommand = require('../base-command.js')
class Doctor extends BaseCommand {
static description = 'Check your npm environment'
static name = 'doctor'
static params = ['registry']
static ignoreImplicitWorkspace = false
static usage = [`[${subcommands.flatMap(s => s.groups)
.filter((value, index, self) => self.indexOf(value) === index)
.join('] [')}]`]

static subcommands = subcommands

// minimum width of check column, enough for the word `Check`
#checkWidth = 5

async exec (args) {
log.info('Running checkup')
let allOk = true

// each message is [title, ok, message]
const messages = []

const actions = [
['npm ping', 'checkPing', []],
['npm -v', 'getLatestNpmVersion', []],
['node -v', 'getLatestNodejsVersion', []],
['npm config get registry', 'checkNpmRegistry', []],
['which git', 'getGitPath', []],
...(process.platform === 'win32'
? []
: [
[
'Perms check on cached files',
'checkFilesPermission',
[this.npm.cache, true, R_OK],
], [
'Perms check on local node_modules',
'checkFilesPermission',
[this.npm.localDir, true, R_OK | W_OK, true],
], [
'Perms check on global node_modules',
'checkFilesPermission',
[this.npm.globalDir, false, R_OK],
], [
'Perms check on local bin folder',
'checkFilesPermission',
[this.npm.localBin, false, R_OK | W_OK | X_OK, true],
], [
'Perms check on global bin folder',
'checkFilesPermission',
[this.npm.globalBin, false, X_OK],
],
]),
[
'Verify cache contents',
'verifyCachedFiles',
[this.npm.flatOptions.cache],
],
// TODO:
// - ensure arborist.loadActual() runs without errors and no invalid edges
// - ensure package-lock.json matches loadActual()
// - verify loadActual without hidden lock file matches hidden lockfile
// - verify all local packages have bins linked
]
const actions = this.actions(args)
this.#checkWidth = actions.reduce((length, item) =>
Math.max(item.title.length, length), this.#checkWidth)

if (!this.npm.silent) {
this.output(['Check', 'Value', 'Recommendation/Notes'].map(h => this.npm.chalk.underline(h)))
}
// Do the actual work
for (const [msg, fn, args] of actions) {
const line = [msg]
for (const { title, cmd } of actions) {
const item = [title]
try {
line.push(true, await this[fn](...args))
} catch (er) {
line.push(false, er)
item.push(true, await this[cmd]())
} catch (err) {
item.push(false, err)
}
messages.push(line)
}

const outHead = ['Check', 'Value', 'Recommendation/Notes'].map(h => this.npm.chalk.underline(h))
let allOk = true
const outBody = messages.map(item => {
if (!item[1]) {
allOk = false
item[0] = this.npm.chalk.red(item[0])
@@ -112,18 +141,18 @@ class Doctor extends BaseCommand {
} else {
item[1] = this.npm.chalk.green('ok')
}
return item
})
const outTable = [outHead, ...outBody]
const tableOpts = {
stringLength: s => ansiTrim(s).length,
if (!this.npm.silent) {
this.output(item)
}
}

if (!this.npm.silent) {
this.npm.output(table(outTable, tableOpts))
}
if (!allOk) {
throw new Error('Some problems found. See above for recommendations.')
if (this.npm.silent) {
/* eslint-disable-next-line max-len */
throw new Error('Some problems found. Check logs or disable silent mode for recommendations.')
} else {
throw new Error('Some problems found. See above for recommendations.')
}
}
}

@@ -191,6 +220,35 @@ class Doctor extends BaseCommand {
}
}

async getBinPath (dir) {
const tracker = log.newItem('getBinPath', 1)
tracker.info('getBinPath', 'Finding npm global bin in your PATH')
if (!process.env.PATH.includes(this.npm.globalBin)) {
throw new Error(`Add ${this.npm.globalBin} to your $PATH`)
}
return this.npm.globalBin
}

async checkCachePermission () {
return this.checkFilesPermission(this.npm.cache, true, R_OK)
}

async checkLocalModulesPermission () {
return this.checkFilesPermission(this.npm.localDir, true, R_OK | W_OK, true)
}

async checkGlobalModulesPermission () {
return this.checkFilesPermission(this.npm.globalDir, false, R_OK)
}

async checkLocalBinPermission () {
return this.checkFilesPermission(this.npm.localBin, false, R_OK | W_OK | X_OK, true)
}

async checkGlobalBinPermission () {
return this.checkFilesPermission(this.npm.globalBin, false, X_OK)
}

async checkFilesPermission (root, shouldOwn, mask, missingOk) {
let ok = true

@@ -264,7 +322,7 @@ class Doctor extends BaseCommand {
try {
return await which('git').catch(er => {
tracker.warn(er)
throw "Install git and ensure it's in your PATH."
throw new Error("Install git and ensure it's in your PATH.")
})
} finally {
tracker.finish()
@@ -312,6 +370,42 @@ class Doctor extends BaseCommand {
return `using default registry (${defaultRegistry})`
}
}

output (row) {
const t = new Table({
chars: { top: '',
'top-mid': '',
'top-left': '',
'top-right': '',
bottom: '',
'bottom-mid': '',
'bottom-left': '',
'bottom-right': '',
left: '',
'left-mid': '',
mid: '',
'mid-mid': '',
right: '',
'right-mid': '',
middle: ' ' },
style: { 'padding-left': 0, 'padding-right': 0 },
colWidths: [this.#checkWidth, 6],
})
t.push(row)
this.npm.output(t.toString())
}

actions (params) {
return this.constructor.subcommands.filter(subcmd => {
if (process.platform === 'win32' && subcmd.windows === false) {
return false
}
if (params.length) {
return params.some(param => subcmd.groups.includes(param))
}
return true
})
}
}

module.exports = Doctor
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-access.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "NPM-ACCESS" "1" "November 2022" "" ""
.TH "NPM-ACCESS" "1" "December 2022" "" ""
.SH "NAME"
\fBnpm-access\fR - Set access level on published packages
.SS "Synopsis"
Loading