Files
supabase/apps/docs/spec
Ivan VasilovandClaude Opus 5.5 11a71d795a chore(docs): replace pnpm lifecycle hooks with turbo task dependencies (#52556)
## Problem

`apps/docs` ordered its build, dev and codegen steps with pnpm
`pre`/`post` hooks and `&&` chains. Turbo couldn't see those steps, so
it couldn't cache or parallelize them, and running the build through
turbo ran the codegen twice. Part of
[FE-4948](https://linear.app/supabase/issue/FE-4948/migrate-the-pnpm-scripts-to-use-turbo).

## Solution

The ordering now lives in `apps/docs/turbo.jsonc` as `dependsOn`, and
every pre/post hook is gone. The new `maybe-turbo` workspace bin runs a
script through `turbo run` unless it's already inside turbo, so `pnpm
build`, `pnpm dev`, `pnpm codegen:references` and the other entry points
keep running their prerequisites.

Turbo is bumped to 2.11.10 for its `jit` input mode. Tasks downstream of
the uncached remote fetches use it to hash the gitignored files those
fetches write after they finish, so a cache hit can't restore output
built from older content. Strict-mode env vars are declared.

Other changes:
- The R2 upload moves from `postbuild` to the `vercel.json` build
command, so it still runs when the build is a cache hit.
- `codegen:references:new:ensure` re-downloads when any JavaScript
TypeDoc dump is missing or empty.
- The guides manifest is now sorted, so its output is deterministic.
- A new `turbo-scripts` agent skill (listed in `AGENTS.md`) documents
these conventions for every app. Its audit script, `node
.agents/skills/turbo-scripts/scripts/audit.mjs apps/<name>`, flags
scripts that need `maybe-turbo`, leftover `pre`/`post` hooks, script
chains, and wrapped scripts without a turbo task.

## Review instructions

1. Read `packages/maybe-turbo/README.md`, `apps/docs/turbo.jsonc` and
`.agents/skills/turbo-scripts/SKILL.md`.
2. From `apps/docs`, set `GH_TOKEN=$(gh auth token)` for the federated
fetch and run `pnpm run build:markdown` a few times. Once warm, every
task except `build:federated-content` and
`codegen:references:new:ensure` should hit the cache.
3. Run `pnpm build` from `apps/docs` and check that the docs Vercel
preview deploys and renders normally.

## Checklist

Check all before review:

- [ ] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-09 16:33:28 +01:00
..
2024-09-17 10:46:12 +02:00

Supabase Specs

These spec files are used to generate the reference documentation.

Preparation

To get started, run make init. This installs all dependencies.

Usage


make                # download and transform specs into docs