Skip to content

Commit

Permalink
chore(repo): check types in typescript packages in CI (#780)
Browse files Browse the repository at this point in the history
* build: create root test:ts task based on what changed

* ci: run test:ts task in circle config

* Update circleci task name

Co-authored-by: Tiger Oakes <contact@tigeroakes.com>

* build: add missing test:ts tasks to ts projects

* build: add missing typescript dependency

* build: add missing tsconfig

Co-authored-by: Tiger Oakes <contact@tigeroakes.com>
  • Loading branch information
fernandopasik and NotWoods committed Feb 14, 2021
1 parent 7359d1f commit 1e14664
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 44 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ jobs:
- run:
name: Run linting.
command: pnpm run ci:lint
- run:
name: Check TypeScript types.
command: pnpm run test:ts
- save_cache:
key: dependency-cache-{{ checksum "pnpm-lock.yaml" }}
paths:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"pub": "node scripts/pub.js",
"publish": "node scripts/publish.js",
"security": "pnpm audit --audit-level=moderate",
"test": "node scripts/run-changed.js test"
"test": "node scripts/run-changed.js test",
"test:ts": "node scripts/run-changed.js test:ts"
},
"dependencies": {
"conventional-commits-parser": "^3.1.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/alias/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"prepare": "pnpm run build",
"prepublishOnly": "pnpm run lint && pnpm run test",
"pretest": "pnpm run build",
"test": "ava"
"test": "ava",
"test:ts": "tsc --noEmit"
},
"files": [
"dist",
Expand Down
3 changes: 2 additions & 1 deletion packages/auto-install/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"prepare": "pnpm run build",
"prepublishOnly": "pnpm run lint",
"pretest": "pnpm run build",
"test": "ava"
"test": "ava",
"test:ts": "tsc --noEmit"
},
"files": [
"dist",
Expand Down
3 changes: 2 additions & 1 deletion packages/data-uri/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"prebuild": "del-cli dist",
"prepublishOnly": "pnpm run lint && pnpm run build",
"pretest": "pnpm run build -- --sourcemap",
"test": "ava"
"test": "ava",
"test:ts": "tsc --noEmit"
},
"files": [
"dist",
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"prepare": "pnpm run build",
"prepublishOnly": "pnpm run lint && pnpm run test",
"pretest": "pnpm run build",
"test": "ava"
"test": "ava",
"test:ts": "tsc --noEmit"
},
"files": [
"dist",
Expand Down
3 changes: 2 additions & 1 deletion packages/html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"prebuild": "del-cli dist",
"prepublishOnly": "pnpm build && pnpm lint",
"pretest": "pnpm run build",
"test": "ava"
"test": "ava",
"test:ts": "tsc --noEmit"
},
"files": [
"dist",
Expand Down
3 changes: 2 additions & 1 deletion packages/pluginutils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"prepare": "pnpm run build",
"prepublishOnly": "pnpm run lint && pnpm run build",
"pretest": "pnpm run build -- --sourcemap",
"test": "ava"
"test": "ava",
"test:ts": "tsc --noEmit"
},
"files": [
"dist",
Expand Down
3 changes: 2 additions & 1 deletion packages/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"prepare": "pnpm run build",
"prepublishOnly": "pnpm run lint",
"pretest": "pnpm run build",
"test": "ava"
"test": "ava",
"test:ts": "tsc --noEmit"
},
"files": [
"dist",
Expand Down
3 changes: 2 additions & 1 deletion packages/virtual/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"prepare": "pnpm run build",
"prepublishOnly": "pnpm run lint",
"pretest": "pnpm run build",
"test": "ava"
"test": "ava",
"test:ts": "tsc --noEmit"
},
"files": [
"dist",
Expand Down
6 changes: 4 additions & 2 deletions packages/wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"prepare": "pnpm run build",
"prepublishOnly": "pnpm run lint",
"pretest": "pnpm run build",
"test": "ava"
"test": "ava",
"test:ts": "tsc --noEmit"
},
"files": [
"dist",
Expand All @@ -54,7 +55,8 @@
"@rollup/plugin-typescript": "^5.0.2",
"del-cli": "^3.0.1",
"rollup": "^2.23.0",
"source-map": "^0.7.3"
"source-map": "^0.7.3",
"typescript": "^4.1.2"
},
"types": "types/index.d.ts",
"ava": {
Expand Down
4 changes: 4 additions & 0 deletions packages/wasm/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src/**/*", "types/**/*"]
}
41 changes: 8 additions & 33 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1e14664

Please sign in to comment.