diff --git a/docs/cli/add.md b/docs/cli/add.md index f0585f741240..dc64430c7646 100644 --- a/docs/cli/add.md +++ b/docs/cli/add.md @@ -196,7 +196,7 @@ pnpm's default semver range operator. Using `--save-peer` will add one or more packages to `peerDependencies` and install them as dev dependencies. -### --ignore-workspace-root-check +### --ignore-workspace-root-check, -w Adding a new dependency to the root workspace package fails, unless the `--ignore-workspace-root-check` or `-w` flag is used. diff --git a/docs/npmrc.md b/docs/npmrc.md index 8fb18b5ab1df..a5064e52f2ec 100644 --- a/docs/npmrc.md +++ b/docs/npmrc.md @@ -1012,6 +1012,15 @@ When executing commands recursively in a workspace, execute them on the root wor When set to `true`, no workspace cycle warnings will be printed. +### ignore-workspace-root-check + +* Default: **false** +* Type: **Boolean** + +When set to `true`, you can add dependencies to the workspace root _without_ using the `--ignore-workspace-root-check` or `-w` flag. + +For instance, `pnpm add debug` will fail in the workspace root unless this setting is true. (`pnpm add debug -w` will always work.) + ### disallow-workspace-cycles * Default: **false**