Verify latest 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?
If your OS is a Linux based, which one it is? (Include the version if relevant)
Ubuntu 25.10
Verify latest 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"inpackage.json2.) Use a named catalog group such as:
3.) Run
pnpm upgrade --interactive --latest -r4.) Select the latest version of
@sanity/clientfrom the list which is ^7.12.0 at the time of writing and upgradeDescribe the Bug
With the repro steps above, the
package.jsonwill be incorrectly rewritten from"@sanity/client": "catalog:sanity"to"@sanity/client": "catalog:"'@sanity/client': ^7.12.0entry will incorrectly appear in the default catalog while keeping'@sanity/client': ^7.11.2in named catalog (two entries for same dependency)Expected Behavior
package.jsonwill 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?
If your OS is a Linux based, which one it is? (Include the version if relevant)
Ubuntu 25.10