Describe the bug
The JavaScript Build workflow fails on PR #106 (chore/typescript-7, #106), most recently in run https://github.com/Cratis/Components/actions/runs/34227857632. main itself is green (typescript stays pinned at ^6.0.3 there) — this is isolated to the TypeScript 7 upgrade attempt.
Steps to reproduce
- Check out
chore/typescript-7 (or bump root package.json's typescript to ^7.0.2).
yarn install
yarn build (which runs rollup -c ./rollup.config.mjs via @rollup/plugin-typescript)
Expected behavior
The Rollup build (and yarn lint) succeed against TypeScript 7, or CI clearly documents that the toolchain isn't ready yet.
Actual behavior
Rollup crashes:
[!] TypeError: Cannot read properties of undefined (reading 'ES2015')
at node_modules/@rollup/plugin-typescript/dist/es/index.js:528:16
yarn install also emits, before the crash:
YN0060: typescript is listed by your project with version 7.0.2, which doesn't satisfy what
@typescript-eslint/eslint-plugin and other dependencies request (>=4.9.0 <6.1.0).
Root cause (confirmed independently)
TypeScript 7 ships a native (Go) compiler. Its typescript npm package only exports version / versionMajorMinor — the classic JS compiler API (ModuleKind, ScriptTarget, createProgram, …) is gone. Any tool that drives typescript as a library rather than shelling out to the tsc CLI breaks:
So neither of the two possible fixes is available today:
- Updating
@rollup/plugin-typescript to a version that supports TS7 — no such version exists yet.
- Keeping
@typescript-eslint happy with TS7 — its peer range still excludes it.
The only way to make this repo's toolchain green with typescript on ^7.0.2 right now would be dropping Rollup-based bundling and ESLint typed-linting, which is out of proportion to a version bump.
Recommendation
Keep typescript pinned to ^6.0.3 (as main already is) and leave PR #106 open-but-parked, or close it, until both rollup/plugins#2016 and typescript-eslint/typescript-eslint#10940 land native-compiler support. Re-attempt the upgrade once those are resolved.
Additional context
Describe the bug
The JavaScript Build workflow fails on PR #106 (
chore/typescript-7, #106), most recently in run https://github.com/Cratis/Components/actions/runs/34227857632.mainitself is green (typescriptstays pinned at^6.0.3there) — this is isolated to the TypeScript 7 upgrade attempt.Steps to reproduce
chore/typescript-7(or bump rootpackage.json'stypescriptto^7.0.2).yarn installyarn build(which runsrollup -c ./rollup.config.mjsvia@rollup/plugin-typescript)Expected behavior
The Rollup build (and
yarn lint) succeed against TypeScript 7, or CI clearly documents that the toolchain isn't ready yet.Actual behavior
Rollup crashes:
yarn installalso emits, before the crash:Root cause (confirmed independently)
TypeScript 7 ships a native (Go) compiler. Its
typescriptnpm package only exportsversion/versionMajorMinor— the classic JS compiler API (ModuleKind,ScriptTarget,createProgram, …) is gone. Any tool that drivestypescriptas a library rather than shelling out to thetscCLI breaks:@rollup/plugin-typescriptreadsts.ModuleKind.ES2015, which is nowundefined→ the crash above. The latest published version, 12.3.0, is already what this repo uses (package.jsonpins^12.3.0) — there is no newer release with native-compiler support to upgrade to. Tracked upstream:@rollup/plugin-typescript- Support for TypeScript 7 rollup/plugins#2016 ("Support for TypeScript 7"), still open.@typescript-eslint(typescript-estree) similarly depends on the classic API for typed linting, and its own peer dependency still capstypescriptat<6.1.0even in the latest release (8.70.0). Tracked upstream: Enhancement: Use TS 7 (tsgo / typescript-go) for type information typescript-eslint/typescript-eslint#10940 ("Use TS 7 (tsgo / typescript-go) for type information"), still open.So neither of the two possible fixes is available today:
@rollup/plugin-typescriptto a version that supports TS7 — no such version exists yet.@typescript-eslinthappy with TS7 — its peer range still excludes it.The only way to make this repo's toolchain green with
typescripton^7.0.2right now would be dropping Rollup-based bundling and ESLint typed-linting, which is out of proportion to a version bump.Recommendation
Keep
typescriptpinned to^6.0.3(asmainalready is) and leave PR #106 open-but-parked, or close it, until both rollup/plugins#2016 and typescript-eslint/typescript-eslint#10940 land native-compiler support. Re-attempt the upgrade once those are resolved.Additional context
refs/remotes/pull/106/merge)main's own most recent JavaScript Build run is green: https://github.com/Cratis/Components/actions/runs/34156670036@rollup/plugin-typescript- Support for TypeScript 7 rollup/plugins#2016, Enhancement: Use TS 7 (tsgo / typescript-go) for type information typescript-eslint/typescript-eslint#10940