mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Problem `ui-library`, `design-system`, `learn`, `kb`, `www` and `studio` still order their build, dev and typecheck steps with pnpm `pre`/`post` hooks, `&&` chains and `run-p`. Turbo can't see those steps, so it can't cache or parallelize them. Follow-up to #52556, which migrated `apps/docs`. Part of [FE-4977](https://linear.app/supabase/issue/FE-4977/migrate-remaining-apps-pnpm-scripts-to-turbo-tasks). ## Solution The ordering now lives in each app's `turbo.jsonc` as `dependsOn`, the hooks and chains are gone, and scripts with same-package prerequisites are wrapped with `maybe-turbo`. `node .agents/skills/turbo-scripts/scripts/audit.mjs apps/<name>` reports no findings for any of the six apps. - **`ui-library`, `design-system`, `learn`:** content, registry and markdown steps are turbo tasks with declared outputs. `dev:content` uses the `with` key. `build:next` and `dev:next` are folded into `build` and `dev`. `ui-library`'s markdown task now depends on `build:registry`, which the old chain hid. `pnpm --filter library build:registry` still regenerates the committed registry output. - **`kb`:** `fetch:federated-content` is uncached, and the tasks that read its output use `jit` inputs. - **`www`:** - `build` depends on `docs#build:guides-markdown`, so federated content is fetched once instead of twice. - `build:next` is folded into `build`. - `typecheck` runs `next typegen` itself. - `turbo-build.test.ts` is updated for the new task graph. It reads `PATH` through a copy of the env, because `turbo/no-undeclared-env-vars` flags it once the `passThroughEnv: ["*"]` wildcard is gone. - `passThroughEnv: ["*"]` is gone, and the env vars the content scripts read are declared. - **`studio`:** `typecheck` runs `next typegen` inline, and `lint` depends on a new `lint:type-checks` task. The `predev` turbopack cache clean moved into `scripts/dispatch.js`. It's a local side effect, and making it a turbo task would route `dev` through turbo's strict env filtering, which drops `NODE_ENV`, `MODE` and `STUDIO_FRAMEWORK`. ## Review instructions - For each app, check that a second `pnpm build` hits the cache. `www`'s fetch and content tasks re-run by design, since they're uncached. - Not verified: the `www` and `studio` dev servers started from the repo root, a Studio production build, the e2e flow, and runs with real production credentials. - `kb`'s build reads a remote database that turbo can't hash. It stays cached, keyed on `SUPABASE_URL`. Say if you'd rather make it uncached. - Builds rewrite two tracked files, `apps/docs/public/markdown/manifest.json` and `apps/www/public/customers-rss.xml`, so a fresh checkout can miss the cache once. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
53 lines
1.6 KiB
JSON
53 lines
1.6 KiB
JSON
{
|
|
"name": "learn",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"preinstall": "npx only-allow pnpm",
|
|
"dev:content": "maybe-turbo velite dev",
|
|
"dev": "maybe-turbo next dev --port 3007",
|
|
"build": "maybe-turbo next build --turbopack",
|
|
"build:content": "velite build --strict",
|
|
"internal:sync": "tsx ./scripts/sync-internal-content.mts",
|
|
"start": "next start",
|
|
"lint": "eslint .",
|
|
"lint:ratchet": "tsx node_modules/eslint-config-supabase/ratchet-eslint-rules.ts --rules-file node_modules/eslint-config-supabase/ratchet-rules.json",
|
|
"clean": "rimraf .next .turbo tsconfig.tsbuildinfo .contentlayer .velite tsconfig.tsbuildinfo",
|
|
"typecheck": "maybe-turbo tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"common": "workspace:*",
|
|
"jotai": "^2.8.0",
|
|
"lucide-react": "catalog:",
|
|
"motion": "catalog:",
|
|
"next": "catalog:",
|
|
"next-themes": "catalog:",
|
|
"react": "catalog:",
|
|
"react-dom": "catalog:",
|
|
"react-wrap-balancer": "^1.1.0",
|
|
"rehype-autolink-headings": "^7.1.0",
|
|
"rehype-pretty-code": "catalog:",
|
|
"rehype-slug": "^6.0.0",
|
|
"remark": "^14.0.3",
|
|
"remark-code-import": "^1.2.0",
|
|
"remark-gfm": "^4.0.0",
|
|
"ui": "workspace:*",
|
|
"ui-patterns": "workspace:*",
|
|
"unist-util-visit": "^5.0.0",
|
|
"velite": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@types/react": "catalog:",
|
|
"config": "workspace:^",
|
|
"eslint-config-supabase": "workspace:*",
|
|
"maybe-turbo": "workspace:*",
|
|
"mdast-util-toc": "^6.1.1",
|
|
"npm-run-all": "^4.1.5",
|
|
"shiki": "catalog:",
|
|
"tailwindcss": "catalog:",
|
|
"tsconfig": "workspace:*",
|
|
"tsx": "catalog:"
|
|
}
|
|
}
|