diff --git a/docs/content/commands/npm-audit.md b/docs/content/commands/npm-audit.md index 24b700ff5abd8..0f164ac9d3ec5 100644 --- a/docs/content/commands/npm-audit.md +++ b/docs/content/commands/npm-audit.md @@ -394,6 +394,8 @@ 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. + diff --git a/docs/content/commands/npm-dedupe.md b/docs/content/commands/npm-dedupe.md index 91f0105e35f21..b9768c25db88d 100644 --- a/docs/content/commands/npm-dedupe.md +++ b/docs/content/commands/npm-dedupe.md @@ -305,6 +305,8 @@ 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. + diff --git a/docs/content/commands/npm-diff.md b/docs/content/commands/npm-diff.md index c4c9eafdb3524..7dcc8af7c3b4c 100644 --- a/docs/content/commands/npm-diff.md +++ b/docs/content/commands/npm-diff.md @@ -335,6 +335,8 @@ 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. + diff --git a/docs/content/commands/npm-dist-tag.md b/docs/content/commands/npm-dist-tag.md index a0f306cd4970d..b9caf1fbe7fa9 100644 --- a/docs/content/commands/npm-dist-tag.md +++ b/docs/content/commands/npm-dist-tag.md @@ -159,6 +159,8 @@ 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. + diff --git a/docs/content/commands/npm-docs.md b/docs/content/commands/npm-docs.md index 8d5a278286a88..790d563bdb1fb 100644 --- a/docs/content/commands/npm-docs.md +++ b/docs/content/commands/npm-docs.md @@ -116,6 +116,8 @@ 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. + diff --git a/docs/content/commands/npm-exec.md b/docs/content/commands/npm-exec.md index 3645e336b9da9..8ccfa75c73386 100644 --- a/docs/content/commands/npm-exec.md +++ b/docs/content/commands/npm-exec.md @@ -205,6 +205,8 @@ 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. + diff --git a/docs/content/commands/npm-find-dupes.md b/docs/content/commands/npm-find-dupes.md index f7366fa6375d1..3549be47daae9 100644 --- a/docs/content/commands/npm-find-dupes.md +++ b/docs/content/commands/npm-find-dupes.md @@ -229,6 +229,8 @@ 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. + diff --git a/docs/content/commands/npm-init.md b/docs/content/commands/npm-init.md index 71109cd360511..5a7dd4c97ac60 100644 --- a/docs/content/commands/npm-init.md +++ b/docs/content/commands/npm-init.md @@ -264,6 +264,8 @@ 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. + diff --git a/docs/content/commands/npm-install-test.md b/docs/content/commands/npm-install-test.md index 5ac31cbf08e25..8975fc4ce61de 100644 --- a/docs/content/commands/npm-install-test.md +++ b/docs/content/commands/npm-install-test.md @@ -42,8 +42,7 @@ takes exactly the same arguments as `npm install`. #### `save` -* Default: `true` unless when using `npm update` or `npm dedupe` where it - defaults to `false` +* Default: `true` unless when using `npm update` where it defaults to `false` * Type: Boolean Save installed packages to a `package.json` file as dependencies. @@ -315,6 +314,8 @@ 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. + diff --git a/docs/content/commands/npm-install.md b/docs/content/commands/npm-install.md index 328d6fc14d9db..7e370319b82ff 100644 --- a/docs/content/commands/npm-install.md +++ b/docs/content/commands/npm-install.md @@ -432,8 +432,7 @@ These are some of the most common options related to installation. #### `save` -* Default: `true` unless when using `npm update` or `npm dedupe` where it - defaults to `false` +* Default: `true` unless when using `npm update` where it defaults to `false` * Type: Boolean Save installed packages to a `package.json` file as dependencies. @@ -705,6 +704,8 @@ 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. + diff --git a/docs/content/commands/npm-link.md b/docs/content/commands/npm-link.md index 892b55496c9b6..fb7e46de04a09 100644 --- a/docs/content/commands/npm-link.md +++ b/docs/content/commands/npm-link.md @@ -125,8 +125,7 @@ workspace(s). #### `save` -* Default: `true` unless when using `npm update` or `npm dedupe` where it - defaults to `false` +* Default: `true` unless when using `npm update` where it defaults to `false` * Type: Boolean Save installed packages to a `package.json` file as dependencies. @@ -383,6 +382,8 @@ 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. + diff --git a/docs/content/commands/npm-ls.md b/docs/content/commands/npm-ls.md index 0f06e131f414b..8d4799777e20f 100644 --- a/docs/content/commands/npm-ls.md +++ b/docs/content/commands/npm-ls.md @@ -280,6 +280,8 @@ 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. + diff --git a/docs/content/commands/npm-pack.md b/docs/content/commands/npm-pack.md index c834f643ac0bb..fa6c005e9d228 100644 --- a/docs/content/commands/npm-pack.md +++ b/docs/content/commands/npm-pack.md @@ -122,6 +122,8 @@ 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. + diff --git a/docs/content/commands/npm-prune.md b/docs/content/commands/npm-prune.md index a10a353801b7c..81dccf889ce4d 100644 --- a/docs/content/commands/npm-prune.md +++ b/docs/content/commands/npm-prune.md @@ -186,6 +186,8 @@ 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. + diff --git a/docs/content/commands/npm-publish.md b/docs/content/commands/npm-publish.md index ce6e1c1012c8e..2995f6bc81551 100644 --- a/docs/content/commands/npm-publish.md +++ b/docs/content/commands/npm-publish.md @@ -238,6 +238,8 @@ 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. + diff --git a/docs/content/commands/npm-rebuild.md b/docs/content/commands/npm-rebuild.md index d63e00b79d386..bddd18c2bcaf4 100644 --- a/docs/content/commands/npm-rebuild.md +++ b/docs/content/commands/npm-rebuild.md @@ -157,6 +157,8 @@ 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. + diff --git a/docs/content/commands/npm-repo.md b/docs/content/commands/npm-repo.md index e14f07012a248..404c724ff0290 100644 --- a/docs/content/commands/npm-repo.md +++ b/docs/content/commands/npm-repo.md @@ -103,6 +103,8 @@ 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. + diff --git a/docs/content/commands/npm-run-script.md b/docs/content/commands/npm-run-script.md index 79b7c9a25780e..aab8d769dc9e2 100644 --- a/docs/content/commands/npm-run-script.md +++ b/docs/content/commands/npm-run-script.md @@ -203,6 +203,8 @@ 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. + diff --git a/docs/content/commands/npm-set-script.md b/docs/content/commands/npm-set-script.md index 2d8e87db85219..0fc267f760c81 100644 --- a/docs/content/commands/npm-set-script.md +++ b/docs/content/commands/npm-set-script.md @@ -97,6 +97,8 @@ 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. + diff --git a/docs/content/commands/npm-uninstall.md b/docs/content/commands/npm-uninstall.md index f7f671f251e8f..572d9dd8aaa3d 100644 --- a/docs/content/commands/npm-uninstall.md +++ b/docs/content/commands/npm-uninstall.md @@ -70,8 +70,7 @@ npm uninstall lodash --no-save #### `save` -* Default: `true` unless when using `npm update` or `npm dedupe` where it - defaults to `false` +* Default: `true` unless when using `npm update` where it defaults to `false` * Type: Boolean Save installed packages to a `package.json` file as dependencies. @@ -141,6 +140,8 @@ 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. + diff --git a/docs/content/commands/npm-update.md b/docs/content/commands/npm-update.md index aff46b1e5b557..be0b0cb937eae 100644 --- a/docs/content/commands/npm-update.md +++ b/docs/content/commands/npm-update.md @@ -171,8 +171,7 @@ be _downgraded_. #### `save` -* Default: `true` unless when using `npm update` or `npm dedupe` where it - defaults to `false` +* Default: `true` unless when using `npm update` where it defaults to `false` * Type: Boolean Save installed packages to a `package.json` file as dependencies. @@ -433,6 +432,8 @@ 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. + diff --git a/docs/content/commands/npm-version.md b/docs/content/commands/npm-version.md index 713e5ae410dfc..8e3334d788984 100644 --- a/docs/content/commands/npm-version.md +++ b/docs/content/commands/npm-version.md @@ -166,6 +166,8 @@ 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. + diff --git a/docs/content/commands/npm-view.md b/docs/content/commands/npm-view.md index b50b4bfb56c5d..0ef17d8adfb39 100644 --- a/docs/content/commands/npm-view.md +++ b/docs/content/commands/npm-view.md @@ -180,6 +180,8 @@ 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. + diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md index 39870922c0253..858fe4d638bed 100644 --- a/docs/content/using-npm/config.md +++ b/docs/content/using-npm/config.md @@ -819,6 +819,8 @@ 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. + @@ -1343,8 +1345,7 @@ The base URL of the npm registry. #### `save` -* Default: `true` unless when using `npm update` or `npm dedupe` where it - defaults to `false` +* Default: `true` unless when using `npm update` where it defaults to `false` * Type: Boolean Save installed packages to a `package.json` file as dependencies. diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index efc1f72a02059..316e737091eb4 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -938,6 +938,7 @@ define('include-staged', { define('include-workspace-root', { default: false, type: Boolean, + envExport: false, description: ` Include the workspace root when workspaces are enabled for a command. @@ -1605,8 +1606,8 @@ define('registry', { define('save', { default: true, - defaultDescription: `\`true\` unless when using \`npm update\` or - \`npm dedupe\` where it defaults to \`false\``, + defaultDescription: `\`true\` unless when using \`npm update\` where it + defaults to \`false\``, usage: '-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle', type: Boolean, short: 'S', 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 d7c43080298eb..b18b8e7a829e6 100644 --- a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs @@ -848,6 +848,8 @@ 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. + +This value is not exported to the environment for child processes. ` exports[`test/lib/utils/config/definitions.js TAP > config description for init-author-email 1`] = ` @@ -1424,8 +1426,7 @@ The base URL of the npm registry. exports[`test/lib/utils/config/definitions.js TAP > config description for save 1`] = ` #### \`save\` -* Default: \`true\` unless when using \`npm update\` or \`npm dedupe\` where it - defaults to \`false\` +* Default: \`true\` unless when using \`npm update\` where it defaults to \`false\` * Type: Boolean Save installed packages to a \`package.json\` file as dependencies. 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 2647bc31bcdb8..564ade46e731d 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 @@ -693,6 +693,8 @@ 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. + @@ -1217,8 +1219,7 @@ The base URL of the npm registry. #### \`save\` -* Default: \`true\` unless when using \`npm update\` or \`npm dedupe\` where it - defaults to \`false\` +* Default: \`true\` unless when using \`npm update\` where it defaults to \`false\` * Type: Boolean Save installed packages to a \`package.json\` file as dependencies.