chore(build): harden turbo cache boundaries and outputs to prevent stale deployments
- Add globalDependencies: .env, .env.*, tsconfig.json - Add env array with NEXT_PUBLIC_* for build task - Expand outputs to include build/** - Add outputs for lint/typecheck/test tasks Fixes: Cache poisoning issue (stale code deployment) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
29
turbo.json
29
turbo.json
@@ -1,23 +1,42 @@
|
||||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"globalDependencies": ["**/.env.*local"],
|
||||
"globalDependencies": [
|
||||
".env",
|
||||
".env.*",
|
||||
".env.*local",
|
||||
"tsconfig.json",
|
||||
"tsconfig.*.json"
|
||||
],
|
||||
"tasks": {
|
||||
"build": {
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": ["dist/**", ".next/**", "!.next/cache/**"]
|
||||
"env": [
|
||||
"NEXT_PUBLIC_API_URL",
|
||||
"NEXT_PUBLIC_*",
|
||||
"NODE_ENV"
|
||||
],
|
||||
"outputs": [
|
||||
".next/**",
|
||||
"!.next/cache/**",
|
||||
"dist/**",
|
||||
"build/**"
|
||||
]
|
||||
},
|
||||
"dev": {
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
},
|
||||
"lint": {
|
||||
"dependsOn": ["^build"]
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": []
|
||||
},
|
||||
"typecheck": {
|
||||
"dependsOn": ["^build"]
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": []
|
||||
},
|
||||
"test": {
|
||||
"dependsOn": ["build"]
|
||||
"dependsOn": ["build"],
|
||||
"outputs": ["coverage/**"]
|
||||
},
|
||||
"clean": {
|
||||
"cache": false
|
||||
|
||||
Reference in New Issue
Block a user