diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93f90416..0ade4da8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,6 +73,32 @@ jobs: - name: Check formatting run: pnpm prettier --check . + ts-check: + runs-on: ubuntu-latest + timeout-minutes: 10 + name: 'TS-Check: node-20, ubuntu-latest' + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Install pnpm + uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 + + - name: Set node version to 20 + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version: 20 + cache: 'pnpm' + + - name: Install deps + run: pnpm install + + - name: Build types + run: pnpm run build:types + + - name: Check scripts + run: pnpm run ts-check + create-migration-test: runs-on: ubuntu-latest strategy: diff --git a/package.json b/package.json index cf5a1c35..02c14f73 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,12 @@ "build": "run-s build:clean build:code build:types", "format": "prettier --cache --write .", "lint": "eslint --cache --cache-strategy content --report-unused-disable-directives .", + "ts-check": "tsc", "test": "cross-env NODE_ENV=test mocha --require ./mocha.bootstrap.js \"test/*.ts\"", "docs:dev": "docsify serve docs", "migrate": "node bin/node-pg-migrate.js", "prepublishOnly": "pnpm run clean && pnpm install && pnpm run build", - "preflight": "pnpm install && run-s format build lint test" + "preflight": "pnpm install && run-s format build lint test ts-check" }, "bin": { "node-pg-migrate": "bin/node-pg-migrate.js" diff --git a/tsconfig.json b/tsconfig.json index e66ab98a..64d1ff55 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "target": "ES2017", "module": "CommonJS", "moduleResolution": "Node", - "lib": ["ES2019"], + "lib": ["ES2019", "DOM"], "noEmit": true, "esModuleInterop": true, "sourceMap": false,