Skip to content

feat: detect catalog entry changes as package changes#94

Merged
theoephraim merged 2 commits into
mainfrom
feat/catalog-change-detection
Jun 3, 2026
Merged

feat: detect catalog entry changes as package changes#94
theoephraim merged 2 commits into
mainfrom
feat/catalog-change-detection

Conversation

@theoephraim
Copy link
Copy Markdown
Member

Summary

  • When a catalog entry in pnpm-workspace.yaml (pnpm) or root package.json (bun/yarn catalog/catalogs, plus workspaces.catalog/workspaces.catalogs) changes between the base branch and HEAD, bumpy add and bumpy check now flag every package that references the changed entry via catalog: / catalog:<name> as changed.
  • Refactored loadCatalogs to a content-based parseCatalogs so we can parse catalog state at any git ref. Added diffCatalogMaps + isCatalogRefAffected helpers.
  • Added getBaseCompareRef + readFileAtRef git helpers; getChangedFiles now uses getBaseCompareRef to avoid duplication.
  • add.ts interactive mode now calls the shared findChangedPackages instead of re-implementing change detection inline (so catalog detection applies there too).

Catalog references in any dep section (dependencies, devDependencies, peerDependencies, optionalDependencies) trigger detection — consistent with how the existing per-file detection treats package.json changes uniformly across sections.

Closes #92

Test plan

  • 18 new unit tests in test/utils/package-manager.test.ts covering parseCatalogs, diffCatalogMaps, isCatalogRefAffected, and resolveCatalogDep
  • 5 new integration tests in test/core/check-catalog.test.ts using temp git repos covering: pnpm yaml catalog change, bun-style package.json catalog change, named catalogs, dev/peer dependencies, and a negative case (non-catalog deps not affected)
  • All 253 existing tests still pass
  • bun run check (tsc) clean

When a catalog version in pnpm-workspace.yaml or root package.json
(bun/yarn catalog/catalogs, plus workspaces.catalog/catalogs) changes,
flag every package that references the changed entry via catalog: /
catalog:<name> as changed in `bumpy add` and `bumpy check`.

Closes #92
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

bumpy-frog

The changes in this PR will be included in the next version bump.

minor Minor releases

  • @varlock/bumpy 1.11.0 → 1.12.0

Bump files in this PR

Click here if you want to add another bump file to this PR


This comment is maintained by bumpy.

pnpm/bun treat top-level `catalog` and `catalogs.default` as the same
default catalog, with `catalog:` and `catalog:default` both pointing at
it. Previously `catalogs.default` was stored under key "default" and
`catalog:default` looked up "default", so users who used the alias form
got no catalog resolution. Now both forms normalize to the canonical
"" key.
@theoephraim theoephraim merged commit 79b1dac into main Jun 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pnpm workspace catalog package updates aren't detected as changes

1 participant