Skip to content

Commit

Permalink
deps: upgrade npm to 8.5.3
Browse files Browse the repository at this point in the history
PR-URL: #42205
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
npm-robot authored and danielleadams committed Apr 24, 2022
1 parent 436bdde commit 6b721d7
Show file tree
Hide file tree
Showing 243 changed files with 2,363 additions and 2,447 deletions.
2 changes: 1 addition & 1 deletion deps/npm/docs/output/commands/npm-ls.html
Expand Up @@ -166,7 +166,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 lang="bash"><code>npm@8.5.2 /path/to/npm
<pre lang="bash"><code>npm@8.5.3 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre>
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/output/commands/npm.html
Expand Up @@ -149,7 +149,7 @@ <h2 id="table-of-contents">Table of contents</h2>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="version">Version</h3>
<p>8.5.2</p>
<p>8.5.3</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
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/arborist-cmd.js
Expand Up @@ -14,6 +14,8 @@ class ArboristCmd extends BaseCommand {
'include-workspace-root',
]

static ignoreImplicitWorkspace = false

async execWorkspaces (args, filters) {
await this.setWorkspaces(filters)
return this.exec(args)
Expand Down
4 changes: 4 additions & 0 deletions deps/npm/lib/base-command.js
Expand Up @@ -20,6 +20,10 @@ class BaseCommand {
return this.constructor.description
}

get ignoreImplicitWorkspace () {
return this.constructor.ignoreImplicitWorkspace
}

get usage () {
let usage = `npm ${this.constructor.name}\n\n`
if (this.constructor.description) {
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/access.js
Expand Up @@ -27,6 +27,8 @@ class Access extends BaseCommand {
'otp',
]

static ignoreImplicitWorkspace = true

static usage = [
'public [<package>]',
'restricted [<package>]',
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/adduser.js
Expand Up @@ -16,6 +16,8 @@ class AddUser extends BaseCommand {
'scope',
]

static ignoreImplicitWorkspace = true

async exec (args) {
const { scope } = this.npm.flatOptions
const registry = this.getRegistry(this.npm.flatOptions)
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/bin.js
Expand Up @@ -5,6 +5,7 @@ class Bin extends BaseCommand {
static description = 'Display npm bin folder'
static name = 'bin'
static params = ['global']
static ignoreImplicitWorkspace = true

async exec (args) {
const b = this.npm.bin
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/birthday.js
Expand Up @@ -2,6 +2,8 @@ const BaseCommand = require('../base-command.js')

class Birthday extends BaseCommand {
static name = 'birthday'
static ignoreImplicitWorkspace = true

async exec () {
this.npm.config.set('yes', true)
return this.npm.exec('exec', ['@npmcli/npm-birthday'])
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/bugs.js
Expand Up @@ -9,6 +9,7 @@ class Bugs extends BaseCommand {
static name = 'bugs'
static usage = ['[<pkgname>]']
static params = ['browser', 'registry']
static ignoreImplicitWorkspace = true

async exec (args) {
if (!args || !args.length) {
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/cache.js
Expand Up @@ -81,6 +81,8 @@ class Cache extends BaseCommand {
'verify',
]

static ignoreImplicitWorkspace = true

async completion (opts) {
const argv = opts.conf.argv.remain
if (argv.length === 2) {
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/completion.js
Expand Up @@ -47,6 +47,7 @@ const BaseCommand = require('../base-command.js')
class Completion extends BaseCommand {
static description = 'Tab Completion for npm'
static name = 'completion'
static ignoreImplicitWorkspace = false

// completion for the completion command
async completion (opts) {
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/config.js
Expand Up @@ -61,6 +61,8 @@ class Config extends BaseCommand {
'long',
]

static ignoreImplicitWorkspace = false

async completion (opts) {
const argv = opts.conf.argv.remain
if (argv[1] !== 'config') {
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/deprecate.js
Expand Up @@ -15,6 +15,8 @@ class Deprecate extends BaseCommand {
'otp',
]

static ignoreImplicitWorkspace = false

async completion (opts) {
if (opts.conf.argv.remain.length > 1) {
return []
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/diff.js
Expand Up @@ -32,6 +32,8 @@ class Diff extends BaseCommand {
'include-workspace-root',
]

static ignoreImplicitWorkspace = false

async exec (args) {
const specs = this.npm.config.get('diff').filter(d => d)
if (specs.length > 2) {
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/dist-tag.js
Expand Up @@ -16,6 +16,8 @@ class DistTag extends BaseCommand {
'ls [<pkg>]',
]

static ignoreImplicitWorkspace = false

async completion (opts) {
const argv = opts.conf.argv.remain
if (argv.length === 2) {
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/docs.js
Expand Up @@ -15,6 +15,7 @@ class Docs extends BaseCommand {
]

static usage = ['[<pkgname> [<pkgname> ...]]']
static ignoreImplicitWorkspace = false

async exec (args) {
if (!args || !args.length) {
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/doctor.js
Expand Up @@ -41,6 +41,7 @@ class Doctor extends BaseCommand {
static description = 'Check your npm environment'
static name = 'doctor'
static params = ['registry']
static ignoreImplicitWorkspace = false

async exec (args) {
log.info('Running checkup')
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/edit.js
Expand Up @@ -13,6 +13,7 @@ class Edit extends BaseCommand {
static name = 'edit'
static usage = ['<pkg>[/<subpkg>...]']
static params = ['editor']
static ignoreImplicitWorkspace = false

// TODO
/* istanbul ignore next */
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/exec.js
Expand Up @@ -45,6 +45,8 @@ class Exec extends BaseCommand {
'--package=foo -c \'<cmd> [args...]\'',
]

static ignoreImplicitWorkspace = false

async exec (_args, { locationMsg, path, runPath } = {}) {
if (!path) {
path = this.npm.localPrefix
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/explain.js
Expand Up @@ -16,6 +16,8 @@ class Explain extends ArboristWorkspaceCmd {
'workspace',
]

static ignoreImplicitWorkspace = false

// TODO
/* istanbul ignore next */
async completion (opts) {
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/explore.js
Expand Up @@ -13,6 +13,7 @@ class Explore extends BaseCommand {
static name = 'explore'
static usage = ['<pkg> [ -- <command>]']
static params = ['shell']
static ignoreImplicitWorkspace = false

// TODO
/* istanbul ignore next */
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/get.js
Expand Up @@ -4,6 +4,7 @@ class Get extends BaseCommand {
static description = 'Get a value from the npm configuration'
static name = 'get'
static usage = ['[<key> ...] (See `npm config`)']
static ignoreImplicitWorkspace = false

// TODO
/* istanbul ignore next */
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/help-search.js
Expand Up @@ -11,6 +11,7 @@ class HelpSearch extends BaseCommand {
static name = 'help-search'
static usage = ['<text>']
static params = ['long']
static ignoreImplicitWorkspace = true

async exec (args) {
if (!args.length) {
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/help.js
Expand Up @@ -17,6 +17,7 @@ class Help extends BaseCommand {
static name = 'help'
static usage = ['<term> [<terms..>]']
static params = ['viewer']
static ignoreImplicitWorkspace = true

async completion (opts) {
if (opts.conf.argv.remain.length > 2) {
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/hook.js
Expand Up @@ -19,6 +19,8 @@ class Hook extends BaseCommand {
'update <id> <url> <secret>',
]

static ignoreImplicitWorkspace = true

async exec (args) {
return otplease({
...this.npm.flatOptions,
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/init.js
Expand Up @@ -22,6 +22,8 @@ class Init extends BaseCommand {
'[<@scope>/]<name> (same as `npx [<@scope>/]create-<name>`)',
]

static ignoreImplicitWorkspace = false

async exec (args) {
// npm exec style
if (args.length) {
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/logout.js
Expand Up @@ -11,6 +11,8 @@ class Logout extends BaseCommand {
'scope',
]

static ignoreImplicitWorkspace = true

async exec (args) {
const registry = this.npm.config.get('registry')
const scope = this.npm.config.get('scope')
Expand Down
11 changes: 8 additions & 3 deletions deps/npm/lib/commands/ls.js
Expand Up @@ -95,10 +95,15 @@ class LS extends ArboristWorkspaceCmd {
return true
}

if (this.npm.flatOptions.includeWorkspaceRoot
&& !edge.to.isWorkspace) {
return true
}

if (edge.from.isProjectRoot) {
return edge.to &&
edge.to.isWorkspace &&
wsNodes.includes(edge.to.target)
return (edge.to
&& edge.to.isWorkspace
&& wsNodes.includes(edge.to.target))
}

return true
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/org.js
Expand Up @@ -13,6 +13,7 @@ class Org extends BaseCommand {
]

static params = ['registry', 'otp', 'json', 'parseable']
static ignoreImplicitWorkspace = true

async completion (opts) {
const argv = opts.conf.argv.remain
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/owner.js
Expand Up @@ -20,6 +20,8 @@ class Owner extends BaseCommand {
'ls [<@scope>/]<pkg>',
]

static ignoreImplicitWorkspace = false

async completion (opts) {
const argv = opts.conf.argv.remain
if (argv.length > 3) {
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/pack.js
Expand Up @@ -18,6 +18,7 @@ class Pack extends BaseCommand {
]

static usage = ['[[<@scope>/]<pkg>...]']
static ignoreImplicitWorkspace = false

async exec (args) {
if (args.length === 0) {
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/ping.js
Expand Up @@ -6,6 +6,7 @@ class Ping extends BaseCommand {
static description = 'Ping npm registry'
static params = ['registry']
static name = 'ping'
static ignoreImplicitWorkspace = true

async exec (args) {
log.notice('PING', this.npm.config.get('registry'))
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/pkg.js
Expand Up @@ -20,6 +20,8 @@ class Pkg extends BaseCommand {
'workspaces',
]

static ignoreImplicitWorkspace = false

async exec (args, { prefix } = {}) {
if (!prefix) {
this.prefix = this.npm.localPrefix
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/prefix.js
Expand Up @@ -5,6 +5,7 @@ class Prefix extends BaseCommand {
static name = 'prefix'
static params = ['global']
static usage = ['[-g]']
static ignoreImplicitWorkspace = true

async exec (args) {
return this.npm.output(this.npm.prefix)
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/profile.js
Expand Up @@ -54,6 +54,8 @@ class Profile extends BaseCommand {
'otp',
]

static ignoreImplicitWorkspace = true

async completion (opts) {
var argv = opts.conf.argv.remain

Expand Down
7 changes: 6 additions & 1 deletion deps/npm/lib/commands/publish.js
Expand Up @@ -39,6 +39,7 @@ class Publish extends BaseCommand {
]

static usage = ['[<folder>]']
static ignoreImplicitWorkspace = false

async exec (args) {
if (args.length === 0) {
Expand Down Expand Up @@ -195,7 +196,11 @@ class Publish extends BaseCommand {
if (spec.type === 'directory') {
return readJson(`${spec.fetchSpec}/package.json`)
}
return pacote.manifest(spec, { ...opts, fullMetadata: true })
return pacote.manifest(spec, {
...opts,
fullMetadata: true,
fullReadJson: true,
})
}
}
module.exports = Publish
1 change: 1 addition & 0 deletions deps/npm/lib/commands/repo.js
Expand Up @@ -10,6 +10,7 @@ class Repo extends BaseCommand {
static name = 'repo'
static params = ['browser', 'workspace', 'workspaces', 'include-workspace-root']
static usage = ['[<pkgname> [<pkgname> ...]]']
static ignoreImplicitWorkspace = false

async exec (args) {
if (!args || !args.length) {
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/lib/commands/restart.js
Expand Up @@ -8,5 +8,7 @@ class Restart extends LifecycleCmd {
'ignore-scripts',
'script-shell',
]

static ignoreImplicitWorkspace = false
}
module.exports = Restart
1 change: 1 addition & 0 deletions deps/npm/lib/commands/root.js
Expand Up @@ -3,6 +3,7 @@ class Root extends BaseCommand {
static description = 'Display npm root'
static name = 'root'
static params = ['global']
static ignoreImplicitWorkspace = true

async exec () {
this.npm.output(this.npm.dir)
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/run-script.js
Expand Up @@ -40,6 +40,7 @@ class RunScript extends BaseCommand {

static name = 'run-script'
static usage = ['<command> [-- <args>]']
static ignoreImplicitWorkspace = false

async completion (opts) {
const argv = opts.conf.argv.remain
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/search.js
Expand Up @@ -44,6 +44,7 @@ class Search extends BaseCommand {
]

static usage = ['[search terms ...]']
static ignoreImplicitWorkspace = true

async exec (args) {
const opts = {
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/set-script.js
Expand Up @@ -9,6 +9,7 @@ class SetScript extends BaseCommand {
static params = ['workspace', 'workspaces', 'include-workspace-root']
static name = 'set-script'
static usage = ['[<script>] [<command>]']
static ignoreImplicitWorkspace = false

async completion (opts) {
const argv = opts.conf.argv.remain
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/set.js
Expand Up @@ -4,6 +4,7 @@ class Set extends BaseCommand {
static description = 'Set a value in the npm configuration'
static name = 'set'
static usage = ['<key>=<value> [<key>=<value> ...] (See `npm config`)']
static ignoreImplicitWorkspace = false

// TODO
/* istanbul ignore next */
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/commands/shrinkwrap.js
Expand Up @@ -6,6 +6,7 @@ const BaseCommand = require('../base-command.js')
class Shrinkwrap extends BaseCommand {
static description = 'Lock down dependency versions for publication'
static name = 'shrinkwrap'
static ignoreImplicitWorkspace = false

async exec () {
// if has a npm-shrinkwrap.json, nothing to do
Expand Down

0 comments on commit 6b721d7

Please sign in to comment.