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>
111 lines
3.7 KiB
JSON
111 lines
3.7 KiB
JSON
{
|
|
"name": "library",
|
|
"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 3004",
|
|
"build:content": "velite build --strict",
|
|
"build:registry": "rimraf -G public/r/* && tsx ./scripts/build-registry.mts && shadcn build public/r/registry.json && tsx scripts/clean-registry.ts",
|
|
"build:markdown": "maybe-turbo tsx ./scripts/build-markdown.ts",
|
|
"build:markdown-index": "tsx ./scripts/build-markdown-index.ts",
|
|
"build": "maybe-turbo next build --turbopack",
|
|
"test": "maybe-turbo vitest",
|
|
"test:headless-tools": "tsx scripts/test-headless-tools.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",
|
|
"typecheck": "maybe-turbo \"next typegen && tsc --noEmit -p tsconfig.json\""
|
|
},
|
|
"dependencies": {
|
|
"@hookform/resolvers": "^3.1.1",
|
|
"@monaco-editor/react": "catalog:",
|
|
"@supabase-labs/y-supabase": "0.1.0",
|
|
"@supabase/postgrest-js": "catalog:",
|
|
"@supabase/vue-blocks": "workspace:*",
|
|
"@tanstack/react-query": "~5.83.0",
|
|
"@xyflow/react": "^12.10.1",
|
|
"api-types": "workspace:*",
|
|
"axios": "^1.20.0",
|
|
"class-variance-authority": "^0.7.1",
|
|
"cmdk": "^1.1.1",
|
|
"common": "workspace:*",
|
|
"common-tags": "^1.8.2",
|
|
"eslint-config-supabase": "workspace:*",
|
|
"icons": "workspace:*",
|
|
"jotai": "^2.8.0",
|
|
"lucide-react": "catalog:",
|
|
"monaco-editor": "catalog:",
|
|
"motion": "catalog:",
|
|
"next": "catalog:",
|
|
"next-themes": "catalog:",
|
|
"openai": "^5.9.0",
|
|
"openapi-fetch": "0.12.4",
|
|
"radix-ui": "catalog:",
|
|
"react": "catalog:",
|
|
"react-dom": "catalog:",
|
|
"react-hook-form": "^7.71.2",
|
|
"react-markdown": "^10.1.0",
|
|
"react-wrap-balancer": "^1.1.0",
|
|
"recharts": "catalog:",
|
|
"rehype-autolink-headings": "^7.1.0",
|
|
"rehype-pretty-code": "catalog:",
|
|
"rehype-slug": "^6.0.0",
|
|
"remark-code-import": "^1.2.0",
|
|
"remark-gfm": "^4.0.0",
|
|
"sonner": "^2.0.8",
|
|
"ui": "workspace:*",
|
|
"ui-patterns": "workspace:*",
|
|
"unist-util-visit": "^5.0.0",
|
|
"vaul": "^1.1.2",
|
|
"velite": "catalog:",
|
|
"y-monaco": "^0.1.6",
|
|
"y-protocols": "^1.0.7",
|
|
"yjs": "^13.6.29",
|
|
"zod": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "*",
|
|
"@react-router/dev": "^7.17.1",
|
|
"@react-router/fs-routes": "^7.18.4",
|
|
"@supabase/ssr": "catalog:",
|
|
"@supabase/supabase-js": "catalog:",
|
|
"@tanstack/react-router": "catalog:",
|
|
"@tanstack/react-start": "catalog:",
|
|
"@types/common-tags": "^1.8.4",
|
|
"@types/lodash": "^4.17.16",
|
|
"@types/mdast": "^3.0.15",
|
|
"@types/node": "catalog:",
|
|
"@types/react": "catalog:",
|
|
"@types/react-dom": "catalog:",
|
|
"@typescript/native": "catalog:",
|
|
"config": "workspace:^",
|
|
"gray-matter": "^4.0.3",
|
|
"lodash": "catalog:",
|
|
"maybe-turbo": "workspace:*",
|
|
"mdast-util-from-markdown": "^1.3.1",
|
|
"mdast-util-gfm": "^2.0.2",
|
|
"mdast-util-mdx": "^2.0.1",
|
|
"mdast-util-mdx-jsx": "^2.1.4",
|
|
"mdast-util-to-markdown": "^1.5.0",
|
|
"micromark-extension-gfm": "^2.0.3",
|
|
"micromark-extension-mdxjs": "^1.0.1",
|
|
"npm-run-all": "^4.1.5",
|
|
"postcss": "catalog:",
|
|
"react-dropzone": "^14.3.8",
|
|
"react-router": "^7.13.2",
|
|
"rimraf": "^4.1.3",
|
|
"shadcn": "^4.0.0",
|
|
"shiki": "catalog:",
|
|
"tailwindcss": "catalog:",
|
|
"tsconfig": "workspace:*",
|
|
"tsx": "catalog:",
|
|
"typescript": "catalog:",
|
|
"vite": "catalog:",
|
|
"vitest": "catalog:"
|
|
}
|
|
}
|