chore(typescript): move to TypeScript 7 with an ES2025 target
TypeScript 7.0 is the native compiler and ships no JavaScript API, which typescript-eslint still needs. Install both, as Microsoft documents it: - "@typescript/native": "npm:typescript@^7.0.2" gives `tsc` = 7.0 - "typescript": "npm:@typescript/typescript6@^6.0.2" gives the 6.0 API that typescript-eslint loads (its peer range stops below 6.1), and `tsc6` CI fails if `tsc` ever resolves to TypeScript 6 (@typescript/old, pulled in by the 6.0 package, ships a `tsc` too). tsconfig.json (src): - target ES2025: the newest year TypeScript 7.0, esbuild and Vite all know - lib ES2022 + DOM: the browser floor (Vite's baseline-widely-available, Chrome 111 / Safari 16.4 / Firefox 114), because nothing polyfills - baseUrl removed (gone in 7.0; paths were already relative), DOM.Iterable dropped (merged into DOM), `types: []` spelled out, erasableSyntaxOnly and verbatimModuleSyntax on (both clean) tsconfig.check.json: lib ES2025 for tests, scripts, worker and build plugins. Platform floor: the Tauri build no longer lowers to es2020; it shares the web build's baseline (the stylesheet already needed Chromium 99+ / Safari 15.4+). macOS minimumSystemVersion is 11.0 (the build is arm64). Also: eslint.config.js uses ESLint's defineConfig (tseslint.config is deprecated); THIRD_PARTY_NOTICES names the real package behind an npm alias, sorted with a shared code-unit comparator (src/utils/sort.ts); Dependabot groups typescript + @typescript/*; a test's typed-array annotation follows TypeScript 7's lib.dom. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
706a9c89a2
commit
ad523ea0fb
14 files changed
+484
-40
No files matched your search
@@ -66,6 +66,12 @@ updates:
|
||||
]
|
||||
cloudflare:
|
||||
patterns: ["wrangler", "@cloudflare/*"]
|
||||
# TypeScript 7 (`tsc`) and the TypeScript 6 API that typescript-eslint
|
||||
# still needs, installed side by side as npm aliases (see package.json).
|
||||
# Dependabot may not resolve `npm:` aliases — if no PR shows up for a new
|
||||
# 7.x, bump both by hand.
|
||||
typescript:
|
||||
patterns: ["typescript", "@typescript/*"]
|
||||
lint-and-format:
|
||||
patterns: ["eslint*", "@eslint/*", "typescript-eslint", "prettier*", "knip"]
|
||||
build-tooling:
|
||||
@@ -89,8 +95,8 @@ updates:
|
||||
patterns: ["@types/*"]
|
||||
ignore:
|
||||
# Majors land in their own planned release because each one needs a real
|
||||
# migration (TypeScript 7, Vitest 5 and lucide-react 1 are the current
|
||||
# examples). Dependabot handles minor + patch.
|
||||
# migration (Vitest 5 is the current example). Dependabot handles minor +
|
||||
# patch.
|
||||
- dependency-name: "*"
|
||||
update-types: ["version-update:semver-major"]
|
||||
|
||||
|
||||
@@ -36,6 +36,13 @@ jobs:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
# `tsc` must be TypeScript 7 (@typescript/native). The `typescript` alias
|
||||
# (@typescript/typescript6, the API typescript-eslint loads) pulls in
|
||||
# TypeScript 6 as @typescript/old, which ships a `tsc` too — npm links the
|
||||
# first one by path order. Fail loudly if that ever flips, instead of
|
||||
# silently type-checking with 6.
|
||||
- name: TypeScript 7 is the `tsc` on PATH
|
||||
run: ./node_modules/.bin/tsc --version | grep -q '^Version 7\.'
|
||||
|
||||
# --- correctness ------------------------------------------------------
|
||||
# `typecheck` covers src/ (what Vite builds); `typecheck:all` adds tests/,
|
||||
|
||||
Reference in new issue
Block a user