Commit Graph
7 Commits
Author SHA1 Message Date
Alaister YoungandAlaister Young fcbdda8107 chore: migrate formatter from Prettier to oxfmt (#53835)
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>
2026-11-24 12:51:31 +08:00
supabase-vercel-tedd[bot]andIvan Vasilov c8748c7c26 chore: pin Node.js to v24 across the repository (#53287)
## Problem

`engines.node` used open-ended ranges (`>=22.23.4` at the root,
`>=22.12.0` in `apps/kb`). Vercel resolves an open-ended range to the
newest Node.js major, so it overrides the project's configured version
and warns that future majors will be picked automatically. The other
apps declared no engine at all, and `.nvmrc` (used by local dev and CI)
still pointed at Node 22.

## Solution

Pin Node.js 24 everywhere the repo declares a Node version:

- `.nvmrc`: `22.23.4` -> `24.22.3` (latest v24 LTS). CI workflows read
`node-version-file: .nvmrc`, so they follow.
- Root `package.json` and `apps/kb/package.json`: `engines.node` ->
`24.x`.
- Every other app (`design-system`, `docs`, `learn`, `lite-studio`,
`studio`, `ui-library`, `www`): add `engines.node: "24.x"`. Vercel reads
the Node.js version from `engines.node` in the project's `package.json`;
`vercel.json` has no setting for it, so this is how each Vercel project
gets an explicit version.
- `.agents/skills/test-the-docs/sandbox/Dockerfile`:
`node:22-bookworm-slim` -> `node:24-bookworm-slim`.
- `AGENTS.md`: update the stated Node requirement.

Notes:

- `engineStrict: true` is set in `pnpm-workspace.yaml`, so `pnpm
install` now requires Node 24 locally.
- `.github/workflows/self-host-tests-smoke.yml` hardcodes `node-version:
'22'` and is not changed here.
- No builds or tests were run for this change. Checked that all changed
`package.json` files parse and that Prettier passes on the changed
files.

## Review instructions

1. Open the Vercel build logs for this PR's deployments (studio, docs,
www, kb, and so on).
2. Confirm each build uses Node.js 24.x.
3. Confirm the logs no longer show the warning that the `engines` field
overrides the project's Node.js version, or the warning about automatic
upgrades to new major versions.
4. Confirm CI jobs that use `.nvmrc` set up Node 24.22.3.

## Checklist

- [x] 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)


[FE-5004](https://linear.app/supabase/issue/FE-5004/bump-the-nodejs-version-across-the-repository)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-11-13 15:30:34 +01:00
Ivan Vasilov bed5a96349 chore: Bump Typescript to v6 (#44204) 2026-03-26 15:27:35 +01:00
Ivan Vasilov a4acebe1bc chore: Expand prettier commands to also run on packages (#32550)
* Run prettier on packages too.

* Add the generated files for icons to prettierignore.

* Format all files in the packages folder.

* Minor fix.
2025-01-03 16:23:32 +01:00
Kevin Grüneberg 27f9f96ff7 chore: upgrade to node 20 (#22240) 2024-03-26 18:54:22 +07:00
Terry Sutton 981583fb63 Move theme provider to packages 2022-11-28 12:05:54 -03:30
Copple 8c4993a3be init turbo 2022-04-18 17:26:20 +02:00