Skip to content

Commit 839192e

Browse files
committed
Add CI checks for parity and zod types
1 parent b8feec6 commit 839192e

6 files changed

Lines changed: 52 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,39 @@ jobs:
4949
- run: corepack yarn
5050
- run: corepack yarn lint:deps
5151

52+
knip-full:
53+
name: Knip (full)
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
- uses: actions/setup-node@v4
58+
with:
59+
node-version: 22
60+
- run: corepack yarn
61+
- run: corepack yarn knip
62+
63+
parity:
64+
name: Legacy parity
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
- uses: actions/setup-node@v4
69+
with:
70+
node-version: 22
71+
- run: corepack yarn
72+
- run: corepack yarn parity:transloadit
73+
74+
zod-types:
75+
name: Zod type checks
76+
runs-on: ubuntu-latest
77+
steps:
78+
- uses: actions/checkout@v4
79+
- uses: actions/setup-node@v4
80+
with:
81+
node-version: 22
82+
- run: corepack yarn
83+
- run: corepack yarn workspace @transloadit/zod test:types
84+
5285
typescript:
5386
name: Lint (TypeScript)
5487
runs-on: ubuntu-latest
@@ -186,8 +219,12 @@ jobs:
186219
needs:
187220
- pack
188221
- biome
222+
- knip
223+
- knip-full
224+
- parity
189225
- typescript
190226
- unit
227+
- zod-types
191228
if: startsWith(github.ref, 'refs/tags/')
192229
permissions:
193230
id-token: write

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"scripts": {
1010
"check": "yarn run --binaries-only knip --fix --allow-remove-files --no-config-hints && yarn lint:ts && yarn fix:js && yarn lint:js && yarn test:unit",
1111
"lint:js": "biome check .",
12-
"lint:ts": "yarn workspace @transloadit/node lint:ts && yarn workspace @transloadit/types lint:ts && yarn workspace @transloadit/zod lint:ts",
12+
"lint:ts": "yarn tsc:node && yarn tsc:types && yarn tsc:zod",
1313
"lint": "yarn lint:js",
1414
"fix": "yarn fix:js",
1515
"fix:js": "biome check --write .",
@@ -21,7 +21,10 @@
2121
"parity:transloadit": "node scripts/fingerprint-pack.ts packages/transloadit --ignore-scripts --out /tmp/transloadit-after.json && node scripts/verify-fingerprint.ts --current /tmp/transloadit-after.json --baseline docs/fingerprint/transloadit-baseline.json --allow package.json --baseline-package-json docs/fingerprint/transloadit-baseline.package.json --current-package-json packages/transloadit/package.json",
2222
"test:unit": "yarn workspace @transloadit/node test:unit && yarn workspace @transloadit/types test:unit && yarn workspace @transloadit/zod test:unit",
2323
"test:e2e": "yarn workspace @transloadit/node test:e2e",
24-
"test": "yarn workspace @transloadit/node test"
24+
"test": "yarn workspace @transloadit/node test",
25+
"tsc:node": "node ./node_modules/typescript/bin/tsc -b packages/node/tsconfig.build.json",
26+
"tsc:types": "node ./node_modules/typescript/bin/tsc -b packages/types/tsconfig.build.json",
27+
"tsc:zod": "node ./node_modules/typescript/bin/tsc -b packages/zod/tsconfig.build.json"
2528
},
2629
"devDependencies": {
2730
"@biomejs/biome": "^2.3.11",

packages/node/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@
6464
"scripts": {
6565
"check": "yarn lint:ts && yarn fix && yarn test:unit",
6666
"fix:js": "biome check --write .",
67-
"lint:ts": "tsc --build",
67+
"lint:ts": "yarn --cwd ../.. tsc:node",
6868
"fix:js:unsafe": "biome check --write . --unsafe",
6969
"lint:js": "biome check .",
7070
"lint": "npm-run-all --parallel 'lint:js'",
7171
"fix": "npm-run-all --serial 'fix:js'",
7272
"lint:deps": "knip --dependencies --no-progress",
7373
"fix:deps": "knip --dependencies --no-progress --fix",
74-
"prepack": "rm -f tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo && tsc --build tsconfig.build.json",
74+
"prepack": "rm -f tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo && yarn --cwd ../.. tsc:node",
7575
"test:unit": "vitest run --coverage ./test/unit",
7676
"test:e2e": "vitest run ./test/e2e",
7777
"test": "vitest run --coverage"

packages/transloadit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"scripts": {
5454
"check": "yarn lint:ts && yarn fix && yarn test:unit",
5555
"fix:js": "biome check --write .",
56-
"lint:ts": "tsc --build",
56+
"lint:ts": "yarn --cwd ../.. tsc:node",
5757
"fix:js:unsafe": "biome check --write . --unsafe",
5858
"lint:js": "biome check .",
5959
"lint": "npm-run-all --parallel 'lint:js'",

packages/types/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
},
2929
"scripts": {
3030
"generate": "node scripts/emit-types.ts",
31-
"lint:ts": "yarn generate && tsc --build tsconfig.build.json",
31+
"lint:ts": "yarn generate && ../../node_modules/.bin/tsc --build tsconfig.build.json",
3232
"test:unit": "node scripts/emit-types.test.ts",
33-
"build": "yarn generate && tsc --build tsconfig.build.json",
34-
"check": "yarn generate && yarn test:unit && tsc --build tsconfig.build.json"
33+
"build": "yarn generate && ../../node_modules/.bin/tsc --build tsconfig.build.json",
34+
"check": "yarn generate && yarn test:unit && ../../node_modules/.bin/tsc --build tsconfig.build.json"
3535
},
3636
"devDependencies": {
3737
"zod": "3.25.76"

packages/zod/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@
3434
"sync:v3": "node scripts/sync-v3.ts",
3535
"sync:v4": "node scripts/sync-v4.ts",
3636
"sync": "yarn sync:v3 && yarn sync:v4",
37-
"lint:ts": "yarn sync && tsc --build tsconfig.build.json",
37+
"lint:ts": "yarn sync && ../../node_modules/.bin/tsc --build tsconfig.build.json",
38+
"test:types": "yarn sync && ../../node_modules/.bin/tsc --noEmit --project tsconfig.test.json",
3839
"test:unit": "yarn sync && node test/scripts-config.test.ts && node test/patch-ai-chat-schema.test.ts && node test/exports-sync.test.ts && node test/runtime-parity.test.ts",
39-
"build": "yarn sync && tsc --build tsconfig.build.json",
40-
"check": "yarn sync && tsc --build tsconfig.build.json && tsc --noEmit --project tsconfig.test.json && yarn test:unit"
40+
"build": "yarn sync && ../../node_modules/.bin/tsc --build tsconfig.build.json",
41+
"check": "yarn sync && ../../node_modules/.bin/tsc --build tsconfig.build.json && ../../node_modules/.bin/tsc --noEmit --project tsconfig.test.json && yarn test:unit"
4142
},
4243
"dependencies": {
4344
"type-fest": "^4.41.0",

0 commit comments

Comments
 (0)