Skip to content

Commit 4c7abac

Browse files
committed
fix(prisma-next): hermetic typecheck against stack source, gated in CI (#684)
1 parent b6ff7c4 commit 4c7abac

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/tests.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,15 @@ jobs:
127127
- name: Type tests (stack-supabase)
128128
run: pnpm --filter @cipherstash/stack-supabase run test:types
129129

130+
# prisma-next's operator-capability gating is proven by `.test-d.ts`
131+
# `@ts-expect-error` assertions (an unsupported operator on a column
132+
# must be a compile error). Those only fire when tsc processes them,
133+
# so the package `typecheck` must run — and be required — here (#684).
134+
# Its tsconfig resolves stack subpaths to SOURCE, so no build step is
135+
# needed first.
136+
- name: Typecheck (prisma-next — enforces v3 operator-capability gating)
137+
run: pnpm --filter @cipherstash/prisma-next run typecheck
138+
130139
- name: Lint — no hardcoded package-manager runners
131140
run: pnpm run lint:runners
132141

packages/prisma-next/tsconfig.json

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,22 @@
2828
// TS6059 errors here.
2929
"baseUrl": ".",
3030
"paths": {
31-
// test-kit is a source-only package that consumes stack through
32-
// the `@/` alias; mirror stack-drizzle's mapping so its sources
33-
// typecheck inside this package's program.
31+
// Resolve every consumed stack subpath to SOURCE, not `dist`
32+
// (mirrors `packages/test-kit/tsconfig.json`). Without these,
33+
// `pnpm typecheck` only works after `pnpm build` — and on a
34+
// fresh/stale checkout the dist d.ts resolves partially, which
35+
// surfaces as implicit-`any` noise far from the real cause
36+
// (#684). The matching runtime aliases live in `vitest.shared.ts`.
37+
"@cipherstash/stack": ["../stack/src/index.ts"],
38+
"@cipherstash/stack/client": ["../stack/src/client.ts"],
39+
"@cipherstash/stack/types": ["../stack/src/types-public.ts"],
40+
"@cipherstash/stack/eql/v3": ["../stack/src/eql/v3/index.ts"],
41+
"@cipherstash/stack/schema": ["../stack/src/schema/index.ts"],
42+
"@cipherstash/stack/v3": ["../stack/src/encryption/v3.ts"],
43+
"@cipherstash/stack/adapter-kit": ["../stack/src/adapter-kit.ts"],
44+
// Resolving stack to source means we also inherit stack's OWN
45+
// internal alias (`@/…` inside stack sources) — and test-kit's
46+
// sources (pulled in by the integration suite) use it too.
3447
"@/*": ["../stack/src/*"]
3548
}
3649
},

0 commit comments

Comments
 (0)