fix(prune): allow --[no-]optional, --[no-]dev

ref #2677
This commit is contained in:
Zoltan Kochan
2020-07-11 23:16:54 +03:00
parent e3f2f227d7
commit 98e579270b
2 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/plugin-commands-installation": patch
---
`pnpm prune` should accept the `--[no-]optional`, `--[no-]dev` options.

View File

@@ -10,6 +10,8 @@ export const rcOptionsTypes = cliOptionsTypes
export function cliOptionsTypes () {
return R.pick([
'dev',
'optional',
'production',
], allTypes)
}
@@ -28,6 +30,10 @@ export function help () {
description: 'Remove the packages specified in \`devDependencies\`',
name: '--prod',
},
{
description: 'Remove the packages specified in \`optionalDependencies\`',
name: '--no-optional',
},
...UNIVERSAL_OPTIONS,
],
},