Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/content/commands/npm-audit.md32
-rw-r--r--docs/content/commands/npm-dedupe.md32
-rw-r--r--docs/content/commands/npm-diff.md32
-rw-r--r--docs/content/commands/npm-dist-tag.md32
-rw-r--r--docs/content/commands/npm-docs.md32
-rw-r--r--docs/content/commands/npm-exec.md32
-rw-r--r--docs/content/commands/npm-explain.md4
-rw-r--r--docs/content/commands/npm-find-dupes.md32
-rw-r--r--docs/content/commands/npm-fund.md4
-rw-r--r--docs/content/commands/npm-init.md18
-rw-r--r--docs/content/commands/npm-install-test.md32
-rw-r--r--docs/content/commands/npm-install.md32
-rw-r--r--docs/content/commands/npm-link.md32
-rw-r--r--docs/content/commands/npm-ls.md32
-rw-r--r--docs/content/commands/npm-outdated.md4
-rw-r--r--docs/content/commands/npm-pack.md32
-rw-r--r--docs/content/commands/npm-pkg.md18
-rw-r--r--docs/content/commands/npm-prune.md32
-rw-r--r--docs/content/commands/npm-publish.md32
-rw-r--r--docs/content/commands/npm-rebuild.md32
-rw-r--r--docs/content/commands/npm-repo.md32
-rw-r--r--docs/content/commands/npm-run-script.md32
-rw-r--r--docs/content/commands/npm-set-script.md32
-rw-r--r--docs/content/commands/npm-uninstall.md32
-rw-r--r--docs/content/commands/npm-unpublish.md18
-rw-r--r--docs/content/commands/npm-update.md32
-rw-r--r--docs/content/commands/npm-version.md32
-rw-r--r--docs/content/commands/npm-view.md32
-rw-r--r--docs/content/using-npm/config.md32
-rw-r--r--lib/base-command.js10
-rw-r--r--lib/diff.js1
-rw-r--r--lib/dist-tag.js2
-rw-r--r--lib/docs.js8
-rw-r--r--lib/exec.js8
-rw-r--r--lib/explain.js9
-rw-r--r--lib/fund.js1
-rw-r--r--lib/init.js4
-rw-r--r--lib/link.js1
-rw-r--r--lib/ls.js9
-rw-r--r--lib/npm.js12
-rw-r--r--lib/outdated.js9
-rw-r--r--lib/pack.js1
-rw-r--r--lib/publish.js10
-rw-r--r--lib/repo.js10
-rw-r--r--lib/run-script.js1
-rw-r--r--lib/set-script.js2
-rw-r--r--lib/utils/completion/installed-deep.js9
-rw-r--r--lib/utils/config/definitions.js41
-rw-r--r--lib/version.js1
-rw-r--r--lib/view.js1
-rw-r--r--lib/workspaces/arborist-cmd.js7
-rw-r--r--lib/workspaces/get-workspaces.js9
-rw-r--r--package-lock.json1
-rw-r--r--package.json1
-rw-r--r--tap-snapshots/test/lib/config.js.test.cjs6
-rw-r--r--tap-snapshots/test/lib/dist-tag.js.test.cjs12
-rw-r--r--tap-snapshots/test/lib/init.js.test.cjs4
-rw-r--r--tap-snapshots/test/lib/load-all-commands.js.test.cjs46
-rw-r--r--tap-snapshots/test/lib/ls.js.test.cjs6
-rw-r--r--tap-snapshots/test/lib/outdated.js.test.cjs8
-rw-r--r--tap-snapshots/test/lib/publish.js.test.cjs2
-rw-r--r--tap-snapshots/test/lib/utils/config/definitions.js.test.cjs32
-rw-r--r--tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs32
-rw-r--r--tap-snapshots/test/lib/utils/npm-usage.js.test.cjs46
-rw-r--r--test/lib/explain.js79
-rw-r--r--test/lib/init.js23
-rw-r--r--test/lib/ls.js20
-rw-r--r--test/lib/npm.js38
-rw-r--r--test/lib/outdated.js29
-rw-r--r--test/lib/publish.js1
-rw-r--r--test/lib/repo.js118
-rw-r--r--test/lib/utils/completion/installed-deep.js1
-rw-r--r--test/lib/utils/config/definitions.js17
-rw-r--r--test/lib/workspaces/get-workspaces.js11
74 files changed, 282 insertions, 1219 deletions
diff --git a/docs/content/commands/npm-audit.md b/docs/content/commands/npm-audit.md
index 58c614d79..9fa8c0fcc 100644
--- a/docs/content/commands/npm-audit.md
+++ b/docs/content/commands/npm-audit.md
@@ -313,8 +313,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -327,35 +327,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-dedupe.md b/docs/content/commands/npm-dedupe.md
index 377e17d81..dcb2a98fe 100644
--- a/docs/content/commands/npm-dedupe.md
+++ b/docs/content/commands/npm-dedupe.md
@@ -247,8 +247,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -261,35 +261,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-diff.md b/docs/content/commands/npm-diff.md
index 8d05df779..cf0bbec15 100644
--- a/docs/content/commands/npm-diff.md
+++ b/docs/content/commands/npm-diff.md
@@ -286,8 +286,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -300,35 +300,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-dist-tag.md b/docs/content/commands/npm-dist-tag.md
index a4e0243aa..4ad68ff56 100644
--- a/docs/content/commands/npm-dist-tag.md
+++ b/docs/content/commands/npm-dist-tag.md
@@ -106,8 +106,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -120,35 +120,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-docs.md b/docs/content/commands/npm-docs.md
index 970d17aa8..9f1387dae 100644
--- a/docs/content/commands/npm-docs.md
+++ b/docs/content/commands/npm-docs.md
@@ -63,8 +63,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -77,35 +77,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-exec.md b/docs/content/commands/npm-exec.md
index db2353662..82908d65e 100644
--- a/docs/content/commands/npm-exec.md
+++ b/docs/content/commands/npm-exec.md
@@ -164,8 +164,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -178,35 +178,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-explain.md b/docs/content/commands/npm-explain.md
index 5f05cac0f..4a8af2f70 100644
--- a/docs/content/commands/npm-explain.md
+++ b/docs/content/commands/npm-explain.md
@@ -85,8 +85,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
diff --git a/docs/content/commands/npm-find-dupes.md b/docs/content/commands/npm-find-dupes.md
index f7dc84f9c..e9dbac6d1 100644
--- a/docs/content/commands/npm-find-dupes.md
+++ b/docs/content/commands/npm-find-dupes.md
@@ -174,8 +174,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -188,35 +188,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-fund.md b/docs/content/commands/npm-fund.md
index 606b0a188..83c0b13d8 100644
--- a/docs/content/commands/npm-fund.md
+++ b/docs/content/commands/npm-fund.md
@@ -122,8 +122,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
diff --git a/docs/content/commands/npm-init.md b/docs/content/commands/npm-init.md
index d5a02494f..7355c7588 100644
--- a/docs/content/commands/npm-init.md
+++ b/docs/content/commands/npm-init.md
@@ -200,8 +200,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -214,20 +214,12 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
+* Default: false
+* Type: Boolean
-Set to true to run the command in the context of **all** configured
+Enable running a command in the context of **all** the configured
workspaces.
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
diff --git a/docs/content/commands/npm-install-test.md b/docs/content/commands/npm-install-test.md
index c464e5bd0..c2f9ab3d2 100644
--- a/docs/content/commands/npm-install-test.md
+++ b/docs/content/commands/npm-install-test.md
@@ -241,8 +241,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -255,35 +255,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-install.md b/docs/content/commands/npm-install.md
index a103845d1..de7378718 100644
--- a/docs/content/commands/npm-install.md
+++ b/docs/content/commands/npm-install.md
@@ -625,8 +625,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -639,35 +639,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-link.md b/docs/content/commands/npm-link.md
index d4ef41ae9..5811a8b23 100644
--- a/docs/content/commands/npm-link.md
+++ b/docs/content/commands/npm-link.md
@@ -325,8 +325,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -339,35 +339,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-ls.md b/docs/content/commands/npm-ls.md
index 3b33f0a36..528140bee 100644
--- a/docs/content/commands/npm-ls.md
+++ b/docs/content/commands/npm-ls.md
@@ -227,8 +227,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -241,35 +241,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-outdated.md b/docs/content/commands/npm-outdated.md
index 1b58a6afd..8eb5528c3 100644
--- a/docs/content/commands/npm-outdated.md
+++ b/docs/content/commands/npm-outdated.md
@@ -167,8 +167,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
diff --git a/docs/content/commands/npm-pack.md b/docs/content/commands/npm-pack.md
index 539459868..dda30512d 100644
--- a/docs/content/commands/npm-pack.md
+++ b/docs/content/commands/npm-pack.md
@@ -69,8 +69,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -83,35 +83,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-pkg.md b/docs/content/commands/npm-pkg.md
index beee9c1c4..bf6a2df5d 100644
--- a/docs/content/commands/npm-pkg.md
+++ b/docs/content/commands/npm-pkg.md
@@ -223,8 +223,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -237,20 +237,12 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
+* Default: false
+* Type: Boolean
-Set to true to run the command in the context of **all** configured
+Enable running a command in the context of **all** the configured
workspaces.
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
diff --git a/docs/content/commands/npm-prune.md b/docs/content/commands/npm-prune.md
index 658ab2610..7bd7ad131 100644
--- a/docs/content/commands/npm-prune.md
+++ b/docs/content/commands/npm-prune.md
@@ -103,8 +103,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -117,35 +117,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-publish.md b/docs/content/commands/npm-publish.md
index 6958b1066..946109de4 100644
--- a/docs/content/commands/npm-publish.md
+++ b/docs/content/commands/npm-publish.md
@@ -188,8 +188,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -202,35 +202,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-rebuild.md b/docs/content/commands/npm-rebuild.md
index 75e71c60e..19684796f 100644
--- a/docs/content/commands/npm-rebuild.md
+++ b/docs/content/commands/npm-rebuild.md
@@ -89,8 +89,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -103,35 +103,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-repo.md b/docs/content/commands/npm-repo.md
index cd47fde47..c3c509e0b 100644
--- a/docs/content/commands/npm-repo.md
+++ b/docs/content/commands/npm-repo.md
@@ -50,8 +50,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -64,35 +64,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-run-script.md b/docs/content/commands/npm-run-script.md
index 6dd602d03..e436bc27f 100644
--- a/docs/content/commands/npm-run-script.md
+++ b/docs/content/commands/npm-run-script.md
@@ -152,8 +152,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -166,35 +166,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-set-script.md b/docs/content/commands/npm-set-script.md
index 869ceede0..e39b7a18c 100644
--- a/docs/content/commands/npm-set-script.md
+++ b/docs/content/commands/npm-set-script.md
@@ -44,8 +44,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -58,35 +58,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-uninstall.md b/docs/content/commands/npm-uninstall.md
index 824d0d876..c04e1a7fd 100644
--- a/docs/content/commands/npm-uninstall.md
+++ b/docs/content/commands/npm-uninstall.md
@@ -85,8 +85,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -99,35 +99,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-unpublish.md b/docs/content/commands/npm-unpublish.md
index 13589a03e..1678bb305 100644
--- a/docs/content/commands/npm-unpublish.md
+++ b/docs/content/commands/npm-unpublish.md
@@ -107,8 +107,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -121,20 +121,12 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
+* Default: false
+* Type: Boolean
-Set to true to run the command in the context of **all** configured
+Enable running a command in the context of **all** the configured
workspaces.
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
diff --git a/docs/content/commands/npm-update.md b/docs/content/commands/npm-update.md
index ad02118e4..57b9b91f9 100644
--- a/docs/content/commands/npm-update.md
+++ b/docs/content/commands/npm-update.md
@@ -341,8 +341,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -355,35 +355,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-version.md b/docs/content/commands/npm-version.md
index 91ab0dee0..a02bf5bb9 100644
--- a/docs/content/commands/npm-version.md
+++ b/docs/content/commands/npm-version.md
@@ -103,8 +103,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -117,35 +117,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/commands/npm-view.md b/docs/content/commands/npm-view.md
index 9a1793f13..af354deb8 100644
--- a/docs/content/commands/npm-view.md
+++ b/docs/content/commands/npm-view.md
@@ -127,8 +127,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -141,35 +141,13 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
-
-Set to true to run the command in the context of **all** configured
-workspaces.
-
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
-This value is not exported to the environment for child processes.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
-#### `include-workspace-root`
-
* Default: false
* Type: Boolean
-Include the workspace root when workspaces are enabled for a command.
+Enable running a command in the context of **all** the configured
+workspaces.
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
+This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md
index 647a9e1e0..10e8ca9b9 100644
--- a/docs/content/using-npm/config.md
+++ b/docs/content/using-npm/config.md
@@ -806,20 +806,6 @@ This is experimental, and not implemented by the npm public registry.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
-#### `include-workspace-root`
-
-* Default: false
-* Type: Boolean
-
-Include the workspace root when workspaces are enabled for a command.
-
-When false, specifying individual workspaces via the `workspace` config, or
-all workspaces via the `workspaces` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
#### `init-author-email`
* Default: ""
@@ -1758,8 +1744,8 @@ Valid values for the `workspace` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the `npm init` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -1772,20 +1758,12 @@ This value is not exported to the environment for child processes.
#### `workspaces`
-* Default: null
-* Type: null or Boolean
+* Default: false
+* Type: Boolean
-Set to true to run the command in the context of **all** configured
+Enable running a command in the context of **all** the configured
workspaces.
-Explicitly setting this to false will cause commands like `install` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the `node_modules` tree (install, update, etc.)
-will link workspaces into the `node_modules` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the `workspace` config.
-
This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
diff --git a/lib/base-command.js b/lib/base-command.js
index c5bd3fd94..870c69acc 100644
--- a/lib/base-command.js
+++ b/lib/base-command.js
@@ -7,6 +7,8 @@ class BaseCommand {
constructor (npm) {
this.wrapWidth = 80
this.npm = npm
+ this.workspaces = null
+ this.workspacePaths = null
}
get name () {
@@ -73,13 +75,7 @@ class BaseCommand {
}
async setWorkspaces (filters) {
- if (this.isArboristCmd)
- this.includeWorkspaceRoot = false
-
- const ws = await getWorkspaces(filters, {
- path: this.npm.localPrefix,
- includeWorkspaceRoot: this.includeWorkspaceRoot,
- })
+ const ws = await getWorkspaces(filters, { path: this.npm.localPrefix })
this.workspaces = ws
this.workspaceNames = [...ws.keys()]
this.workspacePaths = [...ws.values()]
diff --git a/lib/diff.js b/lib/diff.js
index b1a32705c..01658c466 100644
--- a/lib/diff.js
+++ b/lib/diff.js
@@ -43,7 +43,6 @@ class Diff extends BaseCommand {
'tag',
'workspace',
'workspaces',
- 'include-workspace-root',
]
}
diff --git a/lib/dist-tag.js b/lib/dist-tag.js
index be44f39ff..e32dcf61f 100644
--- a/lib/dist-tag.js
+++ b/lib/dist-tag.js
@@ -14,7 +14,7 @@ class DistTag extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
- return ['workspace', 'workspaces', 'include-workspace-root']
+ return ['workspace', 'workspaces']
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
diff --git a/lib/docs.js b/lib/docs.js
index 51f8be388..69a19c35c 100644
--- a/lib/docs.js
+++ b/lib/docs.js
@@ -17,13 +17,7 @@ class Docs extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
- return [
- 'browser',
- 'registry',
- 'workspace',
- 'workspaces',
- 'include-workspace-root',
- ]
+ return ['browser', 'registry', 'workspace', 'workspaces']
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
diff --git a/lib/exec.js b/lib/exec.js
index d11947483..8c64c2f24 100644
--- a/lib/exec.js
+++ b/lib/exec.js
@@ -35,13 +35,7 @@ class Exec extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
- return [
- 'package',
- 'call',
- 'workspace',
- 'workspaces',
- 'include-workspace-root',
- ]
+ return ['package', 'call', 'workspace', 'workspaces']
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
diff --git a/lib/explain.js b/lib/explain.js
index fc7f57891..7d785d7bf 100644
--- a/lib/explain.js
+++ b/lib/explain.js
@@ -46,15 +46,8 @@ class Explain extends ArboristWorkspaceCmd {
const arb = new Arborist({ path: this.npm.prefix, ...this.npm.flatOptions })
const tree = await arb.loadActual()
- if (this.npm.flatOptions.workspacesEnabled
- && this.workspaceNames
- && this.workspaceNames.length
- )
+ if (this.workspaceNames && this.workspaceNames.length)
this.filterSet = arb.workspaceDependencySet(tree, this.workspaceNames)
- else if (!this.npm.flatOptions.workspacesEnabled) {
- this.filterSet =
- arb.excludeWorkspacesDependencySet(tree)
- }
const nodes = new Set()
for (const arg of args) {
diff --git a/lib/fund.js b/lib/fund.js
index 97139f5bb..1e0fa1ecb 100644
--- a/lib/fund.js
+++ b/lib/fund.js
@@ -92,7 +92,6 @@ class Fund extends ArboristWorkspaceCmd {
return
}
- // TODO: add !workspacesEnabled option handling to libnpmfund
const fundingInfo = getFundingInfo(tree, {
...this.flatOptions,
log: this.npm.log,
diff --git a/lib/init.js b/lib/init.js
index 30fd7e2f7..e4bd20b72 100644
--- a/lib/init.js
+++ b/lib/init.js
@@ -54,10 +54,6 @@ class Init extends BaseCommand {
}
async initWorkspaces (args, filters) {
- // if the root package is uninitiated, take care of it first
- if (this.npm.flatOptions.includeWorkspaceRoot)
- await this.init(args)
-
// reads package.json for the top-level folder first, by doing this we
// ensure the command throw if no package.json is found before trying
// to create a workspace package.json file or its folders
diff --git a/lib/link.js b/lib/link.js
index 2437eb12e..febd90871 100644
--- a/lib/link.js
+++ b/lib/link.js
@@ -185,7 +185,6 @@ class Link extends ArboristWorkspaceCmd {
// atm but should be simple once we have a mocked registry again
if (arg.name !== node.name /* istanbul ignore next */ || (
arg.version &&
- /* istanbul ignore next */
!semver.satisfies(node.version, arg.version)
)) {
foundNodes.push(node)
diff --git a/lib/ls.js b/lib/ls.js
index 46cfb2462..495b6348a 100644
--- a/lib/ls.js
+++ b/lib/ls.js
@@ -82,7 +82,6 @@ class LS extends ArboristWorkspaceCmd {
const production = this.npm.config.get('production')
const unicode = this.npm.config.get('unicode')
const packageLockOnly = this.npm.config.get('package-lock-only')
- const workspacesEnabled = this.npm.flatOptions.workspacesEnabled
const path = global ? resolve(this.npm.globalDir, '..') : this.npm.prefix
@@ -101,18 +100,12 @@ class LS extends ArboristWorkspaceCmd {
if (this.workspaceNames && this.workspaceNames.length)
wsNodes = arb.workspaceNodes(tree, this.workspaceNames)
const filterBySelectedWorkspaces = edge => {
- if (!workspacesEnabled
- && edge.from.isProjectRoot
- && edge.to.isWorkspace
- )
- return false
-
if (!wsNodes || !wsNodes.length)
return true
if (edge.from.isProjectRoot) {
return edge.to &&
- edge.to.isWorkspace &&
+ edge.to.isWorkspace &
wsNodes.includes(edge.to.target)
}
diff --git a/lib/npm.js b/lib/npm.js
index 9b9f3b238..966d11210 100644
--- a/lib/npm.js
+++ b/lib/npm.js
@@ -137,19 +137,7 @@ const npm = module.exports = new class extends EventEmitter {
const workspacesEnabled = this.config.get('workspaces')
const workspacesFilters = this.config.get('workspace')
- if (workspacesEnabled === false && workspacesFilters.length > 0)
- return cb(new Error('Can not use --no-workspaces and --workspace at the same time'))
-
const filterByWorkspaces = workspacesEnabled || workspacesFilters.length > 0
- // normally this would go in the constructor, but our tests don't
- // actually use a real npm object so this.npm.config isn't always
- // populated. this is the compromise until we can make that a reality
- // and then move this into the constructor.
- impl.workspaces = this.config.get('workspaces')
- impl.workspacePaths = null
- // normally this would be evaluated in base-command#setWorkspaces, see
- // above for explanation
- impl.includeWorkspaceRoot = this.config.get('include-workspace-root')
if (this.config.get('usage')) {
this.output(impl.usage)
diff --git a/lib/outdated.js b/lib/outdated.js
index ab46b4536..b3b630421 100644
--- a/lib/outdated.js
+++ b/lib/outdated.js
@@ -62,14 +62,7 @@ class Outdated extends ArboristWorkspaceCmd {
if (this.workspaceNames && this.workspaceNames.length) {
this.filterSet =
- arb.workspaceDependencySet(
- this.tree,
- this.workspaceNames,
- this.npm.flatOptions.includeWorkspaceRoot
- )
- } else if (!this.npm.flatOptions.workspacesEnabled) {
- this.filterSet =
- arb.excludeWorkspacesDependencySet(this.tree)
+ arb.workspaceDependencySet(this.tree, this.workspaceNames)
}
if (args.length !== 0) {
diff --git a/lib/pack.js b/lib/pack.js
index 848f8afd5..8fc89db1a 100644
--- a/lib/pack.js
+++ b/lib/pack.js
@@ -30,7 +30,6 @@ class Pack extends BaseCommand {
'pack-destination',
'workspace',
'workspaces',
- 'include-workspace-root',
]
}
diff --git a/lib/publish.js b/lib/publish.js
index 32e70129f..9c747eb50 100644
--- a/lib/publish.js
+++ b/lib/publish.js
@@ -36,15 +36,7 @@ class Publish extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
- return [
- 'tag',
- 'access',
- 'dry-run',
- 'otp',
- 'workspace',
- 'workspaces',
- 'include-workspace-root',
- ]
+ return ['tag', 'access', 'dry-run', 'otp', 'workspace', 'workspaces']
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
diff --git a/lib/repo.js b/lib/repo.js
index bf1d1e7ff..e0172d01f 100644
--- a/lib/repo.js
+++ b/lib/repo.js
@@ -19,7 +19,7 @@ class Repo extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
- return ['browser', 'workspace', 'workspaces', 'include-workspace-root']
+ return ['browser', 'workspace', 'workspaces']
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
@@ -48,13 +48,7 @@ class Repo extends BaseCommand {
}
async get (pkg) {
- // XXX It is very odd that `where` is how pacote knows to look anywhere
- // other than the cwd.
- const opts = {
- ...this.npm.flatOptions,
- where: this.npm.localPrefix,
- fullMetadata: true,
- }
+ const opts = { ...this.npm.flatOptions, fullMetadata: true }
const mani = await pacote.manifest(pkg, opts)
const r = mani.repository
diff --git a/lib/run-script.js b/lib/run-script.js
index de847ff28..1daaeb990 100644
--- a/lib/run-script.js
+++ b/lib/run-script.js
@@ -38,7 +38,6 @@ class RunScript extends BaseCommand {
return [
'workspace',
'workspaces',
- 'include-workspace-root',
'if-present',
'ignore-scripts',
'script-shell',
diff --git a/lib/set-script.js b/lib/set-script.js
index 185c4cc90..24e4d8f20 100644
--- a/lib/set-script.js
+++ b/lib/set-script.js
@@ -12,7 +12,7 @@ class SetScript extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
- return ['workspace', 'workspaces', 'include-workspace-root']
+ return ['workspace', 'workspaces']
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
diff --git a/lib/utils/completion/installed-deep.js b/lib/utils/completion/installed-deep.js
index 62686f9b2..590955a1e 100644
--- a/lib/utils/completion/installed-deep.js
+++ b/lib/utils/completion/installed-deep.js
@@ -7,7 +7,6 @@ const installedDeep = async (npm) => {
depth,
global,
prefix,
- workspacesEnabled,
} = npm.flatOptions
const getValues = (tree) =>
@@ -20,18 +19,14 @@ const installedDeep = async (npm) => {
.sort((a, b) => (a.depth - b.depth) || localeCompare(a.name, b.name))
const res = new Set()
- const gArb = new Arborist({
- global: true,
- path: resolve(npm.globalDir, '..'),
- workspacesEnabled,
- })
+ const gArb = new Arborist({ global: true, path: resolve(npm.globalDir, '..') })
const gTree = await gArb.loadActual({ global: true })
for (const node of getValues(gTree))
res.add(global ? node.name : [node.name, '-g'])
if (!global) {
- const arb = new Arborist({ global: false, path: prefix, workspacesEnabled })
+ const arb = new Arborist({ global: false, path: prefix })
const tree = await arb.loadActual()
for (const node of getValues(tree))
res.add(node.name)
diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js
index 57a50d1c8..009f60a7b 100644
--- a/lib/utils/config/definitions.js
+++ b/lib/utils/config/definitions.js
@@ -918,19 +918,6 @@ define('include-staged', {
flatten,
})
-define('include-workspace-root', {
- default: false,
- type: Boolean,
- description: `
- Include the workspace root when workspaces are enabled for a command.
-
- When false, specifying individual workspaces via the \`workspace\` config,
- or all workspaces via the \`workspaces\` flag, will cause npm to operate only
- on the specified workspaces, and not on the root project.
- `,
- flatten,
-})
-
define('init-author-email', {
default: '',
type: String,
@@ -2150,8 +2137,8 @@ define('workspace', {
* Workspace names
* Path to a workspace directory
- * Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+ * Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the \`npm init\` command, this may be set to the folder of
a workspace which does not yet exist, to create the folder and set it
@@ -2163,34 +2150,16 @@ define('workspace', {
})
define('workspaces', {
- default: null,
- type: [null, Boolean],
+ default: false,
+ type: Boolean,
short: 'ws',
envExport: false,
description: `
- Set to true to run the command in the context of **all** configured
+ Enable running a command in the context of **all** the configured
workspaces.
-
- Explicitly setting this to false will cause commands like \`install\` to
- ignore workspaces altogether.
- When not set explicitly:
-
- - Commands that operate on the \`node_modules\` tree (install, update,
- etc.) will link workspaces into the \`node_modules\` folder.
- - Commands that do other things (test, exec, publish, etc.) will operate
- on the root project, _unless_ one or more workspaces are specified in
- the \`workspace\` config.
`,
flatten: (key, obj, flatOptions) => {
definitions['user-agent'].flatten('user-agent', obj, flatOptions)
-
- // TODO: this is a derived value, and should be reworked when we have a
- // pattern for derived value
-
- // workspacesEnabled is true whether workspaces is null or true
- // commands contextually work with workspaces or not regardless of
- // configuration, so we need an option specifically to disable workspaces
- flatOptions.workspacesEnabled = obj[key] !== false
},
})
diff --git a/lib/version.js b/lib/version.js
index 917a64747..f3680fe8b 100644
--- a/lib/version.js
+++ b/lib/version.js
@@ -26,7 +26,6 @@ class Version extends BaseCommand {
'sign-git-tag',
'workspace',
'workspaces',
- 'include-workspace-root',
]
}
diff --git a/lib/view.js b/lib/view.js
index 46b1b5edf..0124bfb7d 100644
--- a/lib/view.js
+++ b/lib/view.js
@@ -31,7 +31,6 @@ class View extends BaseCommand {
'json',
'workspace',
'workspaces',
- 'include-workspace-root',
]
}
diff --git a/lib/workspaces/arborist-cmd.js b/lib/workspaces/arborist-cmd.js
index a75b351be..cb6b66b8c 100644
--- a/lib/workspaces/arborist-cmd.js
+++ b/lib/workspaces/arborist-cmd.js
@@ -4,21 +4,16 @@
const BaseCommand = require('../base-command.js')
class ArboristCmd extends BaseCommand {
- get isArboristCmd () {
- return true
- }
-
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return [
'workspace',
'workspaces',
- 'include-workspace-root',
]
}
execWorkspaces (args, filters, cb) {
- this.setWorkspaces(filters, true)
+ this.setWorkspaces(filters)
.then(() => {
this.exec(args, cb)
})
diff --git a/lib/workspaces/get-workspaces.js b/lib/workspaces/get-workspaces.js
index 3eb8e4865..91b007455 100644
--- a/lib/workspaces/get-workspaces.js
+++ b/lib/workspaces/get-workspaces.js
@@ -5,16 +5,11 @@ const rpj = require('read-package-json-fast')
// Returns an Map of paths to workspaces indexed by workspace name
// { foo => '/path/to/foo' }
-const getWorkspaces = async (filters, { path, includeWorkspaceRoot }) => {
+const getWorkspaces = async (filters, { path }) => {
// TODO we need a better error to be bubbled up here if this rpj call fails
const pkg = await rpj(resolve(path, 'package.json'))
const workspaces = await mapWorkspaces({ cwd: path, pkg })
- let res = new Map()
- if (includeWorkspaceRoot)
- res.set(pkg.name, path)
-
- if (!filters.length)
- res = new Map([...res, ...workspaces])
+ const res = filters.length ? new Map() : workspaces
for (const filterArg of filters) {
for (const [workspaceName, workspacePath] of workspaces.entries()) {
diff --git a/package-lock.json b/package-lock.json
index ec78e50f9..b8decbc1a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,7 +8,6 @@
"name": "npm",
"version": "7.24.1",
"bundleDependencies": [
- "@isaacs/string-locale-compare",
"@npmcli/arborist",
"@npmcli/ci-detect",
"@npmcli/config",
diff --git a/package.json b/package.json
index f4cde1d17..31083ff0b 100644
--- a/package.json
+++ b/package.json
@@ -125,7 +125,6 @@
"write-file-atomic": "^3.0.3"
},
"bundleDependencies": [
- "@isaacs/string-locale-compare",
"@npmcli/arborist",
"@npmcli/ci-detect",
"@npmcli/config",
diff --git a/tap-snapshots/test/lib/config.js.test.cjs b/tap-snapshots/test/lib/config.js.test.cjs
index 805370351..b21b75cd2 100644
--- a/tap-snapshots/test/lib/config.js.test.cjs
+++ b/tap-snapshots/test/lib/config.js.test.cjs
@@ -68,7 +68,6 @@ exports[`test/lib/config.js TAP config list --json > output matches snapshot 1`]
"ignore-scripts": false,
"include": [],
"include-staged": false,
- "include-workspace-root": false,
"init-author-email": "",
"init-author-name": "",
"init-author-url": "",
@@ -153,7 +152,7 @@ exports[`test/lib/config.js TAP config list --json > output matches snapshot 1`]
"viewer": "{VIEWER}",
"which": null,
"workspace": [],
- "workspaces": null,
+ "workspaces": false,
"yes": null,
"metrics-registry": "https://registry.npmjs.org/"
}
@@ -218,7 +217,6 @@ if-present = false
ignore-scripts = false
include = []
include-staged = false
-include-workspace-root = false
init-author-email = ""
init-author-name = ""
init-author-url = ""
@@ -305,7 +303,7 @@ versions = false
viewer = "{VIEWER}"
which = null
workspace = []
-workspaces = null
+workspaces = false
yes = null
; "global" config from {GLOBALPREFIX}/npmrc
diff --git a/tap-snapshots/test/lib/dist-tag.js.test.cjs b/tap-snapshots/test/lib/dist-tag.js.test.cjs
index f651f7b67..21d9331db 100644
--- a/tap-snapshots/test/lib/dist-tag.js.test.cjs
+++ b/tap-snapshots/test/lib/dist-tag.js.test.cjs
@@ -18,7 +18,7 @@ npm dist-tag ls [<pkg>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: dist-tags
@@ -40,7 +40,7 @@ npm dist-tag ls [<pkg>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: dist-tags
@@ -71,7 +71,7 @@ npm dist-tag ls [<pkg>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: dist-tags
@@ -93,7 +93,7 @@ npm dist-tag ls [<pkg>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: dist-tags
@@ -121,7 +121,7 @@ npm dist-tag ls [<pkg>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: dist-tags
@@ -179,7 +179,7 @@ npm dist-tag ls [<pkg>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: dist-tags
diff --git a/tap-snapshots/test/lib/init.js.test.cjs b/tap-snapshots/test/lib/init.js.test.cjs
index 37ad8c3a8..95abbe6c1 100644
--- a/tap-snapshots/test/lib/init.js.test.cjs
+++ b/tap-snapshots/test/lib/init.js.test.cjs
@@ -5,10 +5,6 @@
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
-exports[`test/lib/init.js TAP npm init workspces with root > should print helper info 1`] = `
-Array []
-`
-
exports[`test/lib/init.js TAP workspaces no args > should print helper info 1`] = `
Array [
Array [
diff --git a/tap-snapshots/test/lib/load-all-commands.js.test.cjs b/tap-snapshots/test/lib/load-all-commands.js.test.cjs
index d287d1284..9f811a005 100644
--- a/tap-snapshots/test/lib/load-all-commands.js.test.cjs
+++ b/tap-snapshots/test/lib/load-all-commands.js.test.cjs
@@ -56,7 +56,7 @@ Options:
[--json] [--package-lock-only]
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
Run "npm help audit" for more info
`
@@ -173,7 +173,7 @@ Options:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: ddp
@@ -208,7 +208,7 @@ Options:
[--diff-no-prefix] [--diff-src-prefix <path>] [--diff-dst-prefix <path>]
[--diff-text] [-g|--global] [--tag <tag>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
Run "npm help diff" for more info
`
@@ -225,7 +225,7 @@ npm dist-tag ls [<pkg>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: dist-tags
@@ -243,7 +243,7 @@ npm docs [<pkgname> [<pkgname> ...]]
Options:
[--no-browser|--browser <browser>] [--registry <registry>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: home
@@ -293,7 +293,7 @@ Options:
[--package <pkg>[@<version>] [--package <pkg>[@<version>] ...]]
[-c|--call <call>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: x
@@ -343,7 +343,7 @@ Options:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
Run "npm help find-dupes" for more info
`
@@ -452,7 +452,7 @@ Options:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
aliases: i, in, ins, inst, insta, instal, isnt, isnta, isntal, add
@@ -499,7 +499,7 @@ Options:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: it
@@ -522,7 +522,7 @@ Options:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: ln
@@ -542,7 +542,7 @@ Options:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link]
[--package-lock-only] [--unicode]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: la
@@ -592,7 +592,7 @@ Options:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link]
[--package-lock-only] [--unicode]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: list
@@ -661,7 +661,7 @@ npm pack [[<@scope>/]<pkg>...]
Options:
[--dry-run] [--json] [--pack-destination <pack-destination>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
Run "npm help pack" for more info
`
@@ -740,7 +740,7 @@ npm prune [[<@scope>/]<pkg>...]
Options:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--dry-run]
[--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
Run "npm help prune" for more info
`
@@ -756,7 +756,7 @@ npm publish [<folder>]
Options:
[--tag <tag>] [--access <restricted|public>] [--dry-run] [--otp <otp>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
Run "npm help publish" for more info
`
@@ -772,7 +772,7 @@ npm rebuild [[<@scope>/]<name>[@<version>] ...]
Options:
[-g|--global] [--no-bin-links] [--ignore-scripts]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: rb
@@ -790,7 +790,7 @@ npm repo [<pkgname> [<pkgname> ...]]
Options:
[--no-browser|--browser <browser>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
Run "npm help repo" for more info
`
@@ -833,7 +833,7 @@ npm run-script <command> [-- <args>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts]
+[-ws|--workspaces] [--if-present] [--ignore-scripts]
[--script-shell <script-shell>]
aliases: run, rum, urn
@@ -880,7 +880,7 @@ npm set-script [<script>] [<command>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
Run "npm help set-script" for more info
`
@@ -1014,7 +1014,7 @@ npm uninstall [<@scope>/]<pkg>...
Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
aliases: un, unlink, remove, rm, r
@@ -1064,7 +1064,7 @@ Options:
[--no-package-lock] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
aliases: up, upgrade, udpate
@@ -1083,7 +1083,7 @@ Options:
[--allow-same-version] [--no-commit-hooks] [--no-git-tag-version] [--json]
[--preid prerelease-id] [--sign-git-tag]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
alias: verison
@@ -1100,7 +1100,7 @@ npm view [<@scope>/]<pkg>[@<version>] [<field>[.subfield]...]
Options:
[--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
aliases: v, info, show
diff --git a/tap-snapshots/test/lib/ls.js.test.cjs b/tap-snapshots/test/lib/ls.js.test.cjs
index c550f447c..c3d0a8764 100644
--- a/tap-snapshots/test/lib/ls.js.test.cjs
+++ b/tap-snapshots/test/lib/ls.js.test.cjs
@@ -547,12 +547,6 @@ exports[`test/lib/ls.js TAP ls loading a tree containing workspaces > should lis

`
-exports[`test/lib/ls.js TAP ls loading a tree containing workspaces > should not list workspaces with --no-workspaces 1`] = `
-workspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspaces
-\`-- (empty)
-
-`
-
exports[`test/lib/ls.js TAP ls loading a tree containing workspaces > should print all tree and filter by dep within only the ws subtree 1`] = `
workspaces-tree@1.0.0 {CWD}/tap-testdir-ls-ls-loading-a-tree-containing-workspaces
\`-- d@1.0.0 -> ./d
diff --git a/tap-snapshots/test/lib/outdated.js.test.cjs b/tap-snapshots/test/lib/outdated.js.test.cjs
index 2f5c164f4..9f589d013 100644
--- a/tap-snapshots/test/lib/outdated.js.test.cjs
+++ b/tap-snapshots/test/lib/outdated.js.test.cjs
@@ -192,14 +192,6 @@ exports[`test/lib/outdated.js TAP workspaces > should display no results if ws h
`
-exports[`test/lib/outdated.js TAP workspaces > should display only root outdated when ws disabled 1`] = `
-
-`
-
-exports[`test/lib/outdated.js TAP workspaces > should display only root outdated when ws disabled 2`] = `
-
-`
-
exports[`test/lib/outdated.js TAP workspaces > should display parseable results filtered by ws 1`] = `
{CWD}/test/lib/tap-testdir-outdated-workspaces/node_modules/cat:cat@1.0.1:cat@1.0.0:cat@1.0.1:a
diff --git a/tap-snapshots/test/lib/publish.js.test.cjs b/tap-snapshots/test/lib/publish.js.test.cjs
index f028494b9..13e8f7d4b 100644
--- a/tap-snapshots/test/lib/publish.js.test.cjs
+++ b/tap-snapshots/test/lib/publish.js.test.cjs
@@ -53,7 +53,7 @@ npm publish [<folder>]
Options:
[--tag <tag>] [--access <restricted|public>] [--dry-run] [--otp <otp>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
-[-ws|--workspaces] [--include-workspace-root]
+[-ws|--workspaces]
Run "npm help publish" for more info {
"code": "EUSAGE",
diff --git a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs
index fcfec5941..9d5fe79af 100644
--- a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs
+++ b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs
@@ -63,7 +63,6 @@ Array [
"ignore-scripts",
"include",
"include-staged",
- "include-workspace-root",
"init-author-email",
"init-author-name",
"init-author-url",
@@ -832,19 +831,6 @@ Allow installing "staged" published packages, as defined by [npm RFC PR
This is experimental, and not implemented by the npm public registry.
`
-exports[`test/lib/utils/config/definitions.js TAP > config description for include-workspace-root 1`] = `
-#### \`include-workspace-root\`
-
-* Default: false
-* Type: Boolean
-
-Include the workspace root when workspaces are enabled for a command.
-
-When false, specifying individual workspaces via the \`workspace\` config, or
-all workspaces via the \`workspaces\` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
-`
-
exports[`test/lib/utils/config/definitions.js TAP > config description for init-author-email 1`] = `
#### \`init-author-email\`
@@ -1853,8 +1839,8 @@ Valid values for the \`workspace\` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the \`npm init\` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -1866,20 +1852,12 @@ This value is not exported to the environment for child processes.
exports[`test/lib/utils/config/definitions.js TAP > config description for workspaces 1`] = `
#### \`workspaces\`
-* Default: null
-* Type: null or Boolean
+* Default: false
+* Type: Boolean
-Set to true to run the command in the context of **all** configured
+Enable running a command in the context of **all** the configured
workspaces.
-Explicitly setting this to false will cause commands like \`install\` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the \`node_modules\` tree (install, update, etc.)
-will link workspaces into the \`node_modules\` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the \`workspace\` config.
-
This value is not exported to the environment for child processes.
`
diff --git a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs
index ff401d0d7..4e3efb916 100644
--- a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs
+++ b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs
@@ -680,20 +680,6 @@ This is experimental, and not implemented by the npm public registry.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
-#### \`include-workspace-root\`
-
-* Default: false
-* Type: Boolean
-
-Include the workspace root when workspaces are enabled for a command.
-
-When false, specifying individual workspaces via the \`workspace\` config, or
-all workspaces via the \`workspaces\` flag, will cause npm to operate only on
-the specified workspaces, and not on the root project.
-
-<!-- automatically generated, do not edit manually -->
-<!-- see lib/utils/config/definitions.js -->
-
#### \`init-author-email\`
* Default: ""
@@ -1632,8 +1618,8 @@ Valid values for the \`workspace\` config are either:
* Workspace names
* Path to a workspace directory
-* Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
When set for the \`npm init\` command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -1646,20 +1632,12 @@ This value is not exported to the environment for child processes.
#### \`workspaces\`
-* Default: null
-* Type: null or Boolean
+* Default: false
+* Type: Boolean
-Set to true to run the command in the context of **all** configured
+Enable running a command in the context of **all** the configured
workspaces.
-Explicitly setting this to false will cause commands like \`install\` to
-ignore workspaces altogether. When not set explicitly:
-
-- Commands that operate on the \`node_modules\` tree (install, update, etc.)
-will link workspaces into the \`node_modules\` folder. - Commands that do
-other things (test, exec, publish, etc.) will operate on the root project,
-_unless_ one or more workspaces are specified in the \`workspace\` config.
-
This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
diff --git a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs
index 0273adf99..0fd36c7c1 100644
--- a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs
+++ b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs
@@ -211,7 +211,7 @@ All commands:
[--json] [--package-lock-only]
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
Run "npm help audit" for more info
@@ -314,7 +314,7 @@ All commands:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
alias: ddp
@@ -345,7 +345,7 @@ All commands:
[--diff-no-prefix] [--diff-src-prefix <path>] [--diff-dst-prefix <path>]
[--diff-text] [-g|--global] [--tag <tag>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
Run "npm help diff" for more info
@@ -360,7 +360,7 @@ All commands:
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
alias: dist-tags
@@ -376,7 +376,7 @@ All commands:
Options:
[--no-browser|--browser <browser>] [--registry <registry>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
alias: home
@@ -420,7 +420,7 @@ All commands:
[--package <pkg>[@<version>] [--package <pkg>[@<version>] ...]]
[-c|--call <call>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
alias: x
@@ -464,7 +464,7 @@ All commands:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
Run "npm help find-dupes" for more info
@@ -561,7 +561,7 @@ All commands:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
aliases: i, in, ins, inst, insta, instal, isnt, isnta, isntal, add
@@ -604,7 +604,7 @@ All commands:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
alias: it
@@ -625,7 +625,7 @@ All commands:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
alias: ln
@@ -643,7 +643,7 @@ All commands:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link]
[--package-lock-only] [--unicode]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
alias: la
@@ -687,7 +687,7 @@ All commands:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link]
[--package-lock-only] [--unicode]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
alias: list
@@ -748,7 +748,7 @@ All commands:
Options:
[--dry-run] [--json] [--pack-destination <pack-destination>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
Run "npm help pack" for more info
@@ -817,7 +817,7 @@ All commands:
Options:
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--dry-run]
[--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
Run "npm help prune" for more info
@@ -831,7 +831,7 @@ All commands:
Options:
[--tag <tag>] [--access <restricted|public>] [--dry-run] [--otp <otp>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
Run "npm help publish" for more info
@@ -845,7 +845,7 @@ All commands:
Options:
[-g|--global] [--no-bin-links] [--ignore-scripts]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
alias: rb
@@ -861,7 +861,7 @@ All commands:
Options:
[--no-browser|--browser <browser>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
Run "npm help repo" for more info
@@ -898,7 +898,7 @@ All commands:
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts]
+ [-ws|--workspaces] [--if-present] [--ignore-scripts]
[--script-shell <script-shell>]
aliases: run, rum, urn
@@ -939,7 +939,7 @@ All commands:
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
Run "npm help set-script" for more info
@@ -1055,7 +1055,7 @@ All commands:
Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
aliases: un, unlink, remove, rm, r
@@ -1099,7 +1099,7 @@ All commands:
[--no-package-lock] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
aliases: up, upgrade, udpate
@@ -1116,7 +1116,7 @@ All commands:
[--allow-same-version] [--no-commit-hooks] [--no-git-tag-version] [--json]
[--preid prerelease-id] [--sign-git-tag]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
alias: verison
@@ -1131,7 +1131,7 @@ All commands:
Options:
[--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
- [-ws|--workspaces] [--include-workspace-root]
+ [-ws|--workspaces]
aliases: v, info, show
diff --git a/test/lib/explain.js b/test/lib/explain.js
index ebec13619..f690aeb2c 100644
--- a/test/lib/explain.js
+++ b/test/lib/explain.js
@@ -2,7 +2,7 @@ const t = require('tap')
const npm = {
prefix: null,
color: true,
- flatOptions: { workspacesEnabled: true },
+ flatOptions: {},
output: (...args) => {
OUTPUT.push(args)
},
@@ -301,80 +301,3 @@ t.test('workspaces', async t => {
})
})
})
-
-t.test('workspaces disabled', async t => {
- npm.localPrefix = npm.prefix = t.testdir({
- 'package.json': JSON.stringify({
- name: 'workspaces-project',
- version: '1.0.0',
- workspaces: ['packages/*'],
- dependencies: {
- abbrev: '^1.0.0',
- },
- }),
- node_modules: {
- a: t.fixture('symlink', '../packages/a'),
- b: t.fixture('symlink', '../packages/b'),
- c: t.fixture('symlink', '../packages/c'),
- once: {
- 'package.json': JSON.stringify({
- name: 'once',
- version: '1.0.0',
- dependencies: {
- wrappy: '2.0.0',
- },
- }),
- },
- abbrev: {
- 'package.json': JSON.stringify({
- name: 'abbrev',
- version: '1.0.0',
- }),
- },
- wrappy: {
- 'package.json': JSON.stringify({
- name: 'wrappy',
- version: '2.0.0',
- }),
- },
- },
- packages: {
- a: {
- 'package.json': JSON.stringify({
- name: 'a',
- version: '1.0.0',
- dependencies: {
- once: '1.0.0',
- },
- }),
- },
- b: {
- 'package.json': JSON.stringify({
- name: 'b',
- version: '1.0.0',
- dependencies: {
- abbrev: '^1.0.0',
- },
- }),
- },
- c: {
- 'package.json': JSON.stringify({
- name: 'c',
- version: '1.0.0',
- }),
- },
- },
- })
-
- await new Promise((res, rej) => {
- explain.npm.flatOptions.workspacesEnabled = false
- explain.exec(['once'], err => {
- t.equal(
- err,
- 'No dependencies found matching once',
- 'should throw usage if dep not found when excluding ws'
- )
- res()
- })
- })
-})
diff --git a/test/lib/init.js b/test/lib/init.js
index 20699d879..1cefb1fc9 100644
--- a/test/lib/init.js
+++ b/test/lib/init.js
@@ -513,26 +513,3 @@ t.test('workspaces', t => {
t.end()
})
-t.test('npm init workspces with root', t => {
- t.teardown(() => {
- npm._mockOutputs.length = 0
- })
- npm.localPrefix = t.testdir({})
- npm.flatOptions.includeWorkspaceRoot = true
-
- // init-package-json prints directly to console.log
- // this avoids poluting test output with those logs
- console.log = noop
-
- process.chdir(npm.localPrefix)
- init.execWorkspaces([], ['packages/a'], err => {
- if (err)
- throw err
-
- const pkg = require(resolve(npm.localPrefix, 'package.json'))
- t.equal(pkg.version, '1.0.0')
- t.equal(pkg.license, 'ISC')
- t.matchSnapshot(npm._mockOutputs, 'should print helper info')
- t.end()
- })
-})
diff --git a/test/lib/ls.js b/test/lib/ls.js
index 46dfd7fba..5f196501e 100644
--- a/test/lib/ls.js
+++ b/test/lib/ls.js
@@ -110,7 +110,6 @@ const config = {
'package-lock-only': false,
}
const flatOptions = {
- workspacesEnabled: true,
}
const npm = mockNpm({
config,
@@ -1531,25 +1530,6 @@ t.test('ls', (t) => {
})
})
- await new Promise((res, rej) => {
- config.all = false
- config.depth = 0
- npm.color = true
- npm.flatOptions.workspacesEnabled = false
- ls.exec([], (err) => {
- if (err)
- rej(err)
-
- t.matchSnapshot(redactCwd(result),
- 'should not list workspaces with --no-workspaces')
- config.all = true
- config.depth = Infinity
- npm.color = false
- npm.flatOptions.workspacesEnabled = true
- res()
- })
- })
-
// --all
await new Promise((res, rej) => {
ls.exec([], (err) => {
diff --git a/test/lib/npm.js b/test/lib/npm.js
index aa31147fa..03bb46d8d 100644
--- a/test/lib/npm.js
+++ b/test/lib/npm.js
@@ -292,44 +292,6 @@ t.test('npm.load', t => {
await new Promise((res) => setTimeout(res))
})
- t.test('--no-workspaces with --workspace', async t => {
- const dir = t.testdir({
- packages: {
- a: {
- 'package.json': JSON.stringify({
- name: 'a',
- version: '1.0.0',
- scripts: { test: 'echo test a' },
- }),
- },
- },
- 'package.json': JSON.stringify({
- name: 'root',
- version: '1.0.0',
- workspaces: ['./packages/*'],
- }),
- })
- process.argv = [
- process.execPath,
- process.argv[1],
- '--userconfig', resolve(dir, '.npmrc'),
- '--color', 'false',
- '--workspaces', 'false',
- '--workspace', 'a',
- ]
- const { npm } = mockNpm(t)
- await npm.load()
- npm.localPrefix = dir
- await new Promise((res, rej) => {
- npm.commands.run([], er => {
- if (!er)
- return rej(new Error('Expected an error'))
- t.match(er.message, 'Can not use --no-workspaces and --workspace at the same time')
- res()
- })
- })
- })
-
t.test('workspace-aware configs and commands', async t => {
const dir = t.testdir({
packages: {
diff --git a/test/lib/outdated.js b/test/lib/outdated.js
index 76e97ff52..518436d0a 100644
--- a/test/lib/outdated.js
+++ b/test/lib/outdated.js
@@ -83,10 +83,6 @@ const globalDir = t.testdir({
},
})
-const flatOptions = {
- workspacesEnabled: true,
-}
-
const outdated = (dir, opts) => {
logs = ''
const Outdated = t.mock('../../lib/outdated.js', {
@@ -98,7 +94,6 @@ const outdated = (dir, opts) => {
...opts,
localPrefix: dir,
prefix: dir,
- flatOptions,
globalDir: `${globalDir}/node_modules`,
output,
})
@@ -567,30 +562,6 @@ t.test('workspaces', async t => {
})
await new Promise((res, rej) => {
- flatOptions.workspacesEnabled = false
- outdated(testDir, {}).exec([], err => {
- if (err)
- rej(err)
-
- t.matchSnapshot(logs, 'should display only root outdated when ws disabled')
- flatOptions.workspacesEnabled = true
- res()
- })
- })
-
- await new Promise((res, rej) => {
- flatOptions.workspacesEnabled = false
- outdated(testDir, {}).exec([], err => {
- if (err)
- rej(err)
-
- t.matchSnapshot(logs, 'should display only root outdated when ws disabled')
- flatOptions.workspacesEnabled = true
- res()
- })
- })
-
- await new Promise((res, rej) => {
outdated(testDir, {
config: {
json: true,
diff --git a/test/lib/publish.js b/test/lib/publish.js
index 8e5a853c4..6e0075835 100644
--- a/test/lib/publish.js
+++ b/test/lib/publish.js
@@ -61,7 +61,6 @@ t.test('should publish with libnpmpublish, passing through flatOptions and respe
const npm = mockNpm({
flatOptions: {
customValue: true,
- workspacesEnabled: true,
},
})
npm.config.getCredentialsByURI = (uri) => {
diff --git a/test/lib/repo.js b/test/lib/repo.js
index 41bff2744..e1ac90b1e 100644
--- a/test/lib/repo.js
+++ b/test/lib/repo.js
@@ -1,5 +1,5 @@
const t = require('tap')
-const { real: mockNpm } = require('../fixtures/mock-npm.js')
+const { fake: mockNpm } = require('../fixtures/mock-npm.js')
const { join, sep } = require('path')
const pkgDirs = t.testdir({
@@ -154,7 +154,6 @@ const pkgDirs = t.testdir({
name: 'workspaces-test',
version: '1.2.3-test',
workspaces: ['workspace-a', 'workspace-b', 'workspace-c'],
- repository: 'https://github.com/npm/workspaces-test',
}),
'workspace-a': {
'package.json': JSON.stringify({
@@ -186,17 +185,19 @@ const openUrl = async (npm, url, errMsg) => {
opened[url]++
}
-const { command, npm } = mockNpm(t, {
+const Repo = t.mock('../../lib/repo.js', {
'../../lib/utils/open-url.js': openUrl,
})
-t.before(async () => {
- await npm.load()
-})
+const flatOptions = {}
+const npm = mockNpm({ flatOptions })
+const repo = new Repo(npm)
t.afterEach(() => opened = {})
t.test('open repo urls', t => {
- npm.localPrefix = pkgDirs
+ // XXX It is very odd that `where` is how pacote knows to look anywhere other
+ // than the cwd. I would think npm.localPrefix would factor in somehow
+ flatOptions.where = pkgDirs
const expect = {
hostedgit: 'https://github.com/foo/hostedgit',
hostedgitat: 'https://github.com/foo/hostedgitat',
@@ -226,19 +227,22 @@ t.test('open repo urls', t => {
const keys = Object.keys(expect)
t.plan(keys.length)
keys.forEach(pkg => {
- t.test(pkg, async t => {
- await command('repo', [['.', pkg].join(sep)])
- const url = expect[pkg]
- t.match({
- [url]: 1,
- }, opened, `opened ${url}`, {opened})
- t.end()
+ t.test(pkg, t => {
+ repo.exec([['.', pkg].join(sep)], (err) => {
+ if (err)
+ throw err
+ const url = expect[pkg]
+ t.match({
+ [url]: 1,
+ }, opened, `opened ${url}`, {opened})
+ t.end()
+ })
})
})
})
t.test('fail if cannot figure out repo url', t => {
- npm.localPrefix = pkgDirs
+ flatOptions.where = pkgDirs
const cases = [
'norepo',
'repoobbj-nourl',
@@ -249,65 +253,57 @@ t.test('fail if cannot figure out repo url', t => {
t.plan(cases.length)
cases.forEach(pkg => {
- t.test(pkg, async t => {
- t.rejects(
- command('repo', [['.', pkg].join(sep)]),
- { pkgid: pkg }
- )
+ t.test(pkg, t => {
+ repo.exec([['.', pkg].join(sep)], (err) => {
+ t.match(err, { pkgid: pkg })
+ t.end()
+ })
})
})
})
-t.test('open default package if none specified', async t => {
- npm.localPrefix = pkgDirs
- await command('repo', [])
- t.equal(opened['https://example.com/thispkg'], 1, 'opened expected url', {opened})
+t.test('open default package if none specified', t => {
+ flatOptions.where = pkgDirs
+ repo.exec([], (er) => {
+ if (er)
+ throw er
+ t.equal(opened['https://example.com/thispkg'], 1, 'opened expected url', {opened})
+ t.end()
+ })
})
t.test('workspaces', t => {
+ flatOptions.where = undefined
npm.localPrefix = join(pkgDirs, 'workspaces')
- t.afterEach(() => {
- npm.config.set('workspaces', null)
- npm.config.set('workspace', [])
- npm.config.set('include-workspace-root', false)
- })
-
- t.test('include workspace root', async (t) => {
- npm.config.set('workspaces', true)
- npm.config.set('include-workspace-root', true)
- await command('repo', [])
- t.match({
- 'https://github.com/npm/workspaces-test': 1,
- 'https://repo.workspace-a/': 1, // Gets translated to https!
- 'https://github.com/npm/workspace-b': 1,
- }, opened, 'opened two valid repo urls')
- })
-
- t.test('all workspaces', async (t) => {
- npm.config.set('workspaces', true)
- await command('repo', [])
- t.match({
- 'https://repo.workspace-a/': 1, // Gets translated to https!
- 'https://github.com/npm/workspace-b': 1,
- }, opened, 'opened two valid repo urls')
+ t.test('all workspaces', (t) => {
+ repo.execWorkspaces([], [], (err) => {
+ t.notOk(err)
+ t.match({
+ 'https://repo.workspace-a/': 1, // Gets translated to https!
+ 'https://github.com/npm/workspace-b': 1,
+ }, opened, 'opened two valid repo urls')
+ t.end()
+ })
})
- t.test('one workspace', async (t) => {
- npm.config.set('workspace', ['workspace-a'])
- await command('repo', [])
- t.match({
- 'https://repo.workspace-a/': 1,
- }, opened, 'opened one requested repo urls')
+ t.test('one workspace', (t) => {
+ repo.execWorkspaces([], ['workspace-a'], (err) => {
+ t.notOk(err)
+ t.match({
+ 'https://repo.workspace-a/': 1,
+ }, opened, 'opened one requested repo urls')
+ t.end()
+ })
})
- t.test('invalid workspace', async (t) => {
- npm.config.set('workspace', ['workspace-x'])
- await t.rejects(
- command('repo', []),
- /workspace-x/
- )
- t.match({}, opened, 'opened no repo urls')
+ t.test('invalid workspace', (t) => {
+ repo.execWorkspaces([], ['workspace-x'], (err) => {
+ t.match(err, /No workspaces found/)
+ t.match(err, /workspace-x/)
+ t.match({}, opened, 'opened no repo urls')
+ t.end()
+ })
})
t.end()
})
diff --git a/test/lib/utils/completion/installed-deep.js b/test/lib/utils/completion/installed-deep.js
index f0e36faee..aa0d85ec1 100644
--- a/test/lib/utils/completion/installed-deep.js
+++ b/test/lib/utils/completion/installed-deep.js
@@ -6,7 +6,6 @@ let globalDir = 'MISSING_GLOBAL_DIR'
const _flatOptions = {
depth: Infinity,
global: false,
- workspacesEnabled: true,
get prefix () {
return prefix
},
diff --git a/test/lib/utils/config/definitions.js b/test/lib/utils/config/definitions.js
index 622e603bc..88993303b 100644
--- a/test/lib/utils/config/definitions.js
+++ b/test/lib/utils/config/definitions.js
@@ -875,20 +875,3 @@ t.test('workspace', t => {
t.match(flat.userAgent, /workspaces\/true/)
t.end()
})
-
-t.test('workspaces derived', t => {
- const obj = {
- workspaces: ['a'],
- 'user-agent': definitions['user-agent'].default,
- }
- const flat = {}
- definitions.workspaces.flatten('workspaces', obj, flat)
- t.equal(flat.workspacesEnabled, true)
- obj.workspaces = null
- definitions.workspaces.flatten('workspaces', obj, flat)
- t.equal(flat.workspacesEnabled, true)
- obj.workspaces = false
- definitions.workspaces.flatten('workspaces', obj, flat)
- t.equal(flat.workspacesEnabled, false)
- t.end()
-})
diff --git a/test/lib/workspaces/get-workspaces.js b/test/lib/workspaces/get-workspaces.js
index 0f51d95fc..4ea055e02 100644
--- a/test/lib/workspaces/get-workspaces.js
+++ b/test/lib/workspaces/get-workspaces.js
@@ -86,17 +86,6 @@ t.test('get-workspaces', async t => {
'should filter by package name'
)
- workspaces = await getWorkspaces(['a', 'b'], { path, includeWorkspaceRoot: true })
- t.same(
- clean(workspaces, path),
- new Map(Object.entries({
- x: '{PATH}',
- a: '{PATH}/packages/a',
- b: '{PATH}/packages/b',
- })),
- 'include rootspace root'
- )
-
workspaces = await getWorkspaces(['./packages/c'], { path })
t.same(
clean(workspaces, path),