mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
bot/decrease-eslint-ratchet-baselines
9
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2ac3b77594 |
chore: replace pnpm hooks and chains with turbo task dependencies in the remaining apps (#53169)
## 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> |
||
|
|
27af9ca162 |
chore(www): run production builds through Turbo (#50713)
www builds currently bypass Turbo. This caches Next.js compilation and sitemap generation while keeping content refreshes and asset uploads on every build, including cache hits. **Changed:** - Refresh content before Turbo hashes its inputs, and upload assets after Turbo saves or restores the build output. - Include generated content, shared code, environment settings, sitemaps, and the customer RSS feed in the cache configuration. - Remove the redundant `vercel.json` build override and consolidate public environment settings into `NEXT_PUBLIC_*`. Cache reuse requires the same commit and build inputs because production CDN URLs include the commit SHA. **Added:** - Build lifecycle tests covering cache restoration, input invalidation, root/app commands, and upload ordering and failure handling. ## To test - From `apps/www`, run `pnpm exec vitest run turbo-build.test.ts generate-sitemap.test.ts scripts/lib/githubStars.test.ts`. - Check the Vercel preview build runs content preparation before `build:next`, and verify the homepage, `/sitemap.xml`, and `/customers-rss.xml` load. - Rebuild with identical prepared content and environment settings to check compilation is cached. Asset uploads should still run when enabled. Validation: 63 tests passed, along with typecheck, ESLint for the new test, formatting, and a full local build. The local build used public example settings and placeholder survey configuration, with asset uploads disabled; Vercel deployment validation is still pending. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Build & Deployment** - Production builds now reuse cached outputs and restore generated assets when a cache is available. - Static assets upload after a successful build, and changes to content, documentation, configuration, or shared components trigger a fresh build. - **Documentation** - Added production build guidance covering caching, CDN uploads, overrides, and direct-build limitations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
dc0cc42d14 |
chore(www): stop tracking auto-generated rss.xml (#45745)
## Summary `apps/www/public/rss.xml` is committed to the repo AND rewritten on every `pnpm dev`, `pnpm build`, and `pnpm typecheck` run via `content:build` -> `apps/www/scripts/generateStaticContent.mjs`. Anyone working in `apps/www` (or running `pnpm typecheck` from the monorepo root) sees a phantom `M apps/www/public/rss.xml` in `git status` every session. Easy to accidentally commit, otherwise has to be repeatedly stashed. The sibling `changelog-rss.xml` (written by the same script) is already gitignored. This aligns the main blog rss with the same treatment. ## Changes - Add `/public/rss.xml` to `apps/www/.gitignore` (alongside the existing changelog-rss entries; renamed the section header from "Changelog generated feeds" to "Generated feeds" to reflect what it now covers). - `git rm --cached apps/www/public/rss.xml` so git stops tracking the file. The on-disk copy is preserved for local dev. ## Testing No behavior change — the file is still generated by `content:build` and served from `public/` at build time. - [x] `git check-ignore -v apps/www/public/rss.xml` resolves to `apps/www/.gitignore:36` - [x] `apps/www/public/rss.xml` still on disk after `git rm --cached` - [ ] On a fresh clone + `pnpm install + pnpm --filter www build`, the file regenerates and is served at `/rss.xml` on the resulting build (Vercel preview will confirm via deploy). ## Linear - fixes GROWTH-836 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated repository configuration to properly manage auto-generated files. [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45745) <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
580598f0e8 |
feat(www): update changelog layout, rss and md files (#45219)
- Update Changelog [index page layout](https://zone-www-dot-com-git-feat-changelog-update-supabase.vercel.app/changelog): - with full timeline - filterable based on text search and tags - New Changelog [detail pages](https://zone-www-dot-com-git-feat-changelog-update-supabase.vercel.app/changelog/45071) - all added to www_sitemap - Changelog [RSS Feed](https://zone-www-dot-com-git-feat-changelog-update-supabase.vercel.app/changelog/45071) + llm-friendly [/changelog.md](https://zone-www-dot-com-git-feat-changelog-update-supabase.vercel.app/changelog.md) - and llm-friendly changelog detail md files: https://zone-www-dot-com-git-feat-changelog-update-supabase.vercel.app/changelog/45071.md ## Before <img width="1604" height="1094" alt="Screenshot 2026-04-27 at 17 07 55" src="https://github.com/user-attachments/assets/eac52f14-e447-4f64-8d50-a8e287ccf989" /> ## After <img width="1247" height="849" alt="changelog-index" src="https://github.com/user-attachments/assets/69b7bae1-63eb-4a4d-a065-7541ed9738b4" /> ### Detail page <img width="1695" height="1101" alt="Screenshot 2026-04-27 at 18 27 27" src="https://github.com/user-attachments/assets/accd4be8-d665-43ed-bcb7-0e6baf537762" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Redesigned changelog page with full-text search and product tag filtering * Individual pages for each changelog entry with dedicated URLs * Added RSS feeds for changelog updates and product-specific feeds * Copy changelog entries as markdown with one click * Direct sharing integration with ChatGPT and Claude <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> |
||
|
|
99447cdcbe |
chore: gitignore stale committed sitemap_www.xml and ui-library llms.txt (#45289)
## Why Two auto-generated files have been tracked in git but the committed copies are stale because every Vercel deploy overrides them in the build artifact. Both have misled at least one investigation into thinking production was out of date. | File | Generator | Live (prod) | Committed (master) | |---|---|---|---| | `apps/www/public/sitemap_www.xml` | `pnpm postbuild` -> `internals/generate-sitemap.mjs` | 704 URLs, `last-modified` matches latest deploy | 604 URLs, last touched 2025-09-30 (`cb66b6b6`) | | `apps/ui-library/public/llms.txt` | `pnpm build:llms` -> `scripts/build-llms-txt.ts` (wired into `build`) | 57 entries, `Last updated: 2026-04-27` | 56 entries, `Last updated: 2026-02-20` (last touched 2026-03-17, `9bf981f3`) | Production has been correct the whole time. The git copies just look authoritative when they aren't, and they show up in audits and code searches as if they were the live data. The same gitignore pattern is already applied to `apps/www/public/sitemap.xml` at `apps/www/.gitignore:29` — this PR extends the pattern to two more files that should never have been committed. Discovered while investigating AI-bot crawl optimization for `supabase.com/llms-full.txt`. An audit initially flagged "sitemap is stale, missing 44 blog posts" — that turned out to be entirely about reading the dead git file. Same kind of false signal would happen for anyone inspecting the ui-library llms.txt locally. ## What changes **`apps/www`:** - Add `public/sitemap_www.xml` to `apps/www/.gitignore`. - `git rm --cached apps/www/public/sitemap_www.xml`. - Updated the gitignore comment to mention the regeneration path. **`apps/ui-library`:** - Add `public/llms.txt` to `apps/ui-library/.gitignore` (with a comment pointing at the generator). - `git rm --cached apps/ui-library/public/llms.txt`. Both files remain on disk locally; their respective build steps regenerate them as before. ## What does NOT change - Production behavior for either file: postbuild / build:llms remain authoritative. - Generator code: `apps/www/internals/generate-sitemap.mjs` and `apps/ui-library/scripts/build-llms-txt.ts` are untouched. - robots.txt, sitemap index, docs sitemap: unchanged. - `apps/learn/public/llms.txt`: left tracked. Its generator (`apps/learn/scripts/build-llms-txt.ts`) is **not** wired into the `build` script, so it's manually generated and committed — different pattern, leave alone. ## Test plan - [ ] After merge, trigger or wait for next prod deploy. Confirm `https://supabase.com/sitemap_www.xml` still serves a fresh ~700-URL response with current `last-modified` header. - [ ] Confirm `https://supabase.com/ui/llms.txt` still serves a fresh response with `Last updated:` matching the deploy date. - [ ] Confirm `git ls-files apps/www/public/ apps/ui-library/public/` no longer lists either file. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Improved handling of auto-generated sitemap files so they are no longer tracked in the repo after builds. * **Documentation** * Removed the published auto-generated LLMs reference page from the UI library to avoid shipping stale documentation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d409836ca7 |
feat(www,docs): serve marketing pages as .md, advertise via link rel=alternate (#45277)
## Summary Adds `/<page>.md` routes for 10 marketing/product pages (homepage, auth, database, edge-functions, realtime, storage, vector, pricing, modules/cron, modules/queues) so AI agents can fetch clean markdown instead of parsing JS-rendered HTML. Also advertises the markdown alternate via `<link rel="alternate" type="text/markdown">` on marketing and docs pages so agents can discover it. Pricing is generated dynamically via `generatePricingContent()` (single source of truth with `/llms.txt` and `/llms-full.txt`); the other nine slugs are bundled at build time from `content/md/*.md` into a `MD_CONTENT` map. Supersedes #44891 (rebased fresh off current master to avoid a 9-commit replay over rename/rename conflicts created by #44897). ## Changes - New `/api-v2/md/[...slug]` route handler returns the bundled markdown (or dynamic pricing) with `Content-Type: text/markdown`, `X-Content-Type-Options: nosniff`, and appropriate cache headers - Middleware rewrites `/<slug>.md` and `Accept: text/markdown` to the API route for the `MD_PAGES` allowlist; trailing-slash variants (`/auth/`) are normalized so they resolve the same as `/auth` - Build-time codegen `scripts/generateMdContent.mjs` scans `content/md/` and emits `app/api-v2/md/content.generated.ts` exporting both `MD_CONTENT` (Map) and `MD_PAGES` (Set, incl. dynamic `pricing`). Fails the build on slug collision between `content/md/` and `DYNAMIC_SLUGS`. Adding a new marketing `.md` is just dropping a file in `content/md/` (also update `PRODUCT_OVERVIEW_LINKS` in `/llms.txt` since that list is editorial). - 8 permanent redirects `/llms/<product>.txt` → `/<product>.md` so legacy URLs in caches and downstream `llms.txt` copies keep working - `/llms.txt` product overview now references `.md` URLs (incl. `modules/cron`, `modules/queues`); `/llms-full.txt` iterates `MD_CONTENT.values()` (homepage first, then alphabetical) and appends dynamic pricing - `/llms/[slug]` route slimmed to proxy SDK reference files (`js.txt`, `dart.txt`, etc.) since redirects handle product slugs and pricing; pricing branch retained as fallback in case redirects are bypassed - `apps/www/pages/_app.tsx` injects the alternate link conditionally based on `MD_PAGES`; `/pricing` (app router) sets it via page metadata - `apps/docs/app/page.tsx` (the `/docs` root) sets the text/markdown alternate to `/llms-full.txt`; per-guide pages override with their specific `.md` URL via `genGuideMeta` in `GuidesMdx.utils.tsx`. Other docs pages (reference, troubleshooting) inherit nothing. - `apps/www/.vercelignore`: replaces the prior `*.md`/`README.md` rules with `*.md` + `!content/md/**/*.md` so Edge Function READMEs and future scratch `.md` files aren't silently shipped to the build artifact - Drops `apps/www/data/llms/*.txt` and the related `outputFileTracingIncludes` - Test coverage for the new middleware branches: `.md` suffix rewrite (allowlisted vs. fall-through), `Accept: text/markdown` content negotiation, trailing-slash normalization ## Testing (Vercel preview) Local dev server smoke tests passing on `:3771` after each iteration. Re-verified on the preview URL after the latest hardening commit: - [x] `curl -I https://<preview>/llms/auth.txt` — expect `308 Permanent Redirect` to `/auth.md` - [x] `curl https://<preview>/auth.md | head -3` — expect `# Supabase Auth` - [x] `curl https://<preview>/pricing.md | head -3` — expect `# Supabase Pricing` with current tier values - [x] `curl https://<preview>/modules/cron.md | head -3` — expect `# Supabase Cron` - [x] `curl -H 'Accept: text/markdown' https://<preview>/ | head -3` — expect `# Supabase` (homepage.md) - [x] `curl https://<preview>/llms.txt` — Product Overview section lists `.md` URLs and includes Cron + Queues - [x] `curl https://<preview>/llms-full.txt | grep -E '^# Supabase (Cron\|Queues\|Pricing)'` — Cron and Pricing each match once; Queues matches twice (marketing module + existing docs guide) - [x] View source on `/`, `/pricing`, `/database` — expect `<link rel="alternate" type="text/markdown" href="/<slug>.md">` - [x] View source on `/docs` — expect `<link rel="alternate" type="text/markdown" href="/llms-full.txt">` - [x] View source on a docs guide page (e.g., `/docs/guides/auth`) — expect per-guide `.md` alternate; reference/troubleshooting pages should NOT emit a markdown alternate - [x] `curl -I https://<preview>/auth.md` — expect `X-Content-Type-Options: nosniff` - [x] `curl -I -L -H 'Accept: text/markdown' https://<preview>/auth/` — should resolve to markdown content (trailing-slash normalization, with Vercel's auto-redirect) ## Linear - fixes GROWTH-760 ## Follow-up (separate PR) GROWTH-760 also asks about extending `.md` to blog/customers/events. Different mechanism (path-prefix middleware, MDX read at request time via `gray-matter`) so it deserves its own review. Will open a follow-up PR after this lands. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Serve prebuilt and dynamic Markdown docs via new markdown endpoints and routing; pages now advertise markdown alternates (including pricing). * Added Cron and Queues module documentation pages. * **Documentation** * Minor formatting tweaks to Realtime and Storage docs. * **Chores** * Added build-time Markdown content generation and adjusted ignore/deploy rules for generated files. * Added redirects from legacy text-based product URLs to new markdown pages. * **Tests** * Expanded tests for markdown routing and content-negotiation behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
4d7b66888d |
new /events page (#40222)
* draft new page * nits * adding description in file events * event list * nits in grid size * filters * fetch descriptions from luma * fetching right data * upd * responsive * reponsive skeleton * more nits |
||
|
|
2feda5ee19 |
cms www blog (#38045)
* show cms blog posts in www * remove contentlayer from www * outputFileTracingExcludes * update remotePatterns * fetch cms posts server-side with revalidation * add cms env vars to turbo.json * add www env vars to turbo.json * include cms posts in www sitemap * add migration to remove image from cms post * update cms meta image mapping in www |
||
|
|
4bc3a231e3 |
contentlayer2 in www + dynamic latest blog posts (#26611)
* add contentlayer2 to www * remove authorURL from blog post meta * latest blog posts in Developers dropdown menu * parse blog slug in contentlayer * change next config plugins order * contentlayer build in www package.json * contentlayer2 * contentlayer2 build on typecheck in www * remove comment * Update package-lock.json * revert npm package version * Update package-lock.json --------- Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com> |