Repository navigation
chore(deps): upgrade react-router to v8.3.0 and drop react-router-dom - #219
Merged
Merged
Conversation
react-router 7.x is covered by GHSA-qwww-vcr4-c8h2 (high), whose vulnerable range is >=7.12.0 <8.3.0 with no 7.x patch. This fails the dependency-review CI gate on every Dependabot bump that touches react-router, and since the prod-minor-patch group is limited to minor/patch updates it can never reach the fix on its own. The advisory only affects the unstable RSC APIs, which this static HashRouter SPA does not use, so it was never exploitable here. Upgrading resolves it outright rather than suppressing it. v8 removes the react-router-dom package, so the dependency is replaced with react-router and imports are updated across the app. All symbols in use (HashRouter, Link, MemoryRouter, NavigationType, Route, Routes, useLocation, useNavigate, useNavigationType, useParams) are exported from the v8 root entry point, so no API changes were needed. The v8 requirements of Node >=22.22.0 and React >=19.2.7 are already satisfied.
therealsama
enabled auto-merge
August 7, 2026 10:14
kplachkov
approved these changes
Aug 7, 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.
Summary
Upgrades
react-routerfrom 7.18.1 to 8.3.0 and removes thereact-router-dompackage. No user-visible behavior change — this is a dependency and import-path migration that clears a security advisory blocking CI.Why now. The
dependency-reviewcheck fails on #218 because bumpingreact-router-dom7.18.1 → 7.18.2 pulls inreact-router@7.18.2, which matches GHSA-qwww-vcr4-c8h2 (high, CVSS 4.0 7.1).Three things make this worth fixing properly rather than suppressing:
mainis already exposed. The vulnerable range is>= 7.12.0, < 8.3.0andmainsits on 7.18.1.dependency-reviewonly inspects dependencies changed in the PR diff, so the existing 7.18.1 goes unnoticed while the functionally identical 7.18.2 gets blocked. chore(deps): bump the prod-minor-patch group across 1 directory with 7 updates #218 was not adding risk, only making it visible.8.3.0, a major. Dependabot'sprod-minor-patchgroup is limited to minor/patch, so it structurally cannot ever propose the fix, and every future react-router 7.x bump would fail the same gate.HashRouterin declarative mode, with no server and no RSC.What changed. v8 removes the
react-router-dompackage (its latest release is 7.18.2 — it is now a dead package), so the dependency is replaced withreact-routerand the import specifier is updated across 26 files. All ten symbols in use —HashRouter,Link,MemoryRouter,NavigationType,Route,Routes,useLocation,useNavigate,useNavigationType,useParams— are exported from the v8 root entry point, so no API rewrites were needed.useScrollRestore.test.tsneeded slightly more than a specifier swap because it mocks the router module, so itsvi.mocktarget and type alias were renamed too.The v8 prerequisites are already met: Node ≥ 22.22.0 (CI runs Node 24) and React ≥ 19.2.7 (currently 19.2.7). Remaining v8 breaking changes concern framework/data mode — middleware, meta APIs, loader request handling — none of which this app uses. The
manualChunksrule invite.config.jsmatches onnode_modules/react-routerand is unaffected.After this lands, #218 will rebase and drop the now-obsolete
react-router-domentry, leaving its other six updates and a passingdependency-review.Related issues
Unblocks #218.
Screenshots or recordings
None — no UI change.
Checklist
Verification
Everything CI runs was run locally against this branch:
npm run typecheck— cleannpm run lint— cleannpm run test:run— 964 passed across 54 filesnpm run build— succeeds, chunking unchangednpm run e2e— 655 passed, 14 skipped, across all four browser projectsnpm ls react-routerresolves 8.3.0 andreact-router-domis gone, so the advisory is removed rather than allowlisted. The remainingnpm auditfindings (brace-expansion,protobufjs,@babel/core) all predate this branch and are unrelated.