diff --git a/.changeset/giant-yaks-hear.md b/.changeset/giant-yaks-hear.md new file mode 100644 index 0000000000..f83048528c --- /dev/null +++ b/.changeset/giant-yaks-hear.md @@ -0,0 +1,5 @@ +--- +"@pnpm/plugin-commands-installation": patch +--- + +Add `--save-prefix` and `--cache-dir` to the list of allowed CLI options. diff --git a/packages/plugin-commands-installation/src/add.ts b/packages/plugin-commands-installation/src/add.ts index f05e129f9c..7d50887b62 100644 --- a/packages/plugin-commands-installation/src/add.ts +++ b/packages/plugin-commands-installation/src/add.ts @@ -9,6 +9,7 @@ import installDeps from './installDeps' export function rcOptionsTypes () { return pick([ + 'cache-dir', 'child-concurrency', 'engine-strict', 'fetch-retries', @@ -47,6 +48,7 @@ export function rcOptionsTypes () { 'save-exact', 'save-optional', 'save-peer', + 'save-prefix', 'save-prod', 'save-workspace-protocol', 'shamefully-flatten', diff --git a/packages/plugin-commands-installation/src/install.ts b/packages/plugin-commands-installation/src/install.ts index 81d82cb860..463cd636bc 100644 --- a/packages/plugin-commands-installation/src/install.ts +++ b/packages/plugin-commands-installation/src/install.ts @@ -10,6 +10,7 @@ import installDeps from './installDeps' export function rcOptionsTypes () { return pick([ + 'cache-dir', 'child-concurrency', 'dev', 'engine-strict', diff --git a/packages/plugin-commands-installation/src/link.ts b/packages/plugin-commands-installation/src/link.ts index 92d2c6db27..4a5cb5b330 100644 --- a/packages/plugin-commands-installation/src/link.ts +++ b/packages/plugin-commands-installation/src/link.ts @@ -47,6 +47,7 @@ export function cliOptionsTypes () { 'save-dev', 'save-exact', 'save-optional', + 'save-prefix', 'unsafe-perm', ], allTypes) } diff --git a/packages/plugin-commands-installation/src/remove.ts b/packages/plugin-commands-installation/src/remove.ts index c35defa4f2..de1acb339f 100644 --- a/packages/plugin-commands-installation/src/remove.ts +++ b/packages/plugin-commands-installation/src/remove.ts @@ -46,6 +46,7 @@ class RemoveMissingDepsError extends PnpmError { export function rcOptionsTypes () { return pick([ + 'cache-dir', 'global-dir', 'global-pnpmfile', 'global', diff --git a/packages/plugin-commands-installation/src/update/index.ts b/packages/plugin-commands-installation/src/update/index.ts index bdc1a698c7..cd30c6ccaf 100644 --- a/packages/plugin-commands-installation/src/update/index.ts +++ b/packages/plugin-commands-installation/src/update/index.ts @@ -19,6 +19,7 @@ import getUpdateChoices from './getUpdateChoices' export function rcOptionsTypes () { return pick([ + 'cache-dir', 'depth', 'dev', 'engine-strict', @@ -53,6 +54,7 @@ export function rcOptionsTypes () { 'reporter', 'save', 'save-exact', + 'save-prefix', 'save-workspace-protocol', 'shamefully-flatten', 'shamefully-hoist', @@ -272,4 +274,4 @@ function makeIncludeDependenciesFromCLI (opts: { devDependencies: opts.dev === true || (opts.production !== true && opts.optional !== true), optionalDependencies: opts.optional === true || (opts.production !== true && opts.dev !== true), } -} \ No newline at end of file +}