Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pnpm upgrade --interactive --latest -r doesn't respect named catalog groups #10115

@mcmxcdev

Description

@mcmxcdev

Verify latest release

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

pnpm version

10.18.1

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

Lockfile

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

No response

Reproduction steps

1.) Have an entry such as "@sanity/client": "catalog:sanity" in package.json

2.) Use a named catalog group such as:

catalogs:
  sanity:
    '@sanity/client': ^7.11.2

3.) Run pnpm upgrade --interactive --latest -r

4.) Select the latest version of @sanity/client from the list which is ^7.12.0 at the time of writing and upgrade

Describe the Bug

With the repro steps above, the package.json will be incorrectly rewritten from "@sanity/client": "catalog:sanity" to "@sanity/client": "catalog:"

'@sanity/client': ^7.12.0 entry will incorrectly appear in the default catalog while keeping '@sanity/client': ^7.11.2 in named catalog (two entries for same dependency)

Expected Behavior

package.json will not be touched, entry in named catalog will have its version updated, no default catalog entry added.

Which Node.js version are you using?

v22.20.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)

Ubuntu 25.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions