Commit 3094032
chore(tsconfig): set explicit rootDir to ./src for TypeScript 6.0 compatibility (#48)
TypeScript 6.0 made `rootDir` a required option when the source layout
has files outside `outDir`'s implied root (which is our case — we have
tests/ alongside src/, and `outDir` is ./dist). On TS 5.x the inference
worked silently; on TS 6.0 it errors:
tsconfig.json(13,5): error TS5011: The common source directory of
'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly
set to this or another path to adjust your output's file layout.
Adding `"rootDir": "./src"` is forward- and backward-compatible: it
matches what TS 5.x was inferring, so build, type-check, lint, and test
behavior on the current pinned TypeScript (5.9.x) is unchanged. Verified
locally: \`npm run build\`, \`npm run type-check\`, \`npm run lint\`, and
\`npm test\` (5490 tests) all green at this commit.
Unblocks #34 (typescript 5.9.3 → 6.0.2 dependabot bump): once this PR
lands and dependabot rebases #34, its build step will succeed.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1318700 commit 3094032
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments