Skip to content

Website: upgrade TypeScript 5 -> 6#14700

Open
ondrejmirtes wants to merge 1 commit into
2.2.xfrom
website-deps-typescript6
Open

Website: upgrade TypeScript 5 -> 6#14700
ondrejmirtes wants to merge 1 commit into
2.2.xfrom
website-deps-typescript6

Conversation

@ondrejmirtes
Copy link
Copy Markdown
Member

Upgrades typescript 5.9.3 → 6.0.3.

TypeScript 6 no longer auto-includes every @types package and is stricter, which surfaced a few latent issues that 5.x had masked:

  • lib too low: the code uses es2016–es2019 APIs (Array.includes, Object.entries/values/fromEntries) while lib was pinned to es2015. Bumped target/lib to es2020. This is type-check only — Vite transpiles using its own browserslist target, so the shipped JS/CSS bundles are byte-identical (verified: asset hashes unchanged).
  • deprecated resolution: moduleResolution: "node" (node10) is deprecated in TS 6 and removed in TS 7. Switched to "bundler", the correct fit for a Vite-bundled project.
  • CSS side-effect import: added a declare module '@docsearch/css'; ambient declaration (next to the existing one in untyped.d.ts).

Verification

  • npm run check passes (tsc 6 + ESLint).
  • Build succeeds; JS/CSS asset hashes, HTML, and RSS feed unchanged vs before.

🤖 Generated with Claude Code

typescript 5.9.3 -> 6.0.3

TypeScript 6 surfaced a few issues that 5.x masked (it no longer
auto-includes every @types package):

- The code uses es2016-es2019 APIs (Array.includes, Object.entries/
  values/fromEntries) but lib was pinned to es2015. Bumped target/lib to
  es2020. This is type-check only; Vite transpiles using its own
  browserslist target, so the shipped bundles are byte-identical.
- moduleResolution "node" (node10) is deprecated in TS 6; switched to
  "bundler", which is the correct fit for a Vite project.
- Added a module declaration for the '@docsearch/css' side-effect import.

npm run check passes; build output (JS/CSS asset hashes, HTML, RSS) is
unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant