From 7301322fc2134cbcd37ace7d8ba77c9ed4e37790 Mon Sep 17 00:00:00 2001 From: Anthony Shew Date: Thu, 22 Jan 2026 08:23:39 -0700 Subject: [PATCH] chore: improve Turborepo configuration - Use 'turbo run' instead of shorthand in package.json scripts - Change globalDependencies from '**/.env' to '.env' for more specific caching - Add transit task for parallel lint/typecheck with correct cache invalidation - Fix CI workflow script name (type-check:ci -> typecheck:ci) - Move runtime dependencies from root to individual packages - Remove unused dependencies (cheerio, unpdf) --- .github/workflows/check-types.yml | 2 +- apps/app/package.json | 1 + package.json | 26 +++++++------------------- turbo.json | 8 ++++++-- 4 files changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/workflows/check-types.yml b/.github/workflows/check-types.yml index a6499f1ae..7b25a8751 100644 --- a/.github/workflows/check-types.yml +++ b/.github/workflows/check-types.yml @@ -18,4 +18,4 @@ jobs: run: | echo "::remove-matcher owner=tsc::" echo "::add-matcher::.github/matchers/tsc-absolute.json" - - run: bun run type-check:ci + - run: bun run typecheck:ci diff --git a/apps/app/package.json b/apps/app/package.json index 17e4bf457..287c78231 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -65,6 +65,7 @@ "@uiw/react-json-view": "^2.0.0-alpha.40", "@uploadthing/react": "^7.3.0", "@upstash/ratelimit": "^2.0.5", + "@upstash/vector": "^1.2.2", "@vercel/analytics": "^1.5.0", "@vercel/sandbox": "^0.0.21", "@vercel/sdk": "^1.7.1", diff --git a/package.json b/package.json index 8f909a125..5e4b4a19b 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "packageManager": "bun@1.3.3", "private": true, "scripts": { - "build": "turbo build", + "build": "turbo run build", "check:env": "node scripts/check-unused-env.js", "clean": "git clean -xdf node_modules", "clean:workspaces": "turbo clean", @@ -70,33 +70,21 @@ "deps:lint": "syncpack lint", "deps:update": "syncpack update", "deps:upgrade": "syncpack update && bun install", - "dev": "turbo dev --parallel", + "dev": "turbo run dev --parallel", "db:generate": "turbo run db:generate --filter=@comp/app --filter=@comp/portal --filter=@comp/api", "docker:clean": "bun run -F @comp/db docker:clean", "docker:down": "bun run -F @comp/db docker:down", "docker:up": "bun run -F @comp/db docker:up", "format": "prettier --write .", - "lint": "turbo lint && syncpack lint", + "lint": "turbo run lint && syncpack lint", "prepare": "husky", - "test": "turbo test --parallel", + "test": "turbo run test --parallel", "test:release": "node scripts/test-release.js", - "typecheck": "turbo typecheck", - "typecheck:ci": "turbo typecheck --filter={apps/**} --filter={packages/**} --filter=!@trycompai/integrations --filter=!@trycompai/ui" + "typecheck": "turbo run typecheck", + "typecheck:ci": "turbo run typecheck --filter={apps/**} --filter={packages/**} --filter=!@trycompai/integrations --filter=!@trycompai/ui" }, "workspaces": [ "apps/*", "packages/*" - ], - "dependencies": { - "@trycompai/design-system": "^1.0.38", - "@types/cheerio": "^1.0.0", - "@types/react-syntax-highlighter": "^15.5.13", - "@upstash/vector": "^1.2.2", - "better-auth": "1.4.5", - "cheerio": "^1.1.2", - "react-syntax-highlighter": "^15.6.6", - "unpdf": "^1.4.0", - "xlsx": "^0.18.5", - "zod": "^4.2.1" - } + ] } diff --git a/turbo.json b/turbo.json index b17bbbba4..2ce922bdc 100644 --- a/turbo.json +++ b/turbo.json @@ -1,8 +1,11 @@ { "$schema": "https://turborepo.org/schema.json", - "globalDependencies": ["**/.env"], + "globalDependencies": [".env"], "ui": "tui", "tasks": { + "transit": { + "dependsOn": ["^transit"] + }, "prisma:generate": { "cache": false, "outputs": ["prisma/schema.prisma", "node_modules/.prisma/**"] @@ -17,9 +20,10 @@ "outputs": [".next/**", "!.next/cache/**", "next-env.d.ts", "dist/**"] }, "lint": { - "dependsOn": ["^lint"] + "dependsOn": ["transit"] }, "typecheck": { + "dependsOn": ["transit"], "outputs": ["node_modules/.cache/tsbuildinfo.json"] }, "dev": {