Skip to content

pnpm version with --recursive does not work as expected #11348

Description

@mfedderly

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

11.0.0-rc.5

Which area(s) of pnpm are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

I would expect pnpm version --recursive $VERSION to add versions to all of my workspace packages (in this case, excluding the root package.json). Instead it only edits the root package.json file.

Describe the Bug

It looks like pnpm@11 received some love to the version command. However, it appears that there is still no way to use it to version a bunch of packages within a pnpm workspace in the way I'd expect. pnpm help version says that there is a --recursive flag, but it does not do what I expect.

Expected Behavior

I would expect pnpm version --recursive $VERSION to take roughly these steps:

pnpm --recursive exec npm version "$VERSION" --no-git-tag-version
git add .
git commit --no-verify -m "v$VERSION"
git tag -a "v$VERSION" -m "v$VERSION"

I recognize that getting the exact above behavior may require some combination of --filter and --workspace-root to specify exactly the set of package.json files that should receive an updated version entry.

Which Node.js version are you using?

25.8.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions