chore(deps): bump TypeScript 5.8 → 6.0 (major)#184
Merged
Conversation
Closes #176. Earlier attempt (documented on the issue) hit two blockers; both now resolved: 1. svelte2tsx@0.7.55 widened its TS peer dep to include ^6.0.0 (was ^4.9.4 || ^5.0.0). pnpm install now produces only a single peer-dep WARN from @astrojs/svelte@8.1.0 itself (still pins typescript: ^5.3.3) — that's a warning, not an error, and CI tooling (astro check, vitest, eslint) all pass against TS 6. 2. TS 6 stopped auto-including @types/node for ambient globals (`process`, `Buffer`, etc.) under "moduleResolution": "NodeNext". Added "types": ["node"] to root tsconfig.json. apps/web extends astro/tsconfigs/strict (NOT root) so its DOM-types resolution is unaffected. Verified: all per-package type checks pass; the same 27 informational hints from prior TS 5.8 runs are preserved. Verified locally on Node 22 + pnpm 11 (#175): pnpm install, build, test (267 passing), typecheck, lint all green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI on PR #184 surfaced TS2688: \`Cannot find type definition file for 'node'\` when building @civic-source/types. The package is pure Zod schemas and has no @types/node devDep — but the root tsconfig sets \`types: ["node"]\` (added in the same PR to unblock TS 6 in the Node-side packages). On CI's frozen-lockfile install, @types/node isn't hoisted into packages/types/node_modules because nothing there imports it. Fix: override \`types: []\` in packages/types' tsconfig.{json,build.json}. The package legitimately needs zero type packages. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #176. Earlier attempt (documented on the issue) hit two blockers; both now resolved:
Blocker 1 (resolved): svelte2tsx peer-dep
svelte2tsx@0.7.55widened its TS peer dep to include^6.0.0(was^4.9.4 || ^5.0.0).pnpm installnow produces only a single peer-dep WARN from@astrojs/svelte@8.1.0itself (still pinstypescript: ^5.3.3) — that's a warning, not an error, and CI tooling (astro check,vitest,eslint) all pass against TS 6.Blocker 2 (resolved): types resolution
TS 6 stopped auto-including
@types/nodefor ambient globals (process,Buffer, etc.) under"moduleResolution": "NodeNext". Fix: add"types": ["node"]to roottsconfig.json.apps/webextendsastro/tsconfigs/strict(NOT root), so its DOM-types resolution is unaffected — verified: all per-package type checks pass; the same 27 informational hints from prior TS 5.8 runs are preserved.Verification (Node 22 + pnpm 11 from #175)
pnpm install— clean (single expected peer warning)pnpm build— all 8 packagespnpm test— 267 passingpnpm typecheck— 0 errors, 27 hints (same as TS 5.8 baseline)pnpm lint— clean🤖 Generated with Claude Code