Repository navigation
Commit 62098bb
build(ts): upgrade the toolchain to TypeScript 7
TypeScript 7 is the native Go compiler. Type-checking the workspace drops
from 1.18s to 0.28s over an identical 545-file graph, and the emit is
equivalent: .d.ts output is byte-identical to 6's, and the .js differs only
in quote style on module specifiers (7 preserves the source's single quotes
where 6 normalised to double).
packages/website stays on typescript@6 — the last JS-implemented release.
Its example editors type-check (ts-diagnostics.ts) and transpile
(run-worker.ts) *in the browser*, and TypeScript 7 has no in-process API to
do that with: `import * as ts from 'typescript'` now resolves to a module
exporting nothing but a version string, and the real API spawns the tsgo
binary and talks to it over a pipe. No WASM build of tsgo exists yet
(microsoft/typescript-go#3478, #4633) — the official TypeScript Playground
tops out at 6.0.3 and Monaco still bundles the 5.9 JS compiler. 7 also moved
lib.*.d.ts out of the `typescript` package into the per-platform binary
packages, where the editors' import.meta.glob would find nothing.
@astrojs/check pins the website to ^5 || ^6 regardless. pnpm keeps the two
versions apart per package.
scripts/lint-no-reexports.mjs used ts.createSourceFile, which no longer
exists; it now parses through typescript/unstable/sync and keeps its
predicates via unstable/ast/is. The node shapes are unchanged, so the rule
itself is untouched — verified against injected violations of all three
forms it rejects.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HDv69cahZVx96PCbxiRpqg1 parent fd5a2ab commit 62098bb
8 files changed
Lines changed: 297 additions & 23 deletions
File tree
- examples/typescript-vitest
- typescript
- packages
- language
- website/src/lib
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
1 | 10 | | |
2 | 11 | | |
3 | 12 | | |
4 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
5 | 16 | | |
6 | 17 | | |
7 | 18 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments