Skip to content

Commit 457af43

Browse files
chore(ci): add typecheck scripts for local TypeScript verification
Adds a yarn typecheck script in the repository root and per-package typecheck scripts that run tsc --noEmit in each TypeScript workspace (web, backend, db, schemas, shared). Mirrors the existing test/lint conventions: root uses yarn workspaces foreach --all --topological, per-package scripts execute the same TypeScript compiler invocation in isolation. A new .github/workflows/typecheck.yml CI workflow is intentionally NOT added in this commit because running tsc --noEmit on the current main surfaces ~175 latent type errors in the web package (test fixtures referencing schema-drift columns added to migrations 20260702000000 and 20260702000001 but not yet declared in schema.prisma). A follow-up PR will fix the schema-drift, update test fixtures, then add the CI workflow. Mirrors CONTRIBUTING.md 'Developer tooling' / 'Bug fixes' guidance: pure additive tooling, no source code changes, no new dependencies. Refs #1437
1 parent 9371f1d commit 457af43

6 files changed

Lines changed: 6 additions & 0 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"build": "cross-env SKIP_ENV_VALIDATION=1 yarn workspaces foreach --all --topological run build",
88
"test": "yarn workspaces foreach --all --topological run test",
99
"lint": "yarn workspaces foreach --all --topological run lint",
10+
"typecheck": "yarn workspaces foreach --all --topological run typecheck",
1011
"dev": "concurrently --kill-others --names \"zoekt,worker,web,schemas\" 'yarn dev:zoekt' 'yarn dev:backend' 'yarn dev:web' 'yarn watch:schemas'",
1112
"with-env": "cross-env PATH=\"$PWD/bin:$PATH\" dotenv -e .env.development -c --",
1213
"dev:zoekt": "yarn with-env zoekt-webserver -index .sourcebot/index -rpc",

packages/backend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"dev:watch": "tsc-watch --preserveWatchOutput --onSuccess \"yarn dev\"",
99
"dev": "node ./dist/index.js",
1010
"build": "tsc",
11+
"typecheck": "tsc --noEmit",
1112
"test": "cross-env SKIP_ENV_VALIDATION=1 vitest --config ./vitest.config.ts"
1213
},
1314
"devDependencies": {

packages/db/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"private": true,
66
"scripts": {
77
"build": "yarn prisma:generate && tsc",
8+
"typecheck": "tsc --noEmit",
89
"postinstall": "yarn build",
910
"prisma:generate": "prisma generate",
1011
"prisma:generate:watch": "prisma generate --watch",

packages/schemas/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"private": true,
55
"scripts": {
66
"build": "yarn generate && tsc",
7+
"typecheck": "tsc --noEmit",
78
"generate": "tsx tools/generate.ts",
89
"watch": "nodemon --watch ../../schemas -e json -x 'yarn build'",
910
"postinstall": "yarn build"

packages/shared/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"private": true,
66
"scripts": {
77
"build": "tsc",
8+
"typecheck": "tsc --noEmit",
89
"build:watch": "tsc-watch --preserveWatchOutput",
910
"postinstall": "yarn build",
1011
"test": "vitest --config ./vitest.config.ts",

packages/web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"build": "cross-env SKIP_ENV_VALIDATION=1 next build",
88
"start": "next start",
99
"lint": "cross-env SKIP_ENV_VALIDATION=1 eslint .",
10+
"typecheck": "tsc --noEmit",
1011
"test": "cross-env SKIP_ENV_VALIDATION=1 vitest",
1112
"openapi:generate": "tsx tools/generateOpenApi.ts",
1213
"generate:protos": "proto-loader-gen-types --includeComments --longs=Number --enums=String --defaults --oneofs --grpcLib=@grpc/grpc-js --keepCase --includeDirs=../../vendor/zoekt/grpc/protos --outDir=src/proto zoekt/webserver/v1/webserver.proto zoekt/webserver/v1/query.proto",

0 commit comments

Comments
 (0)