Skip to content

fix: bumpy generate emits bump files for consumers of changed catalog entries - #166

Merged
theoephraim merged 2 commits into
mainfrom
claude/bumpy-issue-152-9cfa27
Oct 15, 2026
Merged

theoephraim merged 2 commits into
mainfrom
claude/bumpy-issue-152-9cfa27

Conversation

@theoephraim

Copy link
Copy Markdown
Member

Fixes #152.

Problem

bumpy generate maps 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 — while bumpy check already flags every catalog: consumer as changed. Renovate/Dependabot catalog bumps therefore required hand-writing a bump file listing every consumer.

Fix

  • New core/catalog-changes.ts holds the catalog diff that check had inline: getChangedCatalogEntries(rootDir, beforeRef, afterRef | null, changedFiles) plus findCatalogConsumers(packages, changes). loadCatalogsAt moved here from dep-bump-files.ts.
  • generate now uses mapCommitToPackages(hash, …): directory containment as before, plus — when the commit touches a catalog file — the consumers of entries that changed between hash^ and hash. Applies to both the non-conventional path and the scopeless/unresolved-scope CC path. Explicit CC scopes still win.
  • check uses the same helpers (behavior unchanged; touchesCatalogFiles short-circuits the git reads when no catalog file changed).
  • Docs: 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 root package.json catalog + 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

…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>
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

bumpy-frog

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

patch Patch releases

  • @varlock/bumpy 1.18.1 → 1.18.2

Bump files in this PR

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


This comment is maintained by bumpy.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts for reuse by check, 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.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread packages/bumpy/src/core/catalog-changes.ts Outdated
`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>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 detectPackageManagerFrom so 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.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@theoephraim
theoephraim merged commit 7cf054a into main Oct 15, 2026
5 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.

generate: emit bump files for consumers of changed catalog entries

1 participant