Upgrade TypeScript to 7 (lint tooling incompatible — needs review) - #7
Draft
woksin wants to merge 2 commits into
Draft
Upgrade TypeScript to 7 (lint tooling incompatible — needs review)#7woksin wants to merge 2 commits into
woksin wants to merge 2 commits into
Conversation
Update Narrator 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 Narrator VS Code extension to TypeScript 7.0.2 (the native/Go compiler, current
lateston npm) for faster typecheck/build.Changes
Package:
narrator(Source/VSCodeExtension)typescript:^5.3.0→^7.0.2(devDependency; range prefix preserved)Supporting changes required by the upgrade
4.14.1/4.5.3→4.17.1(packageManager+.yarn/releases+.yarnrc.ymlyarnPath). Required because the compat plugin bundled with yarn 4.5.3 unconditionally applies its TypeScript PnP patch and crashes on TS7's new package layout (ENOENT … lib/_tsc.js). Yarn 4.17.1's compat plugin caps that patch at<7.0.0-0, so it is correctly skipped for TS7. Theyarn set versionmigration also addedenableScripts,npmMinimalAgeGate: 0, andapprovedGitRepositoriesto.yarnrc.ymlto preserve prior behavior.tsconfig.json:module: commonjs→preserveandmoduleResolution: node→bundler. TS7 removed the legacynode/node10resolution.bundleris the correct modern equivalent for this esbuild-bundled project;node16was rejected as it enforces strict CJS/ESM interop that breaks imports of the ESM@cratis/chronicle.contractspackage.@types/*were not touched.Package manager
Yarn (detected via
yarn.lock). Lockfile updated viayarn install;typescriptnow resolves to 7.0.2 (yarn tsc --version→Version 7.0.2).Verification
yarn typecheck(tsc --noEmit)yarn compile(esbuild)yarn test(vitest)yarn lint:ci(eslint)The core TypeScript 7 verification passes:
tsc --noEmitis clean and the extension bundles successfully.Blocker — needs review
yarn lint:ci(and therefore the fullyarn ciused by theJavaScript Buildworkflow) fails.@typescript-eslint8.59.1 reads the classic TypeScript API viarequire('typescript')(e.g.ts.Extension.Cjs), but TS7's native package no longer exposes the compiler API at that entry point (onlyversion; the API moved undertypescript/unstable/*). This throwsTypeError: Cannot read properties of undefined (reading 'Cjs').No released
typescript-eslintsupports TS7 yet — even the latest (8.63.0) still declarespeerDependency typescript >=4.8.4 <6.1.0. This is an upstream ecosystem gap, not a problem with the TS upgrade itself, so it was left unresolved pending a TS7-compatibletypescript-eslintrelease. CI will be red on the lint step until then.Workflow changes
None.
.github/workflows/contains no explicittypescriptversion pins or tsc install steps (grep found none).javascript-build.ymlrunsyarn ci, which will fail on lint as noted above.🤖 Generated with Claude Code