Upgrade TypeScript to 7 (build failing — needs review) - #106
Draft
woksin wants to merge 1 commit into
Draft
Conversation
Update Components to TypeScript 7 (the native compiler) for improved build/typecheck performance. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
woksin
marked this pull request as draft
July 10, 2026 09:24
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 the Components repo to TypeScript 7.0.2 — the new native (Go) compiler that is now
lateston npm. ThetscCLI typecheck/build passes cleanly, but the broader JavaScript toolchain (ESLint typed-linting and Rollup bundling) is not yet compatible with the native compiler, so CI and publish will fail until those tools add native-compiler support. See the blocker section below.Changed
typescript:^6.0.3→^7.0.2(rootpackage.json, the only manifest declaringtypescript).4.5.3→4.17.1(packageManager+.yarnrc.ymlyarnPath+.yarn/releases/). Required: Yarn 4.5.3's bundledplugin-compattried to apply its built-in TypeScript patch tolib/_tsc.js, which the native TS7 package no longer ships, abortingyarn install. Yarn 4.17.1 handles the native package and installs cleanly.tsconfig.json/Source/tsconfig.json: removed compiler options that TS7 has removed (hardTS5102errors otherwise):baseUrl(root + Source),downlevelIteration, and the now-unnecessaryignoreDeprecations: "6.0". NobaseUrl-rooted imports exist in the source (all non-relative imports are real npm packages), so this is a safe no-op for resolution.Package manager
Yarn (workspaces;
Sourcebuilds,ESLintis test-only). No lockfile is committed in this repo, per its existing convention.yarn installsucceeds under 4.17.1.Verification
typescriptresolves to 7.0.2 (require('typescript').version→7.0.2,tsc --version→Version 7.0.2).yarn build(per-workspacetsc -p tsconfig.json) — PASSES, exit 0.tsc -bonSourcetypechecks and emitsdist/esm(.js+.d.ts+ maps) with zero errors.TS7's
typescriptnpm package exposes onlyversionandversionMajorMinorfrom its JS module — the classic compiler API (ModuleKind,ScriptTarget,createProgram, …) is undefined. The native compiler is a Go binary driven through thetscCLI. Any tool that loadstypescriptas a library therefore breaks:yarn lint/yarn ci):@typescript-eslint/typescript-estreecrashes withTypeError: Cannot read properties of undefined (reading 'Cjs')(ts.ModuleKind.Cjs).g:build/prepare, i.e. the CJS bundle for npm publish):@rollup/plugin-typescriptcrashes withTypeError: Cannot read properties of undefined (reading 'ES2015')(ts.ModuleKind.ES2015).Because CI's
javascript-build.ymlrunsyarn ci(which includes the lint step) andpublish.ymlproduces the Rollup bundle, both will fail until@typescript-eslintand@rollup/plugin-typescriptship native-compiler support (or the project moves those steps off the classic TS API). This is an upstream ecosystem gap, not a config error, and is out of scope for a version bump — hence the bump is kept and flagged for review. Vitest (esbuild-based transforms) is likely unaffected but was not exercised here.Workflow changes
None required. Grepping
.github/workflows/found no explicittypescriptversion pins ortsc-install steps — the only build reference isyarn buildinpublish.yml. No workflow files were modified.🤖 Generated with Claude Code