Skip to content

feat!: support lowercase options in pnpm add (-d, -p, -o, -e)#10079

Merged
zkochan merged 5 commits intopnpm:mainfrom
ryo-manba:feat/add-lowercase-options
Nov 17, 2025
Merged

feat!: support lowercase options in pnpm add (-d, -p, -o, -e)#10079
zkochan merged 5 commits intopnpm:mainfrom
ryo-manba:feat/add-lowercase-options

Conversation

@ryo-manba
Copy link
Copy Markdown
Member

@ryo-manba ryo-manba commented Oct 13, 2025

Fixes #9197

Add lowercase aliases for pnpm add options:

  • -d as an alias for -D (--save-dev)
  • -p as an alias for -P (--save-prod)
  • -o as an alias for -O (--save-optional)
  • -e as an alias for -E (--save-exact)

Notes

The -p and -d shorthands will override their global meanings when used with pnpm add:

  • pnpm add -p--save-prod (not --parseable anymore)
  • pnpm add -d--save-dev (not --loglevel=info anymore)

Is this acceptable? Thoughts?

@ryo-manba ryo-manba marked this pull request as ready for review October 13, 2025 06:07
@ryo-manba ryo-manba requested a review from zkochan as a code owner October 13, 2025 06:07
writeYamlFile('pnpm-workspace.yaml', { packages: ['**', '!store/**'] })

const { status, stdout } = execPnpmSync(['add', 'nanoid', '-p'])
const { status, stdout } = execPnpmSync(['add', 'nanoid', '--parseable'])
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a breaking change.

@ryo-manba ryo-manba changed the title feat: support lowercase options in pnpm add (-d, -p, -o, -e) feat!: support lowercase options in pnpm add (-d, -p, -o, -e) Nov 11, 2025
description: 'Save package to your `dependencies`. The default behavior',
name: '--save-prod',
shortAlias: '-P',
shortAlias: '-P, -p',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to list both?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe lowercase only makes more sense? Updated.

@ryo-manba ryo-manba requested a review from zkochan November 17, 2025 13:25
Updated documentation to reflect changes in pnpm add command options.
@zkochan zkochan merged commit b51bb42 into pnpm:main Nov 17, 2025
@ryo-manba ryo-manba deleted the feat/add-lowercase-options branch November 18, 2025 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support lowercase options in pnpm add (for example -d instead of -D)

2 participants