Skip to content

Instantly share code, notes, and snippets.

@isaacs
Last active May 13, 2021 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/d108e87dd0f847d9d108aac7555a301b to your computer and use it in GitHub Desktop.
Save isaacs/d108e87dd0f847d9d108aac7555a301b to your computer and use it in GitHub Desktop.
diff --git a/docs/content/commands/npm-exec.md b/docs/content/commands/npm-exec.md
index 2364da32c..f728ac6e0 100644
--- a/docs/content/commands/npm-exec.md
+++ b/docs/content/commands/npm-exec.md
@@ -260,18 +260,21 @@ an error.
#### workspace
-* Alias: `-w`
-* Type: Array
-* Default: `[]`
+* Default:
+* Type: String (can be set multiple times)
-Enable running scripts in the context of workspaces while also filtering by
-the provided names or paths provided.
+Enable running a command in the context of the configured workspaces of the
+current project while filtering by running only the workspaces defined by
+this configuration option.
Valid values for the `workspace` config are either:
-- Workspace names
-- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-children workspaces)
+
+* Workspace names
+* Path to a workspace directory
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
+
+This value is not exported to the environment for child processes.
#### workspaces
diff --git a/docs/content/commands/npm-init.md b/docs/content/commands/npm-init.md
index 8288034a3..bf8ba5ebf 100644
--- a/docs/content/commands/npm-init.md
+++ b/docs/content/commands/npm-init.md
@@ -167,21 +167,21 @@ an error.
#### workspace
-* Alias: `-w`
-* Type: Array
-* Default: `[]`
+* Default:
+* Type: String (can be set multiple times)
-Enable running `npm init` in the context of workspaces, creating any missing
-folders, generating files and adding/updating the `"workspaces"` property of
-the project `package.json`.
-
-the provided names or paths provided.
+Enable running a command in the context of the configured workspaces of the
+current project while filtering by running only the workspaces defined by
+this configuration option.
Valid values for the `workspace` config are either:
-- Workspace names
-- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-children workspaces)
+
+* Workspace names
+* Path to a workspace directory
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
+
+This value is not exported to the environment for child processes.
#### workspaces
diff --git a/docs/content/commands/npm-run-script.md b/docs/content/commands/npm-run-script.md
index 6786312e0..ee82238ce 100644
--- a/docs/content/commands/npm-run-script.md
+++ b/docs/content/commands/npm-run-script.md
@@ -174,18 +174,21 @@ You can use the `--silent` flag to prevent showing `npm ERR!` output on error.
#### workspace
-* Alias: `-w`
-* Type: Array
-* Default: `[]`
+* Default:
+* Type: String (can be set multiple times)
-Enable running scripts in the context of workspaces while also filtering by
-the provided names or paths provided.
+Enable running a command in the context of the configured workspaces of the
+current project while filtering by running only the workspaces defined by
+this configuration option.
Valid values for the `workspace` config are either:
-- Workspace names
-- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-children workspaces)
+
+* Workspace names
+* Path to a workspace directory
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
+
+This value is not exported to the environment for child processes.
#### workspaces
diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md
index d8fb70fb7..0c72c768f 100644
--- a/docs/content/using-npm/config.md
+++ b/docs/content/using-npm/config.md
@@ -1325,9 +1325,12 @@ Enable running a command in the context of the configured workspaces of the
current project while filtering by running only the workspaces defined by
this configuration option.
-Valid values for the `workspace` config are either: - Workspace names - Path
-to a workspace directory - Path to a parent workspace directory (will result
-to selecting all of the nested workspaces)
+Valid values for the `workspace` config are either:
+
+* Workspace names
+* Path to a workspace directory
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
This value is not exported to the environment for child processes.
diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js
index aa90de8e7..e6f4e5bdd 100644
--- a/lib/utils/config/definitions.js
+++ b/lib/utils/config/definitions.js
@@ -2050,10 +2050,11 @@ define('workspace', {
this configuration option.
Valid values for the \`workspace\` config are either:
- - Workspace names
- - Path to a workspace directory
- - Path to a parent workspace directory (will result to selecting all of the
- nested workspaces)
+
+ * Workspace names
+ * Path to a workspace directory
+ * Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
`,
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment