diff --git a/convex/tsconfig.json b/convex/tsconfig.json new file mode 100644 index 0000000..ab234ad --- /dev/null +++ b/convex/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "allowJs": true, + "allowImportingTsExtensions": true, + "allowSyntheticDefaultImports": true, + "exactOptionalPropertyTypes": true, + "forceConsistentCasingInFileNames": true, + "isolatedModules": true, + "jsx": "react-jsx", + "lib": ["ES2024", "DOM", "DOM.Iterable"], + "module": "ESNext", + "moduleDetection": "force", + "moduleResolution": "Bundler", + "noEmit": true, + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noUncheckedIndexedAccess": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true, + "target": "ES2024" + }, + "exclude": ["./_generated", "./**/*.test.ts", "./test.setup.ts"], + "include": ["./**/*.ts"] +} diff --git a/scripts/deploy-hosted-sync.test.ts b/scripts/deploy-hosted-sync.test.ts index 45a92f8..771aba8 100644 --- a/scripts/deploy-hosted-sync.test.ts +++ b/scripts/deploy-hosted-sync.test.ts @@ -64,6 +64,39 @@ const outputWriter = (chunks: string[]): Pick => ({ }); describe("verified hosted deployment", () => { + test("ships the Convex typecheck project required by the deploy gate", async () => { + const configuration = JSON.parse(await readFile( + join(import.meta.dir, "..", "convex", "tsconfig.json"), + "utf8", + )) as unknown; + + expect(configuration).toEqual({ + compilerOptions: { + allowJs: true, + allowImportingTsExtensions: true, + allowSyntheticDefaultImports: true, + exactOptionalPropertyTypes: true, + forceConsistentCasingInFileNames: true, + isolatedModules: true, + jsx: "react-jsx", + lib: ["ES2024", "DOM", "DOM.Iterable"], + module: "ESNext", + moduleDetection: "force", + moduleResolution: "Bundler", + noEmit: true, + noFallthroughCasesInSwitch: true, + noImplicitOverride: true, + noUncheckedIndexedAccess: true, + resolveJsonModule: true, + skipLibCheck: true, + strict: true, + target: "ES2024", + }, + exclude: ["./_generated", "./**/*.test.ts", "./test.setup.ts"], + include: ["./**/*.ts"], + }); + }); + test("binds deploy to one exact generated target and clean source without inheriting stale selectors", async () => { const repositoryRoot = await makeTemporaryDirectory("hra-hosted-source-"); const temporaryRoot = await makeTemporaryDirectory("hra-hosted-binding-");