mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
Migrate code formatting across the monorepo from Prettier to `oxfmt`
(`0.79.0`, pinned) for much faster formatting checks locally and in CI
while keeping code churn minimal (78 files total, 0.7% of the repo).
Studio's `@ianvs/prettier-plugin-sort-imports` ordering
(`<BUILTIN_MODULES>`, `<THIRD_PARTY_MODULES>`, blank line, then `@/` and
relative imports) is preserved via `oxfmt`'s native `sortImports`
override for `apps/studio/**/*.{js,jsx,ts,tsx}`.
### Performance (before vs after, uncached)
| Benchmark | Prettier (`3.8.x`) | oxfmt (`0.79.0`) | Speedup |
| --- | ---: | ---: | ---: |
| CI formatting step (`blacksmith-4vcpu-ubuntu-2404`, full repo) | `73s`
| **`7s`** | **~10×** |
| Local `apps/studio` JS/TS (`5,157` files) | `17.74s` | **`0.36s`** |
**~49×** |
| Local full monorepo (`11,131` files) | — | **`2.39s`** | — |
**Added:**
- `.oxfmtrc.jsonc` at repo root with Prettier-matching options,
`sortPackageJson: false`, the Studio `sortImports` override, and ignore
patterns migrated from `.prettierignore`
- `oxfmt` (`0.79.0` exact pin) in `pnpm-workspace.yaml` catalog and
workspace `devDependencies` / `dependencies`
- Shared `.agents/scripts/format_and_lint.sh` hook script and
`.agents/hooks.json` (used by both Claude Code and Antigravity)
**Changed:**
- Replaced `test:prettier` with `format:check` and switched `format` in
root `package.json` to `oxfmt`
- Updated `packages/api-types` (`codegen`,
`verify-production-types.mjs`), `apps/design-system` (`build:registry`),
`apps/docs` (`CodeSample.ts`, `generate-sitemap.ts`, `next.config.mjs`,
`spec/Makefile`), `apps/www` (`generate-sitemap.mjs`), and
`packages/build-icons` (`generateIconFiles.mjs`) from Prettier to
`oxfmt`
- Updated `.github/workflows/prettier.yml` (keeping the `format` job ID
intact), `.github/workflows/autofix_linters.yml`,
`.claude/settings.json`, `AGENTS.md`, `CONTRIBUTING.md`, and
`.github/copilot-instructions.md`
- Applied one-time `oxfmt` formatting pass in a separate commit (78
files: 30 `i18n/README.*.md` trailing spaces, 19 Studio files, 17 other
TS/TSX/generated types, 8 MD/MDX, 3 `package.json`, 2 example CSS files)
**Removed:**
- `prettier`, `@ianvs/prettier-plugin-sort-imports`, and
`prettier-plugin-sql-cst` from `devDependencies` (note: `.sql` files
were not part of the CI formatting glob; `eslint-config-prettier` is
kept for ESLint)
- `prettier.config.mjs`, `.prettierignore`, and
`.claude/scripts/format_and_lint.sh`
## To test
- Run `pnpm run format:check` and confirm it passes cleanly across all
matched files
- Run `pnpm --filter api-types test`, `pnpm --filter docs exec vitest
run features/directives/CodeSample.test.ts`, and `pnpm --filter www exec
vitest run generate-sitemap.test.ts`
- Edit an `apps/studio` file with out-of-order imports and run `pnpm run
format` to confirm builtin/third-party vs `@/`/relative grouping matches
prior behavior
- Check that the `Check Code Formatting` CI workflow passes on this PR
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
Supabase
Supabase是一個開源的 Firebase 替代品。我們正在使用企業級的開源工具構建 Firebase 的功能。
文檔
有關完整的文檔,請訪問supabase.com/docs
要了解如何貢獻,請訪問入門
社群與支持
- 社群論壇。最適合:幫助構建,討論資料庫的數佳實踐。
- GitHub 問题。最適合:你在使用 Supabase 时遇到的 bug 和错误。
- 電子郵件支持。最適合:你的資料庫或數據基礎設施的問題。
- Discord。最適合:分享你的應用程式並與社群一起玩耍。
狀態
- Alpha:我們正在與一组封閉的客户測試 Supabase。
- 公開 Alpha:任何人都可以在supabase.com/dashboard上註冊。但請對我們寬容一些,有一些小問題。
- 公開測試版:足夠穩定,適合大多數非企業使用的情况。
- 公開:普遍可用 狀態
我們目前正處於公開測試階段。請關注此軟體的 "發布",以獲得重大更新的通知。
它是如何運作的
Supabase 是一個開源工具的组合。我們正在使用企業級的開源產品來構建 Firebase 的功能。如果這些工具和社群存在,並且有 MIT、Apache 2 或同等的開放許可,我們將使用並支持該工具。如果該工具不存在,我們就自己建立並開放原始碼。Supabase 不是 Firebase 的 1 對 1 映射。我們的目標是使用開源工具為開發者提供類似 Firebase 的開發者體驗。
架構
Supabase 是一個托管平台。你可以註冊並開始使用 Supabase,無需安裝任何東西。 你也可以自行托管和本地開發。
- PostgreSQL是一個物件關係型資料庫系統,經過 30 多年的積極開發,它在可靠性、功能穩健性和性能方面赢得了良好的聲譽。
- Realtime是一個 Elixir 服務器,允許你使用 websockets 監聽 PostgreSQL 的插入、更新和刪除。Realtime 對 Postgres 内置的複製功能進行投票,以了解資料庫的數位化,將變化轉换為 JSON,然后通過 websockets 將 JSON 廣播邊授權客户。
- PostgREST是一個網路服務器,它把你的 PostgreSQL 資料庫直接變成一個 RESTful API。
- pg_graphql是一個 PostgreSQL 邊擴展,暴露了一個 GraphQL API。
- Storage 提供了一個 RESTful 接口來管理存儲在 S3 中的文件,使用 Postgres 來管理權限。
- postgres-meta 是一個用於管理你的 Postgres 的 RESTful API,允許你獲取表、添加角色和運行查詢等。
- GoTrue 是一個基於 SWT 的 API,用於管理用户和發行 SWT 令牌。
- Kong是一個雲原生 API 網關。
客户端庫
我們對客户端庫的做法是模塊化的。每一個子庫都是一個獨立的實現,用於單一的外部系统。這是我們支持現有工具的方法之一。
| 語言 | 客户端 | 特徵-客户端(捆绑在Supabase客户端中) | ||||
|---|---|---|---|---|---|---|
| Supabase | PostgREST | GoTrue | Realtime | Storage | Functions | |
| ⚡️ 官方⚡️ | ||||||
| JavaScript (TypeScript) | supabase-js | postgrest-js | auth-js | realtime-js | storage-js | functions-js |
| Flutter | supabase-flutter | postgrest-dart | gotrue-dart | realtime-dart | storage-dart | functions-dart |
| 💚社群 💚 | ||||||
| C# | supabase-csharp | postgrest-csharp | gotrue-csharp | realtime-csharp | storage-csharp | functions-csharp |
| Go | - | postgrest-go | gotrue-go | - | storage-go | functions-go |
| Java | - | - | gotrue-java | - | storage-java | - |
| Kotlin | supabase-kt | postgrest-kt | gotrue-kt | realtime-kt | storage-kt | functions-kt |
| Python | supabase-py | postgrest-py | gotrue-py | realtime-py | storage-py | functions-py |
| Ruby | supabase-rb | postgrest-rb | - | - | - | - |
| Rust | - | postgrest-rs | - | - | - | - |
| Swift | supabase-swift | postgrest-swift | gotrue-swift | realtime-swift | storage-swift | functions-swift |
| Godot Engine (GDScript) | supabase-gdscript | postgrest-gdscript | gotrue-gdscript | realtime-gdscript | storage-gdscript | functions-gdscript |
翻譯
- 阿拉伯語| العربية
- Albanian / Shqip
- Bangla / বাংল
- Bulgarian / Български
- Catalan / Català
- Danish / Dansk
- 荷蘭語 / Nederlands
- 英語
- 芬蘭語/Suomalainen
- 法語/Français
- 德語/Deutsch
- 希臘語 / Ελληνικά
- Hebrew / עברית
- Hindi / हिंद
- 匈牙利語/馬扎爾語
- 尼泊爾語 / नेपाली
- 印尼語/印度尼西亞語
- 意大利語/Italiano
- 日語 / 日本語
- 韓語 / 한국어
- Malay / Bahasa Malaysia
- Norwegian (Bokmål) / Norsk (Bokmål)
- Persian / فارسی
- Polish / Polski
- 葡萄牙語 / Português
- 葡萄牙語(巴西)/Português Brasileiro
- Romanian / Română
- 俄語 / Pусский
- 塞爾維亞語 / Srpski
- Sinhala / සිංහල
- 西班牙語 / Español
- Simplified Chinese / 簡體中文
- 瑞典語 / Svenska
- 泰文 / ไทย
- Traditional Chinese / 繁體中文
- 土耳其語 / Türkçe
- 烏克蘭語 / Українська
- 越南語/Tiếng Việt
- 翻譯列表




