Self-service
Describe the bug
We are using Yarn catalogs to centralize dependency versions in a monorepo. The expected behavior is that upgrade commands update the catalog entries (in .yarnrc.yml) rather than rewriting package.json dependencies that use the catalog: protocol.
However, running yarn up with explicit versions breaks this expectation.
To reproduce
Given a catalog like:
And a workspace package using:
{
"dependencies": {
"react": "catalog:"
}
}
Running:
Rewrites package.json entries to the following:**
Instead, the catalog entry should be updated, and the package.json should remain unchanged.
Environment
System:
OS: macOS 26.3
CPU: (14) arm64 Apple M4 Max
Binaries:
Node: 22.18.0 - /private/var/folders/c2/r9vhzjgn15b5b5xcb6krf4th0000gp/T/xfs-9ca2a751/node
Yarn: 4.12.0 - /private/var/folders/c2/r9vhzjgn15b5b5xcb6krf4th0000gp/T/xfs-9ca2a751/yarn
npm: 10.9.3 - /Users/spoke/.volta/tools/image/node/22.18.0/bin/npm
Related issues
Self-service
Describe the bug
We are using Yarn catalogs to centralize dependency versions in a monorepo. The expected behavior is that upgrade commands update the catalog entries (in .yarnrc.yml) rather than rewriting
package.jsondependencies that use thecatalog:protocol.However, running
yarn upwith explicit versions breaks this expectation.To reproduce
Given a catalog like:
And a workspace package using:
{ "dependencies": { "react": "catalog:" } }Running:
Rewrites
package.jsonentries to the following:**Instead, the catalog entry should be updated, and the
package.jsonshould remain unchanged.Environment
Related issues
catalog:are not upgraded using upgrade-interactive #6951