Include catalog dependency changes when checking for changed packages#1220
Merged
ecraig12345 merged 2 commits intomainfrom Apr 29, 2026
Merged
Include catalog dependency changes when checking for changed packages#1220ecraig12345 merged 2 commits intomainfrom
ecraig12345 merged 2 commits intomainfrom
Conversation
0bd8e17 to
8aa1e78
Compare
ecraig12345
commented
Apr 29, 2026
christiango
approved these changes
Apr 29, 2026
8aa1e78 to
b9a375a
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.
Issue
Supposing a repo defines
catalog/catalogsin.yarnrc.yml, and then it changes in a branch, e.g.:The catalog dependency in a package looks like this in
package.json, and by design, the file itself doesn't change:{ "name": "@scope/foo", "dependencies": { "react": "catalog:" } }With the initial implementation of catalog support in beachball, catalog-dependent packages like
@scope/foowould not be listed as changed when the dependency's catalog version changes.Fix
This PR updates the
getChangedPackageslogic to use a new functiongetCatalogChangedPackageswhich checks for catalog diffs:Most of the other changes are refactoring to support passing the previously-retrieved list of changed files to
getCatalogChangedPackages, so we can skip the extra git operation of retrieving the file from the target branch if we already know it didn't change (which is by far the most common case). Removing one git operation doesn't matter much in small repos, but becomes important in extremely large repos.