Repository navigation
chore(deps): add peer-compat pre-flight check + extend dependabot lock coverage - #28
Merged
Merged
Conversation
…rage Two-layer defense against PR #26-style toolchain major breakage: 1. CI peer-compat pre-flight check (.github/workflows/ci.yml): Adds 'Peer dependency compat check' step right after npm ci. Runs npm ls --all --json, parses problems array, fails fast with plain-English peer violations. Saves the ~8 minute lint/typecheck/ test/build pipeline on incompatible upgrades and surfaces actionable root cause instead of a downstream 'typescript-eslint does not support TS 7.0' message. 2. Extended dependabot.yml ignore (already locked typescript + 9 toolchain majors in #27). Adds 4 more cross-cutting majors that would create the same failure shape: production: - @types/node >=26 (must follow typescript major) - @types/react >=20 (must follow typescript major) - @types/react-dom >=20 (must follow typescript major) - react >=20 (peer of antd/react-query, may break) - react-dom >=20 (peer of antd/react-query, may break) development: - @types/node >=26 (lockstep with typescript) - @types/react >=20 (lockstep with typescript) - @types/react-dom >=20 (lockstep with typescript) Group comments call out which majors are coupled and must be unlocked together in v1.35 toolchain phase. Refs: PR #26 (typescript-eslint + TS 7), PR #27 (initial lock), #10940 typescript-eslint v9+ blocker.
NDCCCCCC
force-pushed
the
harden/dependabot-peer-fail-fast
branch
from
September 21, 2026 07:02
2a964aa to
e03a935
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.
Context
PR #26 (dependabot dev-deps bump) failed at the lint step 8 minutes into the CI pipeline with a confusing error:
The root cause was the upstream peer cap
typescript: ">=4.8.4 <6.1.0"— but the message only surfaced after lint was already running. By that point CI had wasted ~8 minutes onnpm ci+ format check, and the message didn't tell the maintainer which package had the incompatible peer.PR #27 (this branch's predecessor) pinned toolchain majors in dependabot.yml, but the fix is reactive (locks majors we already hit). For future toolchain bumps — eslint 10, vite 8, vitest 5, typescript-eslint v9, react 20, @types/* — we want a CI safety net that catches peer incompatibilities at the cheap
npm cistep instead of at the lint step.What this PR does
1. CI peer-compat pre-flight check (
.github/workflows/ci.yml)New step
Peer dependency compat checkinserted right afternpm ci, before the slowFormat check / Lint / Type check / Test / Buildpipeline.Runs
npm ls --all --json, parses theproblemsarray, fails fast if any peer violation exists. Output is plain English listing each conflicting peer (e.g.typescript@7.0.2 invalid: ">=4.8.4 <6.1.0" from typescript-eslint@8.70.0).Cost: ~10 seconds. Saves: up to ~9 minutes of pipeline + much clearer error message.
2. Extend
.github/dependabot.ymlignore coveragePR #27 already locked:
This PR adds 4 more cross-cutting majors that would create the same failure shape (peer-incompatible major bump hitting CI without warning):
production:
@types/node >=26(must move with typescript major)@types/react >=20(must move with typescript major)@types/react-dom >=20(must move with typescript major)react >=20(peer of antd 6 + react-query 5, may break)react-dom >=20(peer of antd 6 + react-query 5, may break)development:
@types/node >=26@types/react >=20@types/react-dom >=20Comments explain which majors are coupled so the v1.35 toolchain phase knows to unlock them together.
Verification
Local test of the pre-flight check:
When a toolchain major is dropped in (e.g. typescript 7 in a local branch), the step should fail with peer violations surfaced directly.
Followup
dependency-audit.ymlworkflow on weekly schedule that runsnpm ls --allagainst current main and posts a summary issue if peer drift appears.