Skip to content

FRONTIER-4800: widen TypeScript peer range to allow TypeScript 6 - #432

Merged
joeycozza merged 2 commits into
frontierMasterfrom
FRONTIER-4800/widen-typescript-peer-range
Sep 9, 2026
Merged

FRONTIER-4800: widen TypeScript peer range to allow TypeScript 6#432
joeycozza merged 2 commits into
frontierMasterfrom
FRONTIER-4800/widen-typescript-peer-range

Conversation

@dvjensen

@dvjensen dvjensen commented Sep 3, 2026

Copy link
Copy Markdown

Summary

Widens the typescript peer dependency range in @fs/react-scripts from ^3.2.1 || ^4 || ^5 to ^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@^6 fails npm install with 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

  • react-scripts touches TypeScript in three places: verifyTypeScriptSetup.js, ForkTsCheckerWebpackPlugin (via react-dev-utils), and Babel's @babel/preset-typescript for 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.
  • The change is purely additive — no existing consumer on TS 3/4/5 is affected, so it can ship in a patch release.

Deliberately out of scope

  • TypeScript 7 (^7): TS 7 is the native (Go) compiler and does not expose the in-process JS compiler API that fork-ts-checker and verifyTypeScriptSetup rely 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.
  • Dropping ^3.2.1 || ^4: narrowing a peer range is breaking for consumers still on older TS (react-scripts' own devDependency is typescript: ^4.4.4) and would force a semver-major release.

Testing

  • Smoke test in fs-eng/data-dmconsole with typescript@6.0.3: npm install clean (no TS peer conflict), production npm run build passed, npm test (PersonBase suite, 5/5) passed via the react-scripts harness

Jira: FRONTIER-4800

🤖 Generated with Claude Code

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
dvjensen marked this pull request as ready for review September 3, 2026 21:59
@marybeshaw

Copy link
Copy Markdown

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.

@marybeshaw

Copy link
Copy Markdown

I went ahead & put the jira into next sprint so we'll hopefully be able to look at it then

@joeycozza
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
joeycozza merged commit 9311b03 into frontierMaster Sep 9, 2026
4 checks passed
@joeycozza
joeycozza deleted the FRONTIER-4800/widen-typescript-peer-range branch September 9, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants