Skip to content

Commit f90ee52

Browse files
plusminushalfclaude
andcommitted
Make type-consumer fixture hermetic with types: []
Without an explicit types option, tsc auto-includes every node_modules/@types package from parent directories, so the monorepo root's hoisted typings leaked into the fixture program. In CI, @types/pg failed to resolve pg-protocol/dist/messages under skipLibCheck: false and broke the bundler consumer check. The fixture must only type-check the packed permissionless tarball, not workspace typings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent ddb762f commit f90ee52

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/fixtures/type-consumer/tsconfig.bundler.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
"noUncheckedIndexedAccess": true,
1111
"exactOptionalPropertyTypes": true,
1212
"skipLibCheck": false,
13-
"noEmit": true
13+
"noEmit": true,
14+
// Keep the program hermetic: without this, tsc auto-includes every
15+
// node_modules/@types package from parent directories (the monorepo
16+
// root), so unrelated workspace typings leak into this fixture.
17+
"types": []
1418
},
1519
"files": ["consumer.ts"]
1620
}

.github/fixtures/type-consumer/tsconfig.node10.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
"noUncheckedIndexedAccess": true,
1313
"esModuleInterop": true,
1414
"skipLibCheck": true,
15-
"noEmit": true
15+
"noEmit": true,
16+
// Keep the program hermetic: without this, tsc auto-includes every
17+
// node_modules/@types package from parent directories (the monorepo
18+
// root), so unrelated workspace typings leak into this fixture.
19+
"types": []
1620
},
1721
"files": ["consumer.ts"]
1822
}

0 commit comments

Comments
 (0)