From 2f9f8b805c5b8ffdd25a7d326d554639be8d1bd5 Mon Sep 17 00:00:00 2001 From: Kyle Lacy Date: Tue, 2 Jan 2024 23:07:00 -0800 Subject: [PATCH] Update CI to check TypeScript types in runtime NPM package --- .github/workflows/ci.yml | 8 ++++++++ crates/brioche/runtime/package.json | 3 ++- crates/brioche/runtime/tsconfig.json | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91ffc36..4d65794 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,14 @@ jobs: run: make check-db-schema - name: Check Clippy run: cargo clippy --all -- -Dwarnings + - name: Install runtime distribution packages + run: | + cd crates/brioche/runtime + npm install + - name: Check runtime distribution types + run: | + cd crates/brioche/runtime + npm run check - name: Check runtime distribution is up to date run: | cd crates/brioche/runtime diff --git a/crates/brioche/runtime/package.json b/crates/brioche/runtime/package.json index 4fa90bb..c05e0f5 100644 --- a/crates/brioche/runtime/package.json +++ b/crates/brioche/runtime/package.json @@ -2,7 +2,8 @@ "name": "brioche-runtime", "version": "0.0.0", "scripts": { - "build": "esbuild --bundle src/index.ts --format=esm --outfile=dist/index.js --minify-whitespace" + "build": "esbuild --bundle src/index.ts --format=esm --outfile=dist/index.js --minify-whitespace", + "check": "tsc --noEmit" }, "devDependencies": { "esbuild": "^0.19.2" diff --git a/crates/brioche/runtime/tsconfig.json b/crates/brioche/runtime/tsconfig.json index 2358e76..8676097 100644 --- a/crates/brioche/runtime/tsconfig.json +++ b/crates/brioche/runtime/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "target": "ESNext", + "skipDefaultLibCheck": true, "strict": true, "moduleResolution": "bundler", "noFallthroughCasesInSwitch": true,