Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "cross-env SKIP_ENV_VALIDATION=1 yarn workspaces foreach --all --topological run build",
"test": "yarn workspaces foreach --all --topological run test",
"lint": "yarn workspaces foreach --all --topological run lint",
"typecheck": "yarn workspaces foreach --all --topological run typecheck",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query language omitted from typecheck

Medium Severity

Root typecheck uses workspaces foreach --all, but @sourcebot/query-language has no typecheck script (unlike five other packages). yarn typecheck can succeed without running tsc on that workspace, even though @sourcebot/web imports it for search parsing.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3fcb450. Configure here.

"dev": "concurrently --kill-others --names \"zoekt,worker,web,schemas\" 'yarn dev:zoekt' 'yarn dev:backend' 'yarn dev:web' 'yarn watch:schemas'",
"with-env": "cross-env PATH=\"$PWD/bin:$PATH\" dotenv -e .env.development -c --",
"dev:zoekt": "yarn with-env zoekt-webserver -index .sourcebot/index -rpc",
Expand Down
1 change: 1 addition & 0 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"dev:watch": "tsc-watch --preserveWatchOutput --onSuccess \"yarn dev\"",
"dev": "node ./dist/index.js",
"build": "tsc",
"typecheck": "tsc --noEmit",
"test": "cross-env SKIP_ENV_VALIDATION=1 vitest --config ./vitest.config.ts"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"scripts": {
"build": "yarn prisma:generate && tsc",
"typecheck": "tsc --noEmit",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Db typecheck skips Prisma generate

Medium Severity

The new typecheck scripts in packages/db and packages/schemas skip their respective code generation steps (Prisma client, JSON schema to TS) that build includes. This can lead to typecheck passing against stale generated types, missing actual type errors or schema drift.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3fcb450. Configure here.

"postinstall": "yarn build",
"prisma:generate": "prisma generate",
"prisma:generate:watch": "prisma generate --watch",
Expand Down
1 change: 1 addition & 0 deletions packages/schemas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"scripts": {
"build": "yarn generate && tsc",
"typecheck": "tsc --noEmit",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schemas typecheck skips generate

Medium Severity

The new typecheck script runs only tsc --noEmit, while build runs yarn generate first. Edits to JSON schemas under schemas/ without re-running generate can leave committed src types stale, so yarn typecheck may pass while build would compile updated generated files and fail.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3fcb450. Configure here.

"generate": "tsx tools/generate.ts",
"watch": "nodemon --watch ../../schemas -e json -x 'yarn build'",
"postinstall": "yarn build"
Expand Down
1 change: 1 addition & 0 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"scripts": {
"build": "tsc",
"typecheck": "tsc --noEmit",
"build:watch": "tsc-watch --preserveWatchOutput",
"postinstall": "yarn build",
"test": "vitest --config ./vitest.config.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "cross-env SKIP_ENV_VALIDATION=1 next build",
"start": "next start",
"lint": "cross-env SKIP_ENV_VALIDATION=1 eslint .",
"typecheck": "tsc --noEmit",
"test": "cross-env SKIP_ENV_VALIDATION=1 vitest",
"openapi:generate": "tsx tools/generateOpenApi.ts",
"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",
Expand Down