Upgrade TypeScript 5.3.3 → 6.0.x
Tracking issue for upgrading the project's TypeScript compiler from 5.3.3 to the 6.0.x line.
This supersedes the Dependabot PR #1019, which could not be merged as a standalone version bump — TypeScript 6 requires coordinated changes to the lint toolchain, the compiler target, and the built dist/ output (see below).
Why the Dependabot PR couldn't merge as-is
- Peer conflict with the old
@typescript-eslint stack. On the previous lint toolchain, @typescript-eslint/eslint-plugin@8.48.0 declares peerDependencies.typescript: ">=4.8.4 <6.0.0", which hard-excludes TypeScript 6.0.3 and produces an ERESOLVE at install time.
- Compiler target too old. The current
tsconfig.json uses target: "es6". Modern TypeScript errors on the source as-is: TS1503: Named capturing groups are only available when targeting 'ES2018' or later. The build (ncc build ...) fails until the target is raised.
dist/ must be rebuilt. Raising the target changes the emitted/bundled output, so dist/setup/index.js and dist/cleanup/index.js must be regenerated and committed (the Check dist/ workflow enforces this).
Prerequisites
Work required (after #1045 lands)
Optional follow-up (enabled by the higher target)
Notes
Closes the effort tracked by #1019.
Upgrade TypeScript 5.3.3 → 6.0.x
Tracking issue for upgrading the project's TypeScript compiler from
5.3.3to the6.0.xline.This supersedes the Dependabot PR #1019, which could not be merged as a standalone version bump — TypeScript 6 requires coordinated changes to the lint toolchain, the compiler target, and the built
dist/output (see below).Why the Dependabot PR couldn't merge as-is
@typescript-eslintstack. On the previous lint toolchain,@typescript-eslint/eslint-plugin@8.48.0declarespeerDependencies.typescript: ">=4.8.4 <6.0.0", which hard-excludes TypeScript6.0.3and produces anERESOLVEat install time.tsconfig.jsonusestarget: "es6". Modern TypeScript errors on the source as-is:TS1503: Named capturing groups are only available when targeting 'ES2018' or later.The build (ncc build ...) fails until the target is raised.dist/must be rebuilt. Raising the target changes the emitted/bundled output, sodist/setup/index.jsanddist/cleanup/index.jsmust be regenerated and committed (theCheck dist/workflow enforces this).Prerequisites
@typescript-eslint/*packages withtypescript-eslint@8.62.0, whose parser peer range istypescript: ">=4.8.4 <6.1.0"— this is the version that actually permits TypeScript 6.0.x. Without it, the upgrade hits theERESOLVEpeer conflict described above.Work required (after #1045 lands)
main(post-chore: upgrade ESLint to v10 with flat config #1045) and bumptypescript^5.3.3→^6.0.3inpackage.json; regeneratepackage-lock.json.tsconfig.jsonfromes6to at leastES2018(recommendES2022to also unlockError(msg, { cause })and modern lib features). Reconcilelib/modulesettings as needed.npm run buildand commit the regenerateddist/(the bundle will change).libdifferences). See the TypeScript 6.0 announcement.@typescript-eslint/typescript-eslintsupports the chosen TS 6.0.x (peer is<6.1.0); bump if a newer line is needed.npm ci,npm run lint,npm run format-check,npm run build(verifydist/matches),npm test,npm audit --audit-level=high.Optional follow-up (enabled by the higher target)
targetisES2022, adopt ESLint 10'spreserve-caught-errorrule (disabled in chore: upgrade ESLint to v10 with flat config #1045 for parity) by attaching{ cause }to re-thrown errors (e.g. insrc/distributions/graalvm/installer.ts).Notes
tsconfig.jsonis auto-synced from actions/reusable-workflows; coordinate the target change with upstream where applicable.dist/→ full validation.Closes the effort tracked by #1019.