diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html index 2f28ede781f550..3269bcc579a886 100644 --- a/deps/npm/docs/output/commands/npm-ls.html +++ b/deps/npm/docs/output/commands/npm-ls.html @@ -166,7 +166,7 @@

Description

the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:

-
npm@8.5.2 /path/to/npm
+
npm@8.5.3 /path/to/npm
 └─┬ init-package-json@0.0.4
   └── promzard@0.1.5
 
diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html index 7059fa5d37a387..89bdc4f6d0b238 100644 --- a/deps/npm/docs/output/commands/npm.html +++ b/deps/npm/docs/output/commands/npm.html @@ -149,7 +149,7 @@

Table of contents

Version

-

8.5.2

+

8.5.3

Description

npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency diff --git a/deps/npm/lib/arborist-cmd.js b/deps/npm/lib/arborist-cmd.js index 931ead8143dff9..6518e91e0ad9d7 100644 --- a/deps/npm/lib/arborist-cmd.js +++ b/deps/npm/lib/arborist-cmd.js @@ -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) diff --git a/deps/npm/lib/base-command.js b/deps/npm/lib/base-command.js index f67f99f36367c1..b6e3d6d2318606 100644 --- a/deps/npm/lib/base-command.js +++ b/deps/npm/lib/base-command.js @@ -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) { diff --git a/deps/npm/lib/commands/access.js b/deps/npm/lib/commands/access.js index 206d6de9c22c43..bc8ce48bacdad5 100644 --- a/deps/npm/lib/commands/access.js +++ b/deps/npm/lib/commands/access.js @@ -27,6 +27,8 @@ class Access extends BaseCommand { 'otp', ] + static ignoreImplicitWorkspace = true + static usage = [ 'public []', 'restricted []', diff --git a/deps/npm/lib/commands/adduser.js b/deps/npm/lib/commands/adduser.js index cbeaaaf0f28bed..755abea8eb9ebe 100644 --- a/deps/npm/lib/commands/adduser.js +++ b/deps/npm/lib/commands/adduser.js @@ -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) diff --git a/deps/npm/lib/commands/bin.js b/deps/npm/lib/commands/bin.js index bb700d45a8f1b4..77028f06dd49a8 100644 --- a/deps/npm/lib/commands/bin.js +++ b/deps/npm/lib/commands/bin.js @@ -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 diff --git a/deps/npm/lib/commands/birthday.js b/deps/npm/lib/commands/birthday.js index 27fe2c50cab021..e889b39f253779 100644 --- a/deps/npm/lib/commands/birthday.js +++ b/deps/npm/lib/commands/birthday.js @@ -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']) diff --git a/deps/npm/lib/commands/bugs.js b/deps/npm/lib/commands/bugs.js index 5dfd1eb9189594..f6218f033f3d3d 100644 --- a/deps/npm/lib/commands/bugs.js +++ b/deps/npm/lib/commands/bugs.js @@ -9,6 +9,7 @@ class Bugs extends BaseCommand { static name = 'bugs' static usage = ['[]'] static params = ['browser', 'registry'] + static ignoreImplicitWorkspace = true async exec (args) { if (!args || !args.length) { diff --git a/deps/npm/lib/commands/cache.js b/deps/npm/lib/commands/cache.js index ecb34cb8916c43..b8f84abc1d9412 100644 --- a/deps/npm/lib/commands/cache.js +++ b/deps/npm/lib/commands/cache.js @@ -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) { diff --git a/deps/npm/lib/commands/completion.js b/deps/npm/lib/commands/completion.js index 4ded2de385afba..0317753a15aaff 100644 --- a/deps/npm/lib/commands/completion.js +++ b/deps/npm/lib/commands/completion.js @@ -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) { diff --git a/deps/npm/lib/commands/config.js b/deps/npm/lib/commands/config.js index 96524e00817f5d..690a69a3233e4f 100644 --- a/deps/npm/lib/commands/config.js +++ b/deps/npm/lib/commands/config.js @@ -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') { diff --git a/deps/npm/lib/commands/deprecate.js b/deps/npm/lib/commands/deprecate.js index 839e974caf09b7..88eb320c32a523 100644 --- a/deps/npm/lib/commands/deprecate.js +++ b/deps/npm/lib/commands/deprecate.js @@ -15,6 +15,8 @@ class Deprecate extends BaseCommand { 'otp', ] + static ignoreImplicitWorkspace = false + async completion (opts) { if (opts.conf.argv.remain.length > 1) { return [] diff --git a/deps/npm/lib/commands/diff.js b/deps/npm/lib/commands/diff.js index d737a58dc43d8d..ff942cc44e9460 100644 --- a/deps/npm/lib/commands/diff.js +++ b/deps/npm/lib/commands/diff.js @@ -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) { diff --git a/deps/npm/lib/commands/dist-tag.js b/deps/npm/lib/commands/dist-tag.js index bb36f3f72bfb2d..3b82c5194cca82 100644 --- a/deps/npm/lib/commands/dist-tag.js +++ b/deps/npm/lib/commands/dist-tag.js @@ -16,6 +16,8 @@ class DistTag extends BaseCommand { 'ls []', ] + static ignoreImplicitWorkspace = false + async completion (opts) { const argv = opts.conf.argv.remain if (argv.length === 2) { diff --git a/deps/npm/lib/commands/docs.js b/deps/npm/lib/commands/docs.js index 19cd7356422625..631615acc56b3d 100644 --- a/deps/npm/lib/commands/docs.js +++ b/deps/npm/lib/commands/docs.js @@ -15,6 +15,7 @@ class Docs extends BaseCommand { ] static usage = ['[ [ ...]]'] + static ignoreImplicitWorkspace = false async exec (args) { if (!args || !args.length) { diff --git a/deps/npm/lib/commands/doctor.js b/deps/npm/lib/commands/doctor.js index 508faa57aa5e93..9af4c4cd6ffbfc 100644 --- a/deps/npm/lib/commands/doctor.js +++ b/deps/npm/lib/commands/doctor.js @@ -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') diff --git a/deps/npm/lib/commands/edit.js b/deps/npm/lib/commands/edit.js index 5f069c4f132e58..ce74ff79b2b7ea 100644 --- a/deps/npm/lib/commands/edit.js +++ b/deps/npm/lib/commands/edit.js @@ -13,6 +13,7 @@ class Edit extends BaseCommand { static name = 'edit' static usage = ['[/...]'] static params = ['editor'] + static ignoreImplicitWorkspace = false // TODO /* istanbul ignore next */ diff --git a/deps/npm/lib/commands/exec.js b/deps/npm/lib/commands/exec.js index 52fb1f8eb72298..6b402c856ab1e9 100644 --- a/deps/npm/lib/commands/exec.js +++ b/deps/npm/lib/commands/exec.js @@ -45,6 +45,8 @@ class Exec extends BaseCommand { '--package=foo -c \' [args...]\'', ] + static ignoreImplicitWorkspace = false + async exec (_args, { locationMsg, path, runPath } = {}) { if (!path) { path = this.npm.localPrefix diff --git a/deps/npm/lib/commands/explain.js b/deps/npm/lib/commands/explain.js index fd62b87fc869d5..ca6ee7540bc916 100644 --- a/deps/npm/lib/commands/explain.js +++ b/deps/npm/lib/commands/explain.js @@ -16,6 +16,8 @@ class Explain extends ArboristWorkspaceCmd { 'workspace', ] + static ignoreImplicitWorkspace = false + // TODO /* istanbul ignore next */ async completion (opts) { diff --git a/deps/npm/lib/commands/explore.js b/deps/npm/lib/commands/explore.js index 90e6af69fe57ca..5b97673b90eaa9 100644 --- a/deps/npm/lib/commands/explore.js +++ b/deps/npm/lib/commands/explore.js @@ -13,6 +13,7 @@ class Explore extends BaseCommand { static name = 'explore' static usage = [' [ -- ]'] static params = ['shell'] + static ignoreImplicitWorkspace = false // TODO /* istanbul ignore next */ diff --git a/deps/npm/lib/commands/get.js b/deps/npm/lib/commands/get.js index 7583ade23d600a..5e92e85a66382f 100644 --- a/deps/npm/lib/commands/get.js +++ b/deps/npm/lib/commands/get.js @@ -4,6 +4,7 @@ class Get extends BaseCommand { static description = 'Get a value from the npm configuration' static name = 'get' static usage = ['[ ...] (See `npm config`)'] + static ignoreImplicitWorkspace = false // TODO /* istanbul ignore next */ diff --git a/deps/npm/lib/commands/help-search.js b/deps/npm/lib/commands/help-search.js index 6025a6dabd74b5..9422b83561cc89 100644 --- a/deps/npm/lib/commands/help-search.js +++ b/deps/npm/lib/commands/help-search.js @@ -11,6 +11,7 @@ class HelpSearch extends BaseCommand { static name = 'help-search' static usage = [''] static params = ['long'] + static ignoreImplicitWorkspace = true async exec (args) { if (!args.length) { diff --git a/deps/npm/lib/commands/help.js b/deps/npm/lib/commands/help.js index f94178dd5d1d6c..40f5ad9b300926 100644 --- a/deps/npm/lib/commands/help.js +++ b/deps/npm/lib/commands/help.js @@ -17,6 +17,7 @@ class Help extends BaseCommand { static name = 'help' static usage = [' []'] static params = ['viewer'] + static ignoreImplicitWorkspace = true async completion (opts) { if (opts.conf.argv.remain.length > 2) { diff --git a/deps/npm/lib/commands/hook.js b/deps/npm/lib/commands/hook.js index 2ff6ac01ce5272..a4619802d84298 100644 --- a/deps/npm/lib/commands/hook.js +++ b/deps/npm/lib/commands/hook.js @@ -19,6 +19,8 @@ class Hook extends BaseCommand { 'update ', ] + static ignoreImplicitWorkspace = true + async exec (args) { return otplease({ ...this.npm.flatOptions, diff --git a/deps/npm/lib/commands/init.js b/deps/npm/lib/commands/init.js index 367533f8259f51..2a6b6aaddc7e65 100644 --- a/deps/npm/lib/commands/init.js +++ b/deps/npm/lib/commands/init.js @@ -22,6 +22,8 @@ class Init extends BaseCommand { '[<@scope>/] (same as `npx [<@scope>/]create-`)', ] + static ignoreImplicitWorkspace = false + async exec (args) { // npm exec style if (args.length) { diff --git a/deps/npm/lib/commands/logout.js b/deps/npm/lib/commands/logout.js index aea5e93652b0e8..7c2a7f0b2f830d 100644 --- a/deps/npm/lib/commands/logout.js +++ b/deps/npm/lib/commands/logout.js @@ -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') diff --git a/deps/npm/lib/commands/ls.js b/deps/npm/lib/commands/ls.js index 8c338c0647586d..e56c90dae16eaf 100644 --- a/deps/npm/lib/commands/ls.js +++ b/deps/npm/lib/commands/ls.js @@ -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 diff --git a/deps/npm/lib/commands/org.js b/deps/npm/lib/commands/org.js index f3d344ca33e3d8..e2202a9e9cf3b4 100644 --- a/deps/npm/lib/commands/org.js +++ b/deps/npm/lib/commands/org.js @@ -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 diff --git a/deps/npm/lib/commands/owner.js b/deps/npm/lib/commands/owner.js index effaaa6a53d3a8..93e0a45ad1e274 100644 --- a/deps/npm/lib/commands/owner.js +++ b/deps/npm/lib/commands/owner.js @@ -20,6 +20,8 @@ class Owner extends BaseCommand { 'ls [<@scope>/]', ] + static ignoreImplicitWorkspace = false + async completion (opts) { const argv = opts.conf.argv.remain if (argv.length > 3) { diff --git a/deps/npm/lib/commands/pack.js b/deps/npm/lib/commands/pack.js index 74c29699a05c90..41fef5cb45a47c 100644 --- a/deps/npm/lib/commands/pack.js +++ b/deps/npm/lib/commands/pack.js @@ -18,6 +18,7 @@ class Pack extends BaseCommand { ] static usage = ['[[<@scope>/]...]'] + static ignoreImplicitWorkspace = false async exec (args) { if (args.length === 0) { diff --git a/deps/npm/lib/commands/ping.js b/deps/npm/lib/commands/ping.js index 5a651c4a6ab096..22039214689a96 100644 --- a/deps/npm/lib/commands/ping.js +++ b/deps/npm/lib/commands/ping.js @@ -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')) diff --git a/deps/npm/lib/commands/pkg.js b/deps/npm/lib/commands/pkg.js index 6ca892293cebec..3a8e01f65bc921 100644 --- a/deps/npm/lib/commands/pkg.js +++ b/deps/npm/lib/commands/pkg.js @@ -20,6 +20,8 @@ class Pkg extends BaseCommand { 'workspaces', ] + static ignoreImplicitWorkspace = false + async exec (args, { prefix } = {}) { if (!prefix) { this.prefix = this.npm.localPrefix diff --git a/deps/npm/lib/commands/prefix.js b/deps/npm/lib/commands/prefix.js index 264b819fc7692a..dd0e34c3d3bd95 100644 --- a/deps/npm/lib/commands/prefix.js +++ b/deps/npm/lib/commands/prefix.js @@ -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) diff --git a/deps/npm/lib/commands/profile.js b/deps/npm/lib/commands/profile.js index 6b4d1407f7919a..a82d31fd443a9e 100644 --- a/deps/npm/lib/commands/profile.js +++ b/deps/npm/lib/commands/profile.js @@ -54,6 +54,8 @@ class Profile extends BaseCommand { 'otp', ] + static ignoreImplicitWorkspace = true + async completion (opts) { var argv = opts.conf.argv.remain diff --git a/deps/npm/lib/commands/publish.js b/deps/npm/lib/commands/publish.js index d1f0ee743cfcc3..1f26370e89a567 100644 --- a/deps/npm/lib/commands/publish.js +++ b/deps/npm/lib/commands/publish.js @@ -39,6 +39,7 @@ class Publish extends BaseCommand { ] static usage = ['[]'] + static ignoreImplicitWorkspace = false async exec (args) { if (args.length === 0) { @@ -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 diff --git a/deps/npm/lib/commands/repo.js b/deps/npm/lib/commands/repo.js index 8ac4178f261ee1..b8dccc209ff87a 100644 --- a/deps/npm/lib/commands/repo.js +++ b/deps/npm/lib/commands/repo.js @@ -10,6 +10,7 @@ class Repo extends BaseCommand { static name = 'repo' static params = ['browser', 'workspace', 'workspaces', 'include-workspace-root'] static usage = ['[ [ ...]]'] + static ignoreImplicitWorkspace = false async exec (args) { if (!args || !args.length) { diff --git a/deps/npm/lib/commands/restart.js b/deps/npm/lib/commands/restart.js index a12368644a13b3..575928b2202cc8 100644 --- a/deps/npm/lib/commands/restart.js +++ b/deps/npm/lib/commands/restart.js @@ -8,5 +8,7 @@ class Restart extends LifecycleCmd { 'ignore-scripts', 'script-shell', ] + + static ignoreImplicitWorkspace = false } module.exports = Restart diff --git a/deps/npm/lib/commands/root.js b/deps/npm/lib/commands/root.js index 7749c602456b77..b814034def5ab6 100644 --- a/deps/npm/lib/commands/root.js +++ b/deps/npm/lib/commands/root.js @@ -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) diff --git a/deps/npm/lib/commands/run-script.js b/deps/npm/lib/commands/run-script.js index edba95821b44c2..74757e984aeedd 100644 --- a/deps/npm/lib/commands/run-script.js +++ b/deps/npm/lib/commands/run-script.js @@ -40,6 +40,7 @@ class RunScript extends BaseCommand { static name = 'run-script' static usage = [' [-- ]'] + static ignoreImplicitWorkspace = false async completion (opts) { const argv = opts.conf.argv.remain diff --git a/deps/npm/lib/commands/search.js b/deps/npm/lib/commands/search.js index bdeeffe816980f..a06ba4031443b4 100644 --- a/deps/npm/lib/commands/search.js +++ b/deps/npm/lib/commands/search.js @@ -44,6 +44,7 @@ class Search extends BaseCommand { ] static usage = ['[search terms ...]'] + static ignoreImplicitWorkspace = true async exec (args) { const opts = { diff --git a/deps/npm/lib/commands/set-script.js b/deps/npm/lib/commands/set-script.js index 7c73ff01b9396e..a6b7c3a50cdafe 100644 --- a/deps/npm/lib/commands/set-script.js +++ b/deps/npm/lib/commands/set-script.js @@ -9,6 +9,7 @@ class SetScript extends BaseCommand { static params = ['workspace', 'workspaces', 'include-workspace-root'] static name = 'set-script' static usage = ['[