Skip to content

Commit 068f641

Browse files
committed
fix(rbac): typecheck the testcontainers-importing test file
Split into tsconfig.src.json/tsconfig.test.json like run-engine and schedule-engine, so fallback.userActor.test.ts is type-checked instead of excluded.
1 parent b126116 commit 068f641

4 files changed

Lines changed: 40 additions & 5 deletions

File tree

internal-packages/rbac/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"scripts": {
1818
"clean": "rimraf dist",
19-
"typecheck": "tsc --noEmit",
19+
"typecheck": "tsc --noEmit -p tsconfig.src.json && tsc --noEmit -p tsconfig.test.json",
2020
"build": "pnpm run clean && tsc -p tsconfig.build.json",
2121
"dev": "tsc --noEmit false --outDir dist --declaration --watch",
2222
"test": "vitest run",

internal-packages/rbac/tsconfig.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"references": [{ "path": "./tsconfig.src.json" }, { "path": "./tsconfig.test.json" }],
23
"compilerOptions": {
34
"target": "ES2019",
45
"lib": ["ES2019", "DOM"],
@@ -13,8 +14,5 @@
1314
"strict": true,
1415
"customConditions": ["@triggerdotdev/source"]
1516
},
16-
// Excluded from tsc: it imports @internal/testcontainers, whose source
17-
// (pulled in via customConditions) doesn't type-check under this config.
18-
// vitest still runs and transpiles it.
19-
"exclude": ["node_modules", "dist", "src/fallback.userActor.test.ts"]
17+
"exclude": ["node_modules", "dist"]
2018
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"include": ["src/**/*.ts"],
3+
"exclude": ["node_modules", "dist", "src/**/*.test.ts"],
4+
"compilerOptions": {
5+
"target": "ES2019",
6+
"lib": ["ES2019", "DOM"],
7+
"module": "ESNext",
8+
"moduleResolution": "Bundler",
9+
"esModuleInterop": true,
10+
"forceConsistentCasingInFileNames": true,
11+
"isolatedModules": true,
12+
"preserveWatchOutput": true,
13+
"skipLibCheck": true,
14+
"noEmit": true,
15+
"strict": true,
16+
"types": ["node"],
17+
"customConditions": ["@triggerdotdev/source"]
18+
}
19+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"include": ["src/**/*.test.ts"],
3+
"compilerOptions": {
4+
"target": "ES2022",
5+
"lib": ["ES2022", "DOM"],
6+
"module": "ESNext",
7+
"moduleResolution": "Bundler",
8+
"esModuleInterop": true,
9+
"forceConsistentCasingInFileNames": true,
10+
"isolatedModules": true,
11+
"preserveWatchOutput": true,
12+
"skipLibCheck": true,
13+
"noEmit": true,
14+
"strict": true,
15+
"types": ["vitest/globals", "node"],
16+
"customConditions": ["@triggerdotdev/source"]
17+
}
18+
}

0 commit comments

Comments
 (0)