Repository navigation
Expand file tree
/
Copy pathturbo.json
More file actions
71 lines (71 loc) · 3.43 KB
/
Copy pathturbo.json
File metadata and controls
71 lines (71 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
"$schema": "https://turbo.build/schema.json",
// Only genuinely global inputs belong here: globalDependencies invalidates EVERY task in
// EVERY package, so a file listed here busts build and test caches too. tsconfig.json
// qualifies — everything builds and typechecks against it. The ESLint config does not,
// and lives on the lint task's `inputs` instead; it cannot change a build or test result,
// which is the same reason .prettierrc and the root vitest.config.ts are absent.
"globalDependencies": ["tsconfig.json"],
// Pinned rather than relying on turbo 2's default, so the reasoning below cannot be
// invalidated by a future change to that default: in strict mode a task sees only the
// variables it declares.
"envMode": "strict",
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", "**/dist/**", ".next/**"]
},
// Scoped to the web package rather than declared on the shared `build` task.
// NEXT_PUBLIC_* only affects the Next app, and declaring it on the root task would
// hash web-only variables into every package's cache key, busting unrelated caches
// whenever one changed.
//
// These are inlined into the client bundle by `next build`, so if they are absent
// at build time Next bakes in `undefined` and no runtime configuration can recover
// them. Declaring them here also puts them in the cache key, so a changed value
// rebuilds instead of reusing a bundle built with the old one.
// MAINTENANCE: a package-scoped task REPLACES the base `build` task rather than
// merging with it, so `dependsOn` and `outputs` are duplicated here deliberately.
// An edit to `build.outputs` above will NOT reach the web package — change both.
"@copilotkit/outpost-web#build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", "**/dist/**", ".next/**"],
"env": ["NEXT_PUBLIC_*", "NODE_ENV"]
},
"dev": {
"cache": false,
"persistent": true
},
// The root ESLint config is an input to every package's lint task: editing a
// rule has to invalidate the cached result, or a stricter config reports the
// previous run's clean output. It belongs here rather than in
// globalDependencies so a config change invalidates lint alone and not build,
// test and typecheck along with it.
//
// `.prettierignore` is not listed: formatting is checked in CI against the
// changed files rather than through turbo, so no cached task depends on it.
"lint": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", "../../eslint.config.mjs", "eslint.config.mjs"]
},
"test": {
"dependsOn": ["^build"],
// Real-Postgres tests (*-db.test.ts) run only when the URL is set; strict env
// mode would otherwise strip it and they would skip silently.
// OUTPOST_REQUIRE_DB_TESTS=1 makes a missing URL fail them instead.
"env": ["OUTPOST_TEST_DATABASE_URL", "OUTPOST_REQUIRE_DB_TESTS"]
},
"typecheck": {
"dependsOn": ["^build"]
},
"db:generate": {
"cache": false
},
"db:push": {
"cache": false
},
"db:seed": {
"cache": false
}
}
}