From dd1a8f4f73fed551478df00bb7ffa5dee46cc7bf Mon Sep 17 00:00:00 2001 From: Pratyush Venkatakrishnan Date: Mon, 2 Dec 2024 17:07:56 -0500 Subject: [PATCH] Run latest tsc in CI react-scripts prevents us from depending on tsc 5.x, but we need to use tsc 5.x for type checking so that "moduleResolution": "bundler" is supported; use npx to run the latest tsc in CI. --- .github/workflows/ci.yml | 6 +++--- package-lock.json | 4 +--- package.json | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9d934f..17ae1c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ env.node-version }} + - name: Install node uses: actions/setup-node@v4 with: node-version: ${{ env.node-version }} @@ -35,7 +35,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ env.node-version }} + - name: Install node uses: actions/setup-node@v4 with: node-version: ${{ env.node-version }} @@ -45,6 +45,6 @@ jobs: - name: Run ESLint run: npm run ci-eslint - name: Run tsc - run: npm run ci-tsc + run: npx tsc@latest - name: Run build run: npm run build diff --git a/package-lock.json b/package-lock.json index 5affaa5..02a4350 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2134,7 +2134,6 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", - "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -20740,8 +20739,7 @@ "dependencies": { "is-unicode-supported": { "version": "1.3.0", - "bundled": true, - "dev": true + "bundled": true } } }, diff --git a/package.json b/package.json index 1f7efca..8217e69 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,7 @@ "eject": "react-scripts eject", "format": "prettier --write **/*.{ts,tsx}", "ci-prettier": "prettier --check **/*.{ts,tsx}", - "ci-eslint": "eslint **/*.{ts,tsx}", - "ci-tsc": "tsc" + "ci-eslint": "eslint **/*.{ts,tsx}" }, "eslintConfig": { "extends": [