You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #9923, which moved tsc typechecking to the native TypeScript 7 compiler. The rollup build still runs TypeScript 6, because TS 7.0 ships the native compiler without a programmatic API and @rollup/plugin-typescript needs that API. typescript is therefore aliased to @typescript/typescript6, which the plugin (and typescript-eslint) consume.
Trigger
TypeScript 7.1 shipping the programmatic API, and@rollup/plugin-typescript supporting it. The concrete signal to watch is the plugin declaring a typescript peer range that admits 7.x (it is currently >=3.7.0, which accepts 7 by version number but not in practice, since 7.0 has no API to call).
Expected change
Ideally just a dependency bump:
@rollup/plugin-typescript → a version supporting TS 7
drop the typescript → @typescript/typescript6 alias and the @typescript/native alias, going back to a plain typescript dependency — only if typescript-eslint also supports 7.x by then; otherwise the alias has to stay for eslint even once the build is migrated
rollup.config.js has two builds, each with its own typescript() plugin instance on the same src/index.ts input, so TypeScript compiles twice — roughly 4.5 s of the ~7.3 s build. A native build should land around ~3.5 s.
Things to check beyond bumping the dep
Do not split into a separate tsc emit + rollup bundle step. This was considered and deliberately rejected. Chained sourcemaps (tsc → rollup, with both sourceMap and declarationMap) are easy to get subtly wrong, and it is the main reason to wait for the plugin rather than restructure the pipeline.
npm run watch (rollup -c -w) must keep working. A separate tsc emit step would not integrate with rollup's watch loop, which is the other reason to keep the plugin driving emit rather than doing it ourselves.
Expect .d.ts churn. TS 7 emits single quotes for string literal types — export declare const ROW: 'row' where TS 6 emits "row". Measured: 38 of 187 .d.ts files affected, plus every .d.ts.map. Semantically identical, but it is published output, so decide consciously whether to accept it.
Byte-compare the build output. Clean build before and after, comparing all 378 files in build/ (bundle, minified bundle, .d.ts, .map). chore(deps): typecheck with TypeScript 7 #9923 did exactly this to prove the alias arrangement changed nothing; the same check should gate this change, with the .d.ts quote-style diff as the only expected delta.
Confirm bin/vl2vg and friends still work against the rebuilt bundle (the CLI job covers this).
Follow-up to #9923, which moved
tsctypechecking to the native TypeScript 7 compiler. The rollup build still runs TypeScript 6, because TS 7.0 ships the native compiler without a programmatic API and@rollup/plugin-typescriptneeds that API.typescriptis therefore aliased to@typescript/typescript6, which the plugin (andtypescript-eslint) consume.Trigger
TypeScript 7.1 shipping the programmatic API, and
@rollup/plugin-typescriptsupporting it. The concrete signal to watch is the plugin declaring atypescriptpeer range that admits7.x(it is currently>=3.7.0, which accepts 7 by version number but not in practice, since 7.0 has no API to call).Expected change
Ideally just a dependency bump:
@rollup/plugin-typescript→ a version supporting TS 7typescript→@typescript/typescript6alias and the@typescript/nativealias, going back to a plaintypescriptdependency — only iftypescript-eslintalso supports 7.x by then; otherwise the alias has to stay for eslint even once the build is migratedMotivation (measured on #9923's branch)
.js+.d.ts+ maps)tsc --noEmittypecheck (837 files)rollup.config.jshas two builds, each with its owntypescript()plugin instance on the samesrc/index.tsinput, so TypeScript compiles twice — roughly 4.5 s of the ~7.3 s build. A native build should land around ~3.5 s.Things to check beyond bumping the dep
tscemit + rollup bundle step. This was considered and deliberately rejected. Chained sourcemaps (tsc→ rollup, with bothsourceMapanddeclarationMap) are easy to get subtly wrong, and it is the main reason to wait for the plugin rather than restructure the pipeline.npm run watch(rollup -c -w) must keep working. A separatetscemit step would not integrate with rollup's watch loop, which is the other reason to keep the plugin driving emit rather than doing it ourselves..d.tschurn. TS 7 emits single quotes for string literal types —export declare const ROW: 'row'where TS 6 emits"row". Measured: 38 of 187.d.tsfiles affected, plus every.d.ts.map. Semantically identical, but it is published output, so decide consciously whether to accept it.build/(bundle, minified bundle,.d.ts,.map). chore(deps): typecheck with TypeScript 7 #9923 did exactly this to prove the alias arrangement changed nothing; the same check should gate this change, with the.d.tsquote-style diff as the only expected delta.bin/vl2vgand friends still work against the rebuilt bundle (the CLI job covers this).Related
ts-json-schema-generatorv3 native