FRONTIER-4800: widen TypeScript peer range to allow TypeScript 6 - #432
Merged
joeycozza merged 2 commits intoSep 9, 2026
Merged
Conversation
npm 7+ enforces peer ranges even for optional peers present in the tree, so consuming repos fail install with ERESOLVE when upgrading to typescript@^6. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
dvjensen
marked this pull request as ready for review
September 3, 2026 21:59
|
David, doesn't this change require its own version change in the package.json (and changelog entry)? The change in dependency won't be published unless the package gets republished with the new version. |
|
I went ahead & put the jira into next sprint so we'll hopefully be able to look at it then |
joeycozza
self-requested a review
September 9, 2026 20:15
CI publishes the committed version of @fs/react-scripts on push to a release branch, so the widened typescript peer range would not reach any consumer without a version bump. Patch rather than minor: the change is purely additive and no existing consumer on TS 3/4/5 is affected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
joeycozza
approved these changes
Sep 9, 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
Widens the
typescriptpeer dependency range in@fs/react-scriptsfrom^3.2.1 || ^4 || ^5to^3.2.1 || ^4 || ^5 || ^6.Filed per Ammon's request on FRONTIER-4800 to submit this as a PR rather than waiting for it to come up in the priority queue.
Why
npm 7+ enforces peer ranges even for optional peers that are present in the tree, so any consuming repo that upgrades to
typescript@^6failsnpm installwith an ERESOLVE conflict — including plain-JavaScript repos that only use TypeScript for lint/type-check tooling. Teams are currently closing/excluding their Renovate TypeScript 6 PRs (e.g. fs-eng/data-dmconsole#2258, DATA-12377), which also silences future 6.x update notifications. This single change unblocks every consuming repo at once.Why this is safe
verifyTypeScriptSetup.js,ForkTsCheckerWebpackPlugin(via react-dev-utils), and Babel's@babel/preset-typescriptfor transpilation. TypeScript 6.x is the bridge release line that retains the JavaScript-based compiler and its in-process compiler API, so all three paths behave as they do under 5.x.Deliberately out of scope
^7): TS 7 is the native (Go) compiler and does not expose the in-process JS compiler API that fork-ts-checker andverifyTypeScriptSetuprely on. Declaring support would trade today's up-front ERESOLVE for a runtime build failure. Also moot for now since @typescript-eslint only accepts<6.1.0.^3.2.1 || ^4: narrowing a peer range is breaking for consumers still on older TS (react-scripts' own devDependency istypescript: ^4.4.4) and would force a semver-major release.Testing
typescript@6.0.3:npm installclean (no TS peer conflict), productionnpm run buildpassed,npm test(PersonBase suite, 5/5) passed via the react-scripts harnessJira: FRONTIER-4800
🤖 Generated with Claude Code