From 17a95574decc5d496de121c784a6b00e9581e45f Mon Sep 17 00:00:00 2001 From: Kanad Gupta <8854718+kanadgupta@users.noreply.github.com> Date: Thu, 21 Sep 2023 16:19:56 -0500 Subject: [PATCH] fix: CJS export issue, CI cleanup (#88) * fix: remove problematic flag tsup already treeshakes! this flag is causing discrepancies with the CJS build vs types * ci: re-add typechecking --- .github/workflows/ci.yml | 4 +--- package.json | 6 +++--- tsup.config.ts | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bed9cf..a302f22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,4 @@ jobs: with: node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build - - run: npm test + - run: npm cit diff --git a/package.json b/package.json index 153300e..be3325c 100644 --- a/package.json +++ b/package.json @@ -27,13 +27,13 @@ }, "scripts": { "build": "tsup", - "lint": "eslint . --ext .js,.ts", + "lint": "tsc --noEmit && eslint . --ext .js,.ts", "prebuild": "rm -rf dist/", "prepack": "npm run build", "prepare": "husky install", - "pretest": "npm run build; npm run lint", + "pretest": "npm run lint", "prettier": "prettier --list-different --write \"./**/**.{js,ts}\"", - "test": "vitest --coverage" + "test": "vitest run --coverage" }, "devDependencies": { "@commitlint/cli": "^17.6.5", diff --git a/tsup.config.ts b/tsup.config.ts index ee85526..badf3f5 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -16,5 +16,4 @@ export default defineConfig((options: Options) => ({ silent: !options.watch, sourcemap: true, splitting: true, - treeshake: true, }));