diff --git a/.changeset/giant-tigers-smoke.md b/.changeset/giant-tigers-smoke.md new file mode 100644 index 0000000000..d5b57937a5 --- /dev/null +++ b/.changeset/giant-tigers-smoke.md @@ -0,0 +1,5 @@ +--- +"@pnpm/plugin-commands-listing": patch +--- + +Implement shorthands for "--dev" & "--prod" options of `why` command diff --git a/packages/plugin-commands-listing/src/why.ts b/packages/plugin-commands-listing/src/why.ts index 95233b9b24..88b902de55 100644 --- a/packages/plugin-commands-listing/src/why.ts +++ b/packages/plugin-commands-listing/src/why.ts @@ -25,6 +25,11 @@ export const cliOptionsTypes = () => ({ recursive: Boolean, }) +export const shorthands = { + D: '--dev', + P: '--production', +} + export const commandNames = ['why'] export function help () { @@ -63,10 +68,12 @@ For options that may be used with `-r`, see "pnpm help recursive"', { description: 'Display only the dependency graph for packages in `dependencies` and `optionalDependencies`', name: '--prod', + shortAlias: '-P', }, { description: 'Display only the dependency graph for packages in `devDependencies`', name: '--dev', + shortAlias: '-D', }, { description: "Don't display packages from `optionalDependencies`",