Skip to content

chore(tsconfig): drop baseUrl and list types explicitly for TypeScript 6 - #99

Merged
bartsdev merged 1 commit into
mainfrom
chore/tsconfig-typescript-6
Oct 30, 2026
Merged

bartsdev merged 1 commit into
mainfrom
chore/tsconfig-typescript-6

Conversation

@bartsdev

Copy link
Copy Markdown
Member

Summary

This prepares tsconfig.json for TypeScript 6 so #61 (TypeScript 5.9.3 → 6.0.3) can pass CI. The config works on both versions.

     "rootDir": "./src",
-    "baseUrl": ".",
+    "types": ["node", "jest"],
     "paths": {
-      "@clack/prompts": ["node_modules/@clack/prompts/dist/index.d.mts"]
+      "@clack/prompts": ["./node_modules/@clack/prompts/dist/index.d.mts"]
     }
  • baseUrl: TypeScript 6 deprecates it, and tsc fails with TS5101. paths has resolved relative to the tsconfig since TypeScript 4.1, so the mapping only needs a ./ prefix.
  • types: TypeScript 6 defaults it to [], so @types/node and @types/jest are no longer included automatically. Without listing them, describe, jest and similar are unknown, and all Jest suites fail because ts-jest type-checks too.

Evidence

  • Before (Bump typescript from 5.9.3 to 6.0.3 #61 on TS 6.0.3):
    tsconfig.json(10,5): error TS5101: Option 'baseUrl' is deprecated …
    # with baseUrl removed only:
    src/cli/lifecycle.test.ts(5,1): error TS2593: Cannot find name 'describe' …
    Test Suites: 38 failed, 38 total
    
    After, on both versions:
    TS 5.9.3 (main):  tsc --noEmit ok · jest 395/395 · yarn build ok
    TS 6.0.3 (#61):   tsc --noEmit ok · jest 395/395 · yarn build ok · direct MCP tests 10 passed
    

Merge Danger

Door: two-way

Blast Radius: type-check only

This only changes type-checking: xmcp build skips type checks, and esbuild uses tsconfig.cli.json, which resets paths. After this merges, comment @dependabot rebase on #61.

🤖 Generated with Claude Code

TypeScript 6 deprecates baseUrl (TS5101) and defaults `types` to [],
so @types/node and @types/jest are no longer picked up automatically.
Make the @clack/prompts path mapping relative and list the types.
Both changes work on TypeScript 5.9 too, which unblocks #61.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bartsdev
bartsdev requested a review from HarshCasper October 30, 2026 09:37
@bartsdev
bartsdev merged commit e63925b into main Oct 30, 2026
2 checks passed
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