Repository navigation
fix: bumpy generate emits bump files for consumers of changed catalog entries - #166
Conversation
…og entries `generate` mapped commit files to packages by directory containment only, so a commit that just bumped a catalog entry (pnpm-workspace.yaml / .yarnrc.yml / root package.json) matched no package — while `bumpy check` already flagged the consumers as changed. Extract the catalog diff + consumer lookup into core/catalog-changes.ts and reuse it in both commands. Fixes #152 Co-Authored-By: Claude <noreply@anthropic.com>
|
The changes in this PR will be included in the next version bump.
|
There was a problem hiding this comment.
Important
Historical catalog commits can still be skipped after a package-manager migration because catalog files at old refs are selected using the manager at the current HEAD.
Reviewed changes in 5e31485 cover the shared catalog-diff extraction and catalog-aware commit mapping added to bumpy generate.
- Shared catalog analysis: moves catalog loading, semantic diffing, and consumer matching into
core/catalog-changes.tsfor reuse bycheck, dependency bump planning, and generation. - Commit-to-package mapping: extends scopeless/unresolved conventional commits and non-conventional commits to include consumers of catalog entries changed by each commit while preserving explicit scope precedence.
- Documentation and release metadata: documents catalog-aware mapping and adds the package bump file.
- Integration coverage: exercises pnpm catalogs, Bun/npm package.json catalogs, named catalogs, dependency fields, and non-semantic root-file changes.
gpt-5.6-sol | 𝕏
`loadCatalogsAt` picked the catalog YAML file from the working-tree package manager even for earlier refs, so a catalog bump committed before a pnpm↔Yarn migration on the same branch was missed. Detection now runs over the files at the ref being read (`detectPackageManagerFrom`). Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes since the prior Pullfrog review cover historical package-manager detection and its regression coverage.
- Ref-aware package-manager detection: extracted
detectPackageManagerFromso catalog loading selects pnpm, Yarn, Bun, or npm from the files present at each requested Git ref. - Migration regression coverage: added an integration test proving an earlier pnpm catalog bump remains attributable after the repository migrates to Yarn.
gpt-5.6-sol | 𝕏



Fixes #152.
Problem
bumpy generatemaps each commit to packages by directory containment. Catalog definitions live at the repo root (pnpm-workspace.yaml,.yarnrc.yml,package.json), so a commit that only bumps a catalog entry matches no package and is skipped — whilebumpy checkalready flags everycatalog:consumer as changed. Renovate/Dependabot catalog bumps therefore required hand-writing a bump file listing every consumer.Fix
core/catalog-changes.tsholds the catalog diff thatcheckhad inline:getChangedCatalogEntries(rootDir, beforeRef, afterRef | null, changedFiles)plusfindCatalogConsumers(packages, changes).loadCatalogsAtmoved here fromdep-bump-files.ts.generatenow usesmapCommitToPackages(hash, …): directory containment as before, plus — when the commit touches a catalog file — the consumers of entries that changed betweenhash^andhash. Applies to both the non-conventional path and the scopeless/unresolved-scope CC path. Explicit CC scopes still win.checkuses the same helpers (behavior unchanged;touchesCatalogFilesshort-circuits the git reads when no catalog file changed).cli.md"How commits are mapped" notes catalog handling.Tests
Three integration tests in
generate.test.ts(temp git repos): pnpm catalog bump maps to the consuming package only; bun/npm rootpackage.jsoncatalog + named catalog across dep fields; a root-level commit with no entry changes maps to nothing. Full suite 446 pass,tsc, lint and fmt clean.Co-Authored-By: Claude noreply@anthropic.com