Repository navigation
ci(changeset/check-coverage): require a changeset for runtime catalog bumps - #235
Merged
Merged
Conversation
… bumps A package now counts as changed when the branch edits a file inside it, or when the branch changes a catalog entry that the package references via `catalog:` / `catalog:<name>` from `dependencies` or `peerDependencies`. Catalog entries referenced only from `devDependencies` or `optionalDependencies` require nothing. Changed files come from `git diff` against the merge base with the base branch, not from `pnpm --filter "[<since>]"`. pnpm 11.28 / 12.7 made that filter mark every catalog consumer as changed, devDependencies included, which failed samples-and-data#140 on parse-h5ad and parse-seurat: both only take block-tools from the catalog as a devDependency. Restores the runtime catalog rule that de2b0ee dropped. Missing yq, a missing merge base or an unreadable catalog now exit 2 instead of passing.
|
Automatic reviews are disabled for this repository. Configure in Code Review Settings. |
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.
What
check-coveragenow decides which published packages a PR changes on its own, instead of askingpnpm --filter "[<since>]". A package counts as changed when:git diffagainst the merge base with the base branch; each file belongs to the deepest package directory containing it, and moving a file out of a package counts as an edit of it.pnpm-workspace.yaml(default or named) that the package references viacatalog:/catalog:<name>fromdependenciesorpeerDependencies. The error names the reason:(catalog bump: <dep>).Entries referenced only from
devDependenciesoroptionalDependenciesrequire nothing. Private packages, the empty-changeset opt-out and theskip-changeloglabel behave as before.Why
catalogis not detected bypnpm ls --filter "[<since>]"pnpm/pnpm#8718) made--filter "[<since>]"mark every package that references a changed catalog entry as changed,devDependenciesincluded. Afterupgrade-sdkmoves a block to pnpm 12, a catalog bump fails the gate on packages that only take a build tool from the catalog — samples-and-data#140 failed onparse-h5adandparse-seurat, whose only catalog dependencies are devDependencies.Alternative to #234, which keeps the git-diff part but leaves all catalog bumps unflagged.
Behaviour changes to expect
dependencies(older layout, publicmodeletc.) need a changeset for those packages on every SDK catalog bump — the clonotype-space#95 shape now fails by design.model,ui,workflow,kindprivate) nothing new is flagged: the publishedblockand software packages take catalog dependencies only as devDependencies.yq(mikefarah v4+). A missingyq, no merge base (shallow checkout) or an unreadable catalog exit 2 instead of passing silently.Testing
bats test/coverage.bats: 26/26 pass. Catalog cases that asserted "never flagged" now assert the new rule; added cases forpeerDependencies, a named catalog, an unused new entry, a non-catalogpnpm-workspace.yamlchange, an edit that landed on the base after branching, and a file moved out of a package. Fixture gainspkg-peerandpkg-legacy.v4script exits 1 with the sameparse-seurat/parse-h5adgap as CI.