Skip to content

fix(deps): revert typescript to 6.x so react-scanner loads - #802

Merged
jennifer-takagi merged 1 commit into
mainfrom
ktlo/revert-typescript-7
Oct 1, 2026
Merged

jennifer-takagi merged 1 commit into
mainfrom
ktlo/revert-typescript-7

Conversation

@jennifer-takagi

@jennifer-takagi jennifer-takagi commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Description of change

Reverts the typescript 6 → 7 bump from #742, which left npm start dead.

What is wrong. TypeScript 7's npm package is only a launcher for the native Go compiler. Its "." export resolves to lib/version.cjs, which has no SyntaxKind. src/index.ts imports react-scanner, which loads @typescript-eslint/typescript-estree, which needs the JavaScript TypeScript API. react-scanner pins typescript@5.6.2 and npm nests it correctly, but typescript-estree hoists to the repo root and so resolved typescript@7 instead:

require.resolve('typescript', {paths: ['node_modules/@typescript-eslint/typescript-estree']})
→ node_modules/typescript/lib/version.cjs

The result is TypeError: Cannot read properties of undefined (reading 'BarBarToken'). tsc itself still compiled, and no test imports react-scanner, so CI stayed green through the bump. The tool has been broken on main at runtime since #742 merged. npm prints a header only for named scripts, so the crash reads as a build failure when it actually comes from node build/run.js.

typescript@7 ships only a launcher for the native Go compiler. Its "."
export resolves to lib/version.cjs, which has no SyntaxKind.

react-scanner loads @typescript-eslint/typescript-estree, which needs the
JavaScript TypeScript API. estree hoists to the repo root, so it resolved
the root typescript@7 instead of react-scanner's nested 5.6.2 and crashed
with "Cannot read properties of undefined (reading 'BarBarToken')". The
build stayed green, so npm start only failed at `node build/run.js`.

Reverts #742. Dependabot now ignores typescript majors, otherwise the
daily bot reopens the same bump.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jennifer-takagi
jennifer-takagi marked this pull request as ready for review October 1, 2026 11:07
@jennifer-takagi
jennifer-takagi requested a review from a team as a code owner October 1, 2026 11:07
@jennifer-takagi
jennifer-takagi merged commit b1ef4c3 into main Oct 1, 2026
1 check passed
@jennifer-takagi
jennifer-takagi deleted the ktlo/revert-typescript-7 branch October 1, 2026 11:07
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.

1 participant