diff options
author | npm CLI robot <npm-cli+bot@github.com> | 2023-01-18 09:48:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 14:48:47 +0000 |
commit | ad16a75941437259199beb3fe7c0fcac15b4e6aa (patch) | |
tree | b2c00db7a3d717a72d38dfe56cc69f44f0d15601 /deps/npm/lib | |
parent | dc06df31b6b69a6f5d2d2fceaddf82bda7a66fc2 (diff) | |
download | node-new-ad16a75941437259199beb3fe7c0fcac15b4e6aa.tar.gz |
deps: upgrade npm to 9.3.1
PR-URL: https://github.com/nodejs/node/pull/46242
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'deps/npm/lib')
-rw-r--r-- | deps/npm/lib/commands/ci.js | 2 | ||||
-rw-r--r-- | deps/npm/lib/commands/deprecate.js | 24 |
2 files changed, 14 insertions, 12 deletions
diff --git a/deps/npm/lib/commands/ci.js b/deps/npm/lib/commands/ci.js index a2c61044eb..4dd7898dc6 100644 --- a/deps/npm/lib/commands/ci.js +++ b/deps/npm/lib/commands/ci.js @@ -67,7 +67,7 @@ class CI extends ArboristWorkspaceCmd { const path = `${where}/node_modules` // get the list of entries so we can skip the glob for performance const entries = await fs.readdir(path, null).catch(er => []) - return Promise.all(entries.map(f => fs.rm(`${path}/${f}`, { force: true }))) + return Promise.all(entries.map(f => fs.rm(`${path}/${f}`, { force: true, recursive: true }))) }) await arb.reify(opts) diff --git a/deps/npm/lib/commands/deprecate.js b/deps/npm/lib/commands/deprecate.js index 1e1b8994c5..844d5f60a0 100644 --- a/deps/npm/lib/commands/deprecate.js +++ b/deps/npm/lib/commands/deprecate.js @@ -52,19 +52,21 @@ class Deprecate extends BaseCommand { query: { write: true }, }) - Object.keys(packument.versions) + const versions = Object.keys(packument.versions) .filter(v => semver.satisfies(v, spec, { includePrerelease: true })) - .forEach(v => { - packument.versions[v].deprecated = msg - }) - return otplease(this.npm, this.npm.flatOptions, opts => fetch(uri, { - ...opts, - spec: p, - method: 'PUT', - body: packument, - ignoreBody: true, - })) + if (versions.length) { + for (const v of versions) { + packument.versions[v].deprecated = msg + } + return otplease(this.npm, this.npm.flatOptions, opts => fetch(uri, { + ...opts, + spec: p, + method: 'PUT', + body: packument, + ignoreBody: true, + })) + } } } |