From 47164660392bd30c1ba2430817a6076feec12343 Mon Sep 17 00:00:00 2001 From: Don Denton Date: Thu, 2 Jan 2025 11:17:10 -0500 Subject: [PATCH 1/2] docs: add `ignore-workspace-root-check` info --- docs/npmrc.md | 9 +++++++++ 1 file changed, 9 insertions(+) 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** From 7b1b28fd8f4f8c23c275c9ec20063625f7441619 Mon Sep 17 00:00:00 2001 From: Don Denton Date: Thu, 2 Jan 2025 15:15:33 -0500 Subject: [PATCH 2/2] Document the `-w` alias for `pnpm add` --- docs/cli/add.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.