diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd0c0ce0..ed9b3055 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -286,8 +286,6 @@ jobs: - id: typecheck if: steps.test-files-check.outputs.files_exists == 'true' name: Run typecheck - env: - NODE_OPTIONS: --experimental-strip-types --experimental-transform-types run: yarn typecheck build: needs: diff --git a/.github/workflows/typescript-canary.yml b/.github/workflows/typescript-canary.yml index 3267b118..c5292762 100644 --- a/.github/workflows/typescript-canary.yml +++ b/.github/workflows/typescript-canary.yml @@ -73,8 +73,6 @@ jobs: run: yarn build - id: typecheck name: Run typecheck - env: - NODE_OPTIONS: --experimental-strip-types --experimental-transform-types run: yarn typecheck - id: typecheck-build name: Run typecheck-build diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 71c04a37..032925ca 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -4,7 +4,7 @@ "eslint --exit-on-fatal-error", "cspell lint --color --no-progress --relative $@" ], - "**/*.{cts,mts,ts}": "vitest run --changed --typecheck --mode=typecheck", + "**/*.{cts,mts,ts}": "yarn test:run --changed --typecheck --mode=typecheck", "**/yarn.lock": "yarn dedupe --check", "src/**/*.ts": ["yarn build", "bash -c tsc -p tsconfig.build.json"] } diff --git a/package.json b/package.json index b63aaf11..8e32341c 100644 --- a/package.json +++ b/package.json @@ -78,9 +78,9 @@ "prepublishOnly": "toggle-scripts -prepack", "release": "bash ./scripts/release.sh", "remark": "remark .", - "test": "vitest run --typecheck --mode=typecheck", - "typecheck": "yarn test", - "typecheck:watch": "vitest --typecheck --mode=typecheck" + "test": "yarn test:run --typecheck --mode=typecheck", + "test:run": "cross-env NODE_OPTIONS=\"--conditions pkg-types --experimental-strip-types --experimental-transform-types\" vitest run", + "typecheck": "yarn test" }, "devDependencies": { "@arethetypeswrong/cli": "0.15.4",