Skip to content

Commit 3094032

Browse files
sjsyrekclaude
andauthored
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

File tree

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"declarationMap": true,
1212
"sourceMap": true,
1313
"outDir": "./dist",
14+
"rootDir": "./src",
1415
"removeComments": true,
1516
"newLine": "lf",
1617

0 commit comments

Comments
 (0)