Ignore fixed versions for dependabot #16036
Merged
vmoroz merged 2 commits intomicrosoft:mainfrom Apr 23, 2026
Merged
Conversation
Dependabot's lockfile-only strategy respects the existing semver range in package.json. Because @types/react is declared as a caret range (e.g. "^18.2.6", "^19.1.4"), dependabot proposes minor-version bumps to the type definitions even though the paired `react` runtime stays on its current minor. On 0.74-stable this broke TS compilation — bumping @types/react from 18.2.67 to 18.3.28 failed with a forwardRef inference error in KeyboardExt.tsx (see PR microsoft#15911). Add an ignore rule to each stable-branch entry so minor and major updates of @types/react and @types/react-dom are filtered out of the grouped PR. Only patch updates flow through, keeping the type definitions aligned with the frozen React minor on each branch: 0.74-stable: @types/react locked to 18.2.x 0.81-stable: @types/react locked to 19.1.x 0.82-stable: @types/react locked to 19.1.x 0.83-stable: @types/react locked to 19.2.x 0.84-stable: @types/react locked to 19.2.x The main-branch entry is unchanged — it should continue to track upstream React type releases. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The react runtime, its type defs, and the matching test renderer are version-locked together on each stable branch. Bumping any one of them to a different minor can break TS compilation or runtime compatibility, so lock the full set on every stable-branch dependabot entry. Also include react-dom / @types/react-dom defensively — they aren't currently in any stable-branch package.json but will be pinned if added later. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
acoates-ms
approved these changes
Apr 22, 2026
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.
Description
Type of Change
Why
Dependabot's grouped
all-dependenciesupdates on stable branches can sweep in a minor bump of@types/reactthat is incompatible with the branch's frozenreactruntime. On0.74-stablethis surfaced as #15911 — bumping@types/reactfrom 18.2.67 → 18.3.28 broke TS compilation with aforwardRefinference error inKeyboardExt.tsx:Because
@types/reactis declared with a caret range (e.g.^18.2.6,^19.1.4) in the package.jsons, Dependabot'slockfile-onlystrategy still proposes minor bumps within that range — even though the pairedreactruntime is effectively pinned on each stable branch. The whole React family (react,react-native,react-test-renderer,@types/react) moves together, so any of them drifting to a different minor can break the build.With the
all-dependencies: '*'catch-all group (introduced in #15856) one bad package bump now blocks the entire grouped PR, where previously each update was a standalone PR that could be closed individually. The grouping is still a good idea for signal-to-noise; it just needs explicitignorerules for packages that are version-locked to the branch's frozen React runtime.Resolves #15911 (the bad bump will no longer be proposed on the next Dependabot run).
What
Added an
ignore:block to each of the five stable-branch update entries in.github/dependabot.yml:react0.74-stable0.81-stable0.82-stable0.83-stable0.84-stableEach ignore block filters
version-update:semver-minorandversion-update:semver-majorupdates for:reactreact-nativereact-test-renderer@types/react@types/react-dom(defensive — not currently in any stable-branchpackage.json, but pinned if added later)Patch updates still flow through, so security patches within the locked minor continue to land.
The
main-branch entry is unchanged — it should keep tracking upstream React releases.Screenshots
N/A
Testing
Dependabot configuration is declarative YAML; changes take effect on the next scheduled Dependabot run. No local tests applicable.
Follow-up after merge:
dependabot/npm_and_yarn/0.74-stable/types/react-18.3.28branch. Dependabot will not recreate it on the next weekly run because 18.3.x is now filtered out of the group.Changelog
Should this change be included in the release notes: no
Microsoft Reviewers: Open in CodeFlow