Commit Graph
2 Commits
Author SHA1 Message Date
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
Jeremias Menichelli 611246ead5 feat: ingest sdk and reference pages to search v2 (#52458)
## Problem

Our current `search_v2` solution currently ignore reference pages, since
they are not in markdown format.

## Solution

Use the source model from _"search_v1"_ to ingest the `search_v2` table.

<!--
## Preview links

If relevant, include links to changed pages for easy review access.

Copy the preview base URL from the Vercel bot comment on this PR. Use
the following table as an example template.

| Site | Live | Preview | Search for |
| -------------- |
-------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------
| ----------------------------- |
| WWW | [/blog/your-post](https://supabase.com/blog/your-post) |
[/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post)
| unique phrase from the change |
| Docs |
[/docs/guides/your-page](https://supabase.com/docs/guides/your-page) |
[/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page)
| unique phrase from the change |
| Studio | [/dashboard](https://supabase.com/dashboard) |
[/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard)
| unique phrase from the change |
| Design system | [/design-system](https://supabase.com/design-system) |
[/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system)
| unique phrase from the change |
| UI library | [/library](https://supabase.com/library) |
[/library](https://ui-library-git-branch-name-supabase.vercel.app/library)
| unique phrase from the change |
| Knowledge base |
[/kb/guides/your-page](https://supabase.com/kb/guides/your-page) |
[/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page)
| unique phrase from the change |
-->

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## Review instructions

_Sadly, this cannot be tested until re-ingestion happens on our CI._

But here are some local tests...

<img width="666" height="278" alt="Screenshot 2026-10-28 at 16 59 45"
src="https://github.com/user-attachments/assets/9be67cb7-2598-42ce-86f7-3947e607588d"
/>

<img width="725" height="269" alt="Screenshot 2026-10-28 at 16 58 38"
src="https://github.com/user-attachments/assets/30a74c41-5a2e-48f8-8c82-24b40c80e738"
/>

---

Funny enough, with the same legacy source model, results are better
since this search ranks up the JavaScript method correctly, which our
current search doesn't.

<img width="713" height="640" alt="Screenshot 2026-10-28 at 16 56 59"
src="https://github.com/user-attachments/assets/e658ac24-7752-4e7b-baa4-b7fdca89de94"
/>

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] 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)
2026-10-29 16:02:15 +01:00