chore/support-catalogs-2 - #1
Draft
gevalo1 wants to merge 8 commits into
Draft
Conversation
gevalo1
force-pushed
the
chore/support-catalogs-2
branch
2 times, most recently
from
August 4, 2026 07:53
04b1379 to
8dfc0a6
Compare
gevalo1
force-pushed
the
chore/support-catalogs-2
branch
from
August 13, 2026 11:51
8dfc0a6 to
9f22a5e
Compare
gevalo1
force-pushed
the
chore/support-catalogs-2
branch
from
August 13, 2026 13:04
9f22a5e to
f68ecd3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes 1707. Supersedes 1933
Problem
Catalogs let a workspace declare a version range once and reference it from many
packages through the
catalog:protocol. Changesets doesn't understand theprotocol today, which shows up in three places:
catalog:is a protocol range, so a workspace package referenced through oneis treated as invalid by
getDependencyGraph, which prints "must depend onthe current version of ...".
Nothing updates it, so the workspace keeps installing the old version.
a package's own
package.jsondoes mark that package as changed, becausechange detection is file based and the file lives inside the package. A
catalog lives at the workspace root and belongs to no package in particular.
What this does
Adds
@changesets/catalogs, which knows where each package manager keeps itscatalogs, how to resolve a
catalog:reference, and how to write an updatedrange back:
catalog/catalogsinpnpm-workspace.yamlcatalog/catalogsin.yarnrc.ymlcatalog/catalogsinpackage.json, at the root or underworkspacesBoth the default catalog (
catalog:, also spelledcatalog:default) and namedcatalogs (
catalog:react18) are supported.On top of that:
range — the dependency graph, dependent bumps, and changelog entries — so a
catalog:reference behaves exactly as the range written out in full would.catalog entry and keeps its range style (
^1.0.0becomes^2.0.0). Thepackages referencing it keep saying
catalog:. Entries that no package in theworkspace references are left alone, matching what
bun updatedoes.package referencing it, for
changeset addandchangeset status. NewdetectCatalogChangesconfig option, defaulttrue, to opt out.Notes for review
re-serialising, so comments, quote style and ordering in
pnpm-workspace.yamlsurvive untouched. Same approach as the existing
editJson.Packages.catalogsis optional. Making it required would enforce it at thetype level, but it breaks
assembleReleasePlan(changesets, await getPackages(cwd), config)for external consumers, which is the usage documented in
@changesets/get-dependents-graph's README. Entry points that build a graph ora release plan call a small
withCatalogshelper instead.packandpublishneed nothing extra — pnpm, Yarn and Bun each replacecatalog:during their own pack step.The commits are split by layer, so each is reviewable on its own.