Repository navigation
test(deps): fail fast when a pnpm override contradicts its catalog entry - #514
Merged
Merged
Conversation
A pnpm.overrides entry silently outranks the pnpm-workspace.yaml catalog entry of the same name; when they disagree, the catalog line reads like the version in use and is ignored. That drift has shipped real breakage three times: #453 (supabase-js catalog ignored), #501 (autolinking override pinned below what @expo/cli needs — every web export died), and #511 (dependabot bumped the supabase-js catalog while the override stayed put, re-introducing #453 verbatim). scripts/check-override-catalog-alignment.mjs compares every override against the catalog with semver set logic: - selector-scoped overrides ("pkg@<=1.2.3", CVE floors) are skipped — they intentionally target a subrange - an override that is a SUBSET of the catalog range passes (react-dom pinned 19.2.3 inside ^19.2.3 narrows, it does not lie) - anything else fails, naming both values and which one actually installs Wired into prepush.sh, `pnpm lint`, and precommit. Verified against the two historical drifts reproduced verbatim (supabase-js ~2.86 vs ~2.110.9, and expo-modules-core 56.0.22 vs 56.0.12): both fail; current tree passes with 9 comparable pairs checked. Runs in ~100ms. Closes #508's check half. The dependabot-ignore half (stop bumping catalog entries an override pins) stays open on the issue. Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Implements the check half of #508.
Why
A
pnpm.overridesentry silently outranks the catalog entry of the same name. When they disagree, the catalog lies about what installs. Three shipped incidents: #453, #501 (every web export broken), #511 (dependabot re-introduced #453 verbatim).What
scripts/check-override-catalog-alignment.mjs, wired intoprepush,pnpm lint, andprecommit(~100ms):pkg@<=1.2.3CVE floors) — they intentionally target a subrange19.2.3inside^19.2.3narrows, doesn't lie)Verification
~2.110.9, override~2.86.0)56.0.12vs56.0.22)Left open on #508: telling dependabot to stop bumping catalog entries that an override pins.
CI is billing-blocked; verification above is local.
🤖 Generated with Claude Code