diff --git a/.agents/hooks.json b/.agents/hooks.json new file mode 100644 index 00000000000..d25b79ee37b --- /dev/null +++ b/.agents/hooks.json @@ -0,0 +1,16 @@ +{ + "format-and-lint": { + "PostToolUse": [ + { + "matcher": "edit_file|write_file|replace_file_content|multi_replace_file_content|write_to_file", + "hooks": [ + { + "type": "command", + "command": "./scripts/format_and_lint.sh", + "timeout": 30 + } + ] + } + ] + } +} diff --git a/.agents/scripts/format_and_lint.sh b/.agents/scripts/format_and_lint.sh new file mode 100755 index 00000000000..461247dc891 --- /dev/null +++ b/.agents/scripts/format_and_lint.sh @@ -0,0 +1,132 @@ +#!/bin/bash +# +# Generic PostToolUse / CLI format-and-lint script. +# Works with: +# - Claude Code PostToolUse hooks (stdin JSON: .tool_input.file_path / .tool_response.filePath) +# - Antigravity PostToolUse hooks (stdin JSON: .toolCall.args.Path / .toolCall.args.TargetFile) +# - Direct CLI invocation: .agents/scripts/format_and_lint.sh + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +DEFAULT_PROJECT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)" + +# Apps/packages that have ESLint configured. +# Add new entries here when a new workspace gets ESLint set up. +ESLINT_PACKAGES=( + "apps/design-system" + "apps/docs" + "apps/learn" + "apps/studio" + "apps/ui-library" + "apps/www" +) + +hook_mode=false +file_path="" +tool_error="" +project_dir="${CLAUDE_PROJECT_DIR:-$DEFAULT_PROJECT_DIR}" + +if [[ $# -gt 0 ]]; then + file_path="$1" +elif [[ ! -t 0 ]]; then + hook_mode=true + payload="$(cat)" + + if [[ -n "$payload" ]]; then + if command -v jq >/dev/null 2>&1; then + tool_error="$(printf '%s' "$payload" | jq -r '.error // empty' 2>/dev/null || true)" + file_path="$(printf '%s' "$payload" | jq -r ' + .tool_input.file_path + // .tool_response.filePath + // .toolCall.args.Path + // .toolCall.args.TargetFile + // .toolCall.args.path + // .toolCall.args.file_path + // empty + ' 2>/dev/null || true)" + elif command -v node >/dev/null 2>&1; then + parsed="$(printf '%s' "$payload" | node -e ' + const fs = require("fs"); + try { + const d = JSON.parse(fs.readFileSync(0, "utf8")); + const err = d.error || ""; + const fp = + d.tool_input?.file_path || + d.tool_response?.filePath || + d.toolCall?.args?.Path || + d.toolCall?.args?.TargetFile || + d.toolCall?.args?.path || + d.toolCall?.args?.file_path || + ""; + process.stdout.write(err + "\n" + fp); + } catch {} + ' 2>/dev/null || true)" + tool_error="$(printf '%s\n' "$parsed" | sed -n '1p')" + file_path="$(printf '%s\n' "$parsed" | sed -n '2p')" + fi + fi +fi + +finish() { + if [[ "$hook_mode" == true ]]; then + printf '{}\n' + fi + exit 0 +} + +# Skip if the tool call failed or no file path was provided. +if [[ -n "$tool_error" || -z "$file_path" || "$file_path" == "null" ]]; then + finish +fi + +# Resolve relative paths against project_dir. +if [[ "$file_path" != /* ]]; then + file_path="$project_dir/$file_path" +fi + +# Skip non-existent files or files outside the repository (e.g. scratch/artifacts). +if [[ ! -f "$file_path" || "$file_path" != "$project_dir/"* ]]; then + finish +fi + +cd "$project_dir" + +run_cmd() { + if [[ "$hook_mode" == true ]]; then + "$@" >&2 + else + "$@" + fi +} + +# Format supported file types with oxfmt +case "$file_path" in + *.ts|*.tsx|*.mts|*.cts|*.js|*.jsx|*.mjs|*.cjs|*.json|*.jsonc|*.css|*.scss|*.md|*.mdx|*.html|*.yaml|*.yml) + if [[ -x "$project_dir/node_modules/.bin/oxfmt" ]]; then + run_cmd "$project_dir/node_modules/.bin/oxfmt" --no-error-on-unmatched-pattern "$file_path" || true + else + run_cmd pnpm exec oxfmt --no-error-on-unmatched-pattern "$file_path" || true + fi + ;; +esac + +# ESLint only for JS/TS files in supported workspaces +case "$file_path" in + *.ts|*.tsx|*.js|*.jsx) + rel_path="${file_path#"$project_dir/"}" + for dir in "${ESLINT_PACKAGES[@]}"; do + if [[ "$rel_path" == "$dir/"* ]]; then + if [[ -x "$project_dir/node_modules/.bin/eslint" ]]; then + (cd "$project_dir/$dir" && run_cmd "$project_dir/node_modules/.bin/eslint" --fix "$file_path") || true + else + filter="${dir##*/}" + run_cmd pnpm --filter="$filter" exec eslint --fix "$file_path" || true + fi + break + fi + done + ;; +esac + +finish diff --git a/.claude/scripts/format_and_lint.sh b/.claude/scripts/format_and_lint.sh deleted file mode 100755 index 86ff25b9c80..00000000000 --- a/.claude/scripts/format_and_lint.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# PostToolUse hook: format and lint files in apps/ or packages/ after Write or Edit. -# Receives hook JSON on stdin from Claude Code. - -set -euo pipefail - -# Apps/packages that have ESLint configured. -# Add new entries here when a new workspace gets ESLint set up. -ESLINT_PACKAGES=( - "apps/design-system:design-system" - "apps/docs:docs" - "apps/learn:learn" - "apps/studio:studio" - "apps/ui-library:ui-library" - "apps/www:www" -) - -# Extract the file path from stdin JSON. -# Falls back to .tool_response.filePath for Write tool compat. -file_path=$(jq -r '.tool_input.file_path // .tool_response.filePath' 2>/dev/null) - -if [[ -z "$file_path" || "$file_path" == "null" ]]; then - exit 0 -fi - -cd "$CLAUDE_PROJECT_DIR" - -# Prettier and ESLint for supported file types -case "$file_path" in - *.ts|*.tsx|*.js|*.jsx|*.json|*.css|*.scss|*.md|*.mdx|*.html|*.yaml|*.yml|*.sql) - pnpm exec prettier --config prettier.config.mjs --write "$file_path" - ;; -esac - -# ESLint only for JS/TS files in supported workspaces -case "$file_path" in - *.ts|*.tsx|*.js|*.jsx) - for entry in "${ESLINT_PACKAGES[@]}"; do - dir="${entry%%:*}" - filter="${entry##*:}" - if [[ "$file_path" == *"$dir/"* ]]; then - pnpm --filter="$filter" exec eslint --fix "$file_path" - break - fi - done - ;; -esac diff --git a/.claude/settings.json b/.claude/settings.json index 66fdfd3e7e5..4376be582f6 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -27,7 +27,7 @@ "hooks": [ { "type": "command", - "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/scripts/format_and_lint.sh", + "command": "\"$CLAUDE_PROJECT_DIR\"/.agents/scripts/format_and_lint.sh", "statusMessage": "Formatting & linting..." } ] diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 4139ca45b75..5b53b2b67bc 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -12,7 +12,7 @@ Only comment when you are **>85% confident** the issue is a real bug, security v Our CI pipeline already validates the following. **Never comment on these topics:** -- **Formatting or whitespace** — Prettier runs on every PR +- **Formatting or whitespace** — oxfmt runs on every PR - **Linting issues** — ESLint with auto-fix runs on every PR - **Type errors** — TypeScript strict-mode typecheck runs on every PR - **Typos or spelling** — Automated typo detection runs on every PR diff --git a/.github/workflows/autofix_linters.yml b/.github/workflows/autofix_linters.yml index 672c69f3756..fc647a32404 100644 --- a/.github/workflows/autofix_linters.yml +++ b/.github/workflows/autofix_linters.yml @@ -47,7 +47,7 @@ jobs: - name: Install required dependencies run: pnpm install --frozen-lockfile - - name: Run Prettier in fix mode + - name: Run oxfmt in fix mode run: pnpm run format - name: Create autofix patch diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index ed93ad9798c..b64192032ad 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -1,4 +1,4 @@ -name: Check Code with Prettier +name: Check Code Formatting on: pull_request: @@ -24,7 +24,6 @@ jobs: sparse-checkout: | apps blocks - examples i18n packages patches @@ -40,6 +39,6 @@ jobs: - name: Download dependencies run: | pnpm install --frozen-lockfile - - name: Run prettier + - name: Run oxfmt run: |- - pnpm run test:prettier + pnpm run format:check diff --git a/.oxfmtrc.jsonc b/.oxfmtrc.jsonc new file mode 100644 index 00000000000..5921d9852ac --- /dev/null +++ b/.oxfmtrc.jsonc @@ -0,0 +1,77 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "trailingComma": "es5", + "tabWidth": 2, + "semi": false, + "singleQuote": true, + "printWidth": 100, + "endOfLine": "lf", + // Disabled to match prior Prettier behavior and avoid rewriting package.json key order. + "sortPackageJson": false, + "overrides": [ + { + "files": ["apps/studio/**/*.{js,jsx,ts,tsx}"], + "options": { + "sortImports": { + "internalPattern": ["@/"], + "ignoreCase": true, + "newlinesBetween": true, + "sortSideEffects": false, + "partitionByComment": true, + "groups": [ + ["side_effect", "side_effect_style"], + "builtin", + { "newlinesBetween": false }, + ["external", "subpath", "unknown"], + ["internal", "parent", "sibling", "index", "style"], + ], + }, + }, + }, + ], + "ignorePatterns": [ + ".expo", + ".next", + "node_modules", + "pnpm-lock.yaml", + "docker*", + "examples/**", + "apps/**/out", + ".context/**", + "**/.claude/settings.local.json", + "apps/www/public/images/*", + // Generated by apps/www/scripts/generateStaticContent.mjs (GitHub discussion bodies) + "apps/www/public/changelog.md", + "apps/www/public/changelog/*.md", + "apps/www/.generated/*", + // Published by the supabase/cli release workflow + "apps/www/public/schemas", + // Written by apps/www/scripts/syncPartnerIntakeForm.mjs + "apps/www/components/Partners/__generated__", + "apps/docs/**/generated/*", + "apps/docs/examples/*", + // Ignore files with custom js formatting + "apps/studio/public", + "apps/studio/.output", + "apps/studio/dist", + "apps/**/.turbo", + "apps/docs/__generated__", + // Generated by apps/docs/internals/generate-markdown-manifest.ts + "apps/docs/lib/markdown-manifest.ts", + "apps/design-system/__registry__", + // TanStack Router auto-generated route tree; the file header explicitly + // says to exclude it from formatters. + "apps/studio/routeTree.gen.ts", + "packages/icons/__registry__", + "packages/icons/src/icons/*.ts", + "apps/ui-library/__registry__", + "apps/ui-library/public", + "apps/**/.contentlayer", + // Invalid JSON file + "packages/ui/src/components/Form/examples/PhoneProvidersSchema.json", + // Ignore because of

+ "apps/www/_blog/2025-07-14-supabase-ui-platform-kit.mdx", + // Vitest file snapshots — JSON.stringify owns the format, not the formatter + "apps/docs/scripts/__snapshots__/", + ], +} diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 50481716d9a..00000000000 --- a/.prettierignore +++ /dev/null @@ -1,46 +0,0 @@ -.expo -.next -node_modules -pnpm-lock.yaml -docker* -apps/**/out -.context/** -# prettier-plugin-sql-cst only supports sqlite syntax -**/supabase/migrations/*.sql -**/supabase/schemas/**/*.sql -apps/www/schema.sql -apps/www/public/images/* -# Generated by apps/www/scripts/generateStaticContent.mjs (GitHub discussion bodies) -apps/www/public/changelog.md -apps/www/public/changelog/*.md -apps/www/.generated/* -# Published by the supabase/cli release workflow -apps/www/public/schemas -# Written by apps/www/scripts/syncPartnerIntakeForm.mjs -apps/www/components/Partners/__generated__ -apps/docs/**/generated/* -apps/docs/examples/* -examples/slack-clone/nextjs-slack-clone/full-schema.sql -# ignore files with custom js formatting -apps/studio/public -apps/studio/.output -apps/studio/dist -apps/**/.turbo -apps/docs/__generated__ -# Generated by apps/docs/internals/generate-markdown-manifest.ts -apps/docs/lib/markdown-manifest.ts -apps/design-system/__registry__ -# TanStack Router auto-generated route tree; the file header explicitly -# says to exclude it from formatters. -apps/studio/routeTree.gen.ts -packages/icons/__registry__ -packages/icons/src/icons/*.ts -apps/ui-library/__registry__ -apps/ui-library/public -apps/**/.contentlayer -# invalid JSON file -packages/ui/src/components/Form/examples/PhoneProvidersSchema.json -# ignore because of

-apps/www/_blog/2025-07-14-supabase-ui-platform-kit.mdx -# vitest file snapshots — JSON.stringify owns the format, not Prettier -apps/docs/scripts/__snapshots__/ diff --git a/AGENTS.md b/AGENTS.md index 5724e53b240..cb955cc3d75 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -35,14 +35,14 @@ pnpm e2e # Studio E2E tests (playwright) pnpm build --filter=studio # build Studio pnpm lint --filter=studio # lint Studio pnpm typecheck # typecheck all packages -pnpm format # Prettier write (check: pnpm test:prettier) +pnpm format # oxfmt write (check: pnpm format:check) pnpm generate:types # local DB types → supabase/functions/common/database-types.ts pnpm api:codegen # platform Management API types → packages/api-types ``` ## CI -Every PR must pass typecheck + lint (one workflow), Prettier, and a typos check. Other checks are path-filtered: Studio unit tests/build and the lint ratchet (ESLint warning count must not increase) run on `apps/studio/**` changes and the Tailwind class rules (`shadcn/*`) for `www`, `docs`, `design-system`, `ui-library`, `learn`, and `kb`; app-specific test suites run on their own paths. +Every PR must pass typecheck + lint (one workflow), oxfmt formatting, and a typos check. Other checks are path-filtered: Studio unit tests/build and the lint ratchet (ESLint warning count must not increase) run on `apps/studio/**` changes and the Tailwind class rules (`shadcn/*`) for `www`, `docs`, `design-system`, `ui-library`, `learn`, and `kb`; app-specific test suites run on their own paths. Never hand-edit generated files: `packages/api-types/types/**`, `**/routeTree.gen.ts`, `**/__generated__/**`, `apps/docs/features/docs/generated/**`, `apps/www/.generated/**`, `supabase/functions/common/database-types.ts`, `apps/docs/content/_partials/access-control/scoped_pat_*.mdx` (run `make -C apps/docs/spec generate.partials.access-control`). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 309727c5157..069e0bd001e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,7 @@ We actively welcome your Pull Requests! A couple of things to keep in mind befor Prior to submitting your PR, please conduct the following pre-flight checks: - Run `npm run build` locally to ensure that your code builds successfully without having to wait on us to approve Vercel Preview deploys. -- Ensure that the Prettier tests run successfully on your PR. +- Ensure that the formatting check (`pnpm format:check`) runs successfully on your PR. - If your PR changes docs content, use the docs authoring [agent skills](https://github.com/supabase/supabase/tree/master/.agents/skills). They apply the [docs style guide](https://github.com/supabase/supabase/blob/master/apps/docs/CONTRIBUTING.md) for you. - `/write-the-docs` to draft a new page, or `/edit-the-docs` to revise an existing page. - `/test-the-docs` to run any snippets you added. diff --git a/apps/design-system/content/docs/ui-patterns/charts.mdx b/apps/design-system/content/docs/ui-patterns/charts.mdx index 849a4a273bc..e9f360179aa 100644 --- a/apps/design-system/content/docs/ui-patterns/charts.mdx +++ b/apps/design-system/content/docs/ui-patterns/charts.mdx @@ -205,8 +205,7 @@ type ChartConfig = { label?: React.ReactNode icon?: React.ComponentType } & ( - | { color?: string; theme?: never } - | { color?: never; theme: Record<'light' | 'dark', string> } + { color?: string; theme?: never } | { color?: never; theme: Record<'light' | 'dark', string> } ) } ``` diff --git a/apps/design-system/package.json b/apps/design-system/package.json index 5673252fa88..4f90433fb51 100644 --- a/apps/design-system/package.json +++ b/apps/design-system/package.json @@ -8,7 +8,7 @@ "dev:content": "maybe-turbo velite dev", "dev": "maybe-turbo next dev --turbopack --port 3003", "build:content": "velite build --strict", - "build:registry": "tsx ./scripts/build-registry.mts && prettier --log-level silent --write \"registry/**/*.{ts,tsx,mdx}\" --cache", + "build:registry": "tsx ./scripts/build-registry.mts && oxfmt \"registry/**/*.{ts,tsx,mdx}\"", "build": "maybe-turbo next build --turbopack", "start": "next start", "lint": "eslint .", @@ -60,6 +60,7 @@ "maybe-turbo": "workspace:*", "mdast-util-toc": "^6.1.1", "npm-run-all": "^4.1.5", + "oxfmt": "catalog:", "postcss": "catalog:", "rimraf": "^4.1.3", "shiki": "catalog:", diff --git a/apps/docs/features/directives/CodeSample.ts b/apps/docs/features/directives/CodeSample.ts index 04242278d6d..c5572fe5496 100644 --- a/apps/docs/features/directives/CodeSample.ts +++ b/apps/docs/features/directives/CodeSample.ts @@ -39,7 +39,7 @@ import type { MdxJsxAttributeValueExpression, MdxJsxFlowElement } from 'mdast-ut import assert from 'node:assert' import { readFile } from 'node:fs/promises' import { join } from 'node:path' -import prettier from 'prettier' +import { format } from 'oxfmt' import { type Parent } from 'unist' import { visitParents } from 'unist-util-visit-parents' import { z, type SafeParseError } from 'zod' @@ -263,8 +263,24 @@ async function rewriteNodes(contentMap: Map 0) { + throw new Error( + `Failed to format converted code sample: ${errors.map((e) => e.message).join('; ')}` + ) + } + processedContent = formattedCode // Convert TypeScript/TSX language to JavaScript/JSX when converting types assert( diff --git a/apps/docs/internals/generate-sitemap.ts b/apps/docs/internals/generate-sitemap.ts index af3ef98b9c6..bdb49cf8837 100644 --- a/apps/docs/internals/generate-sitemap.ts +++ b/apps/docs/internals/generate-sitemap.ts @@ -6,7 +6,7 @@ import fs from 'fs' import { globby } from 'globby' import matter from 'gray-matter' -import prettier from 'prettier' +import { format } from 'oxfmt' import { checkGuidePageEnabled } from '~/features/docs/NavigationPageStatus.utils' import { generateReferencePages } from './files/reference-lib' @@ -53,11 +53,14 @@ async function generate() { ` - const prettierConfig = await prettier.resolveConfig('./.prettierrc.js') - const formatted = await prettier.format(sitemap, { - ...prettierConfig, - parser: 'html', + const { code: formatted, errors } = await format('sitemap.html', sitemap, { + tabWidth: 2, + printWidth: 100, + endOfLine: 'lf', }) + if (errors.length > 0) { + throw new Error(`Failed to format docs sitemap: ${errors.map((e) => e.message).join('; ')}`) + } const sitemapFilePath = `public/sitemap.xml` console.log( diff --git a/apps/docs/lib/custom-content/getCustomContent.ts b/apps/docs/lib/custom-content/getCustomContent.ts index 2310114c0f8..6b130c20818 100644 --- a/apps/docs/lib/custom-content/getCustomContent.ts +++ b/apps/docs/lib/custom-content/getCustomContent.ts @@ -21,9 +21,11 @@ function contentToCamelCase(feature: CustomContent) { } type CustomContentResult = { - [key in CustomContentToCamelCase extends keyof CustomContentTypes - ? CustomContentToCamelCase - : never]: CustomContentTypes[key] | null + [ + key in CustomContentToCamelCase extends keyof CustomContentTypes + ? CustomContentToCamelCase + : never + ]: CustomContentTypes[key] | null } export const getCustomContent = ( diff --git a/apps/docs/next.config.mjs b/apps/docs/next.config.mjs index 26681b7274e..60e60fb316b 100644 --- a/apps/docs/next.config.mjs +++ b/apps/docs/next.config.mjs @@ -69,7 +69,7 @@ const nextConfig = { '/guides/**/*': ['./content/guides/**/*', './examples/**/*'], '/reference/**/*': ['./features/docs/generated/**/*', './docs/ref/**/*'], }, - serverExternalPackages: ['libpg-query', 'twoslash'], + serverExternalPackages: ['libpg-query', 'oxfmt', 'twoslash'], async headers() { return [ { diff --git a/apps/docs/package.json b/apps/docs/package.json index 39b74c86fa2..5c82bac3978 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -101,6 +101,7 @@ "nuqs": "^1.19.1", "openai": "^4.75.1", "openapi-fetch": "0.12.4", + "oxfmt": "catalog:", "radix-ui": "catalog:", "react": "catalog:", "react-copy-to-clipboard": "^5.1.0", diff --git a/apps/docs/spec/Makefile b/apps/docs/spec/Makefile index 5c0abfe4a8f..ae4347ea439 100644 --- a/apps/docs/spec/Makefile +++ b/apps/docs/spec/Makefile @@ -20,7 +20,7 @@ download.api.v1: # Download tool permissions from the public Management API projection of its enforcement rules. download.mcp-tools-permissions: curl -sSf https://api.supabase.com/platform/mcp-tools-permissions > $(REPO_DIR)/mcp_tools_permissions.json - npx prettier --write $(REPO_DIR)/mcp_tools_permissions.json + pnpm exec oxfmt $(REPO_DIR)/mcp_tools_permissions.json # This flow needs to be updated, so we'l comment out for the moment # Manual flow for now: @@ -105,7 +105,7 @@ generate.partials.access-control: $(REPO_DIR)/mcp_tools_permissions.json \ $(REPO_DIR)/../content/_partials/access-control/scoped_pat_permissions.mdx \ $(REPO_DIR)/../content/_partials/access-control/scoped_pat_mcp_tools.mdx - npx prettier --write $(REPO_DIR)/../content/_partials/access-control/*.mdx + pnpm exec oxfmt $(abspath $(REPO_DIR)/../content/_partials/access-control)/*.mdx ############################################################################### # Validate OpenAPI 3.0 @@ -118,4 +118,4 @@ validate.analytics.v0: # Format everything - easier for git to track changes. ############################################################################### format: - npx prettier --cache --write . + pnpm exec oxfmt . diff --git a/apps/docs/spec/reference/README.md b/apps/docs/spec/reference/README.md index 83d5d695c54..46b8cca6fe7 100644 --- a/apps/docs/spec/reference/README.md +++ b/apps/docs/spec/reference/README.md @@ -113,11 +113,7 @@ with `@category` (and optionally `@subcategory`): { "tag": "@subcategory", "content": [{ "kind": "text", "text": "Auth MFA" }] }, ], }, - "signatures": [ - { - /* params + return type */ - }, - ], + "signatures": [{/* params + return type */}], }, ], }, diff --git a/apps/kb/src/lib/mdx/shiki-code-block.ts b/apps/kb/src/lib/mdx/shiki-code-block.ts index e6782799472..dc1702b8dca 100644 --- a/apps/kb/src/lib/mdx/shiki-code-block.ts +++ b/apps/kb/src/lib/mdx/shiki-code-block.ts @@ -17,9 +17,10 @@ export const sharedCodeBlock: ShikiTransformer = { name: 'kb-shared-code-block', root() { const lines = this.tokens.map((line) => - line.map( - ({ content, color, fontStyle }): CodeToken => [content, getTokenClassName(color, fontStyle)] - ) + line.map(({ content, color, fontStyle }): CodeToken => [ + content, + getTokenClassName(color, fontStyle), + ]) ) // astro highlights these fences as plain text. the frame labels them by line count only const lang = ['plaintext', 'text', 'txt', 'plain'].includes(this.options.lang) diff --git a/apps/studio/components/interfaces/Database/Replication/ReplicationDiagram/index.tsx b/apps/studio/components/interfaces/Database/Replication/ReplicationDiagram/index.tsx index 1d7876abbe7..07dbc1cb239 100644 --- a/apps/studio/components/interfaces/Database/Replication/ReplicationDiagram/index.tsx +++ b/apps/studio/components/interfaces/Database/Replication/ReplicationDiagram/index.tsx @@ -1,17 +1,16 @@ +import '@xyflow/react/dist/style.css' + import { Background, ColorMode, ReactFlow, ReactFlowProvider, useReactFlow } from '@xyflow/react' import { useParams } from 'common' import { useTheme } from 'next-themes' import { useEffect, useMemo } from 'react' +import { SmoothstepEdge } from './Edges' import { PrimaryDatabaseNode, ReplicationNode } from './Nodes' import { getDagreGraphLayout } from './ReplicationDiagram.utils' import { useReplicationDestinationsQuery } from '@/data/replication/destinations-query' -import { timeout } from '@/lib/helpers' - -import '@xyflow/react/dist/style.css' - -import { SmoothstepEdge } from './Edges' import { checkLocalPipelinesNotSetUp } from '@/data/replication/utils' +import { timeout } from '@/lib/helpers' export const ReplicationDiagram = () => { return ( diff --git a/apps/studio/components/interfaces/Database/Schemas/SchemaGraph.tsx b/apps/studio/components/interfaces/Database/Schemas/SchemaGraph.tsx index 56220fe3769..2185ed38769 100644 --- a/apps/studio/components/interfaces/Database/Schemas/SchemaGraph.tsx +++ b/apps/studio/components/interfaces/Database/Schemas/SchemaGraph.tsx @@ -1,3 +1,5 @@ +import '@xyflow/react/dist/style.css' + import type { PGSchema } from '@supabase/pg-meta' import { Background, @@ -11,6 +13,7 @@ import { ReactFlow, useReactFlow, } from '@xyflow/react' +import { LOCAL_STORAGE_KEYS, useParams } from 'common' import { CheckIcon, ChevronDownIcon, @@ -23,10 +26,6 @@ import { useTheme } from 'next-themes' import Link from 'next/link' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { toast } from 'sonner' - -import '@xyflow/react/dist/style.css' - -import { LOCAL_STORAGE_KEYS, useParams } from 'common' import { AlertDialog, AlertDialogAction, diff --git a/apps/studio/components/interfaces/Database/Schemas/Schemas.utils.ts b/apps/studio/components/interfaces/Database/Schemas/Schemas.utils.ts index c328f6c91fb..0c7008cb8df 100644 --- a/apps/studio/components/interfaces/Database/Schemas/Schemas.utils.ts +++ b/apps/studio/components/interfaces/Database/Schemas/Schemas.utils.ts @@ -1,11 +1,10 @@ +import '@xyflow/react/dist/style.css' + import dagre from '@dagrejs/dagre' import type { PGSchema, PGTable } from '@supabase/pg-meta' import { Edge, Node, Position } from '@xyflow/react' -import { uniqBy } from 'lodash' - -import '@xyflow/react/dist/style.css' - import { LOCAL_STORAGE_KEYS, safeLocalStorage } from 'common' +import { uniqBy } from 'lodash' import { TableNodeData } from './Schemas.constants' import { TABLE_NODE_ROW_HEIGHT, TABLE_NODE_WIDTH } from './SchemaTableNode' diff --git a/apps/studio/components/interfaces/Explorer/QueryCell/QueryCell.utils.ts b/apps/studio/components/interfaces/Explorer/QueryCell/QueryCell.utils.ts index 8fb58d3113d..7d187aabe07 100644 --- a/apps/studio/components/interfaces/Explorer/QueryCell/QueryCell.utils.ts +++ b/apps/studio/components/interfaces/Explorer/QueryCell/QueryCell.utils.ts @@ -22,9 +22,8 @@ type ReadonlyChartConfig = Omit & { readonly y_series: readonly string[] } -export const cloneChartConfig = ( - chart: ReadonlyChartConfig | undefined -): ChartConfig | undefined => (chart ? { ...chart, y_series: [...chart.y_series] } : undefined) +export const cloneChartConfig = (chart: ReadonlyChartConfig | undefined): ChartConfig | undefined => + chart ? { ...chart, y_series: [...chart.y_series] } : undefined /** The display state a query cell hands the shared editor. */ // `view` is already defaulted to 'table' by the domain transform, so there is nothing to diff --git a/apps/studio/components/interfaces/ProjectHome/CustomReportSection.tsx b/apps/studio/components/interfaces/ProjectHome/CustomReportSection.tsx index 9c4db7c0b35..bf4ba81eca1 100644 --- a/apps/studio/components/interfaces/ProjectHome/CustomReportSection.tsx +++ b/apps/studio/components/interfaces/ProjectHome/CustomReportSection.tsx @@ -113,15 +113,13 @@ export function CustomReportSection() { const recomputeSimpleGrid = useCallback( (layout: Dashboards.Chart[]) => - layout.map( - (block, idx): Dashboards.Chart => ({ - ...block, - x: idx % 2, - y: Math.floor(idx / 2), - w: 1, - h: 1, - }) - ), + layout.map((block, idx): Dashboards.Chart => ({ + ...block, + x: idx % 2, + y: Math.floor(idx / 2), + w: 1, + h: 1, + })), [] ) diff --git a/apps/studio/components/interfaces/Realtime/Inspector/RealtimeInspector.test.tsx b/apps/studio/components/interfaces/Realtime/Inspector/RealtimeInspector.test.tsx index 22a606bdb8a..f22808ecdf8 100644 --- a/apps/studio/components/interfaces/Realtime/Inspector/RealtimeInspector.test.tsx +++ b/apps/studio/components/interfaces/Realtime/Inspector/RealtimeInspector.test.tsx @@ -1,4 +1,3 @@ -import { RealtimeInspector } from '.' import type { PGPublication } from '@supabase/pg-meta' import { QueryClient } from '@tanstack/react-query' import { screen, waitFor } from '@testing-library/react' @@ -6,6 +5,7 @@ import userEvent from '@testing-library/user-event' import { delay, HttpResponse } from 'msw' import { beforeEach, describe, expect, test, vi } from 'vitest' +import { RealtimeInspector } from '.' import type { LogData } from './Messages.types' import type { RealtimeConfig } from './useRealtimeMessages' import { databasePublicationsKeys } from '@/data/database-publications/keys' diff --git a/apps/studio/components/interfaces/Reports/GridResize.tsx b/apps/studio/components/interfaces/Reports/GridResize.tsx index 9e10769ae08..f74eb0c7c10 100644 --- a/apps/studio/components/interfaces/Reports/GridResize.tsx +++ b/apps/studio/components/interfaces/Reports/GridResize.tsx @@ -1,9 +1,8 @@ -import RGL, { WidthProvider } from 'react-grid-layout' - import 'react-grid-layout/css/styles.css' import 'react-resizable/css/styles.css' import { useParams } from 'common' +import RGL, { WidthProvider } from 'react-grid-layout' import { toast } from 'sonner' import { createSqlSnippetSkeletonV2 } from '../SQLEditor/SQLEditor.utils' diff --git a/apps/studio/components/interfaces/RoleImpersonationSelector/RoleImpersonationPopover.tsx b/apps/studio/components/interfaces/RoleImpersonationSelector/RoleImpersonationPopover.tsx index 96ae2be9571..b92af7504b0 100644 --- a/apps/studio/components/interfaces/RoleImpersonationSelector/RoleImpersonationPopover.tsx +++ b/apps/studio/components/interfaces/RoleImpersonationSelector/RoleImpersonationPopover.tsx @@ -1,8 +1,8 @@ -import { RoleImpersonationSelector } from '.' import { ChevronDownIcon, UserIcon } from 'lucide-react' import { useState } from 'react' import { Button, cn, Popover, PopoverContent, PopoverTrigger } from 'ui' +import { RoleImpersonationSelector } from '.' import { getAvatarUrl, getDisplayName } from '../Auth/Users/Users.utils' import type { User } from '@/data/auth/users-infinite-query' import { useRoleImpersonationStateSnapshot } from '@/state/role-impersonation-state' diff --git a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.utils.ts b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.utils.ts index 583ab327c8c..3046773e75b 100644 --- a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.utils.ts +++ b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.utils.ts @@ -192,13 +192,11 @@ export const getRestrictionsDiff = (enforced: string[], pending: string[]) => { const enforcedIssues = getRestrictionIssues(enforced) const pendingIssues = getRestrictionIssues(pending) return [ - ...enforced.map( - (entry, index): ReviewedRestriction => ({ - entry, - change: pendingKeys.has(getNetworkKey(entry)) ? 'unchanged' : 'removing', - issue: enforcedIssues[index], - }) - ), + ...enforced.map((entry, index): ReviewedRestriction => ({ + entry, + change: pendingKeys.has(getNetworkKey(entry)) ? 'unchanged' : 'removing', + issue: enforcedIssues[index], + })), ...pending.flatMap((entry, index): ReviewedRestriction[] => enforcedKeys.has(getNetworkKey(entry)) ? [] diff --git a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/DiagramFlow.tsx b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/DiagramFlow.tsx index 4dd20536df8..b4589a651e5 100644 --- a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/DiagramFlow.tsx +++ b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/DiagramFlow.tsx @@ -1,3 +1,5 @@ +import '@xyflow/react/dist/style.css' + import { Background, ColorMode, @@ -11,9 +13,6 @@ import { } from '@xyflow/react' import { useTheme } from 'next-themes' import { useEffect, useEffectEvent, useState } from 'react' - -import '@xyflow/react/dist/style.css' - import { cn } from 'ui' import { getDagreGraphLayout } from './InstanceConfiguration.utils' diff --git a/apps/studio/components/layouts/AppLayout/StatusBanner.test.tsx b/apps/studio/components/layouts/AppLayout/StatusBanner.test.tsx index 9c2b849314f..d784414acc8 100644 --- a/apps/studio/components/layouts/AppLayout/StatusBanner.test.tsx +++ b/apps/studio/components/layouts/AppLayout/StatusBanner.test.tsx @@ -24,15 +24,13 @@ function mockProject( ): OrgProject { return { cloud_provider: 'AWS', - databases: databases.map( - ({ region, type }): OrgDatabase => ({ - cloud_provider: 'AWS', - identifier: ref, - region, - status: 'ACTIVE_HEALTHY', - type, - }) - ), + databases: databases.map(({ region, type }): OrgDatabase => ({ + cloud_provider: 'AWS', + identifier: ref, + region, + status: 'ACTIVE_HEALTHY', + type, + })), inserted_at: new Date().toISOString(), integration_source: null, is_branch: false, diff --git a/apps/studio/data/read-replicas/replicas-status-query.ts b/apps/studio/data/read-replicas/replicas-status-query.ts index 14df60c7dc0..ea1200ab5a8 100644 --- a/apps/studio/data/read-replicas/replicas-status-query.ts +++ b/apps/studio/data/read-replicas/replicas-status-query.ts @@ -9,9 +9,9 @@ import type { UseCustomQueryOptions } from '@/types' // [Joshen] Is it possible to import this from the code gen? // https://github.com/supabase/platform/blob/develop/api/src/routes/platform/projects/ref/databases-statuses.dto.ts#L7 export enum ReplicaInitializationStatus { - 'InProgress' = 'in_progress', - 'Completed' = 'completed', - 'Failed' = 'failed', + InProgress = 'in_progress', + Completed = 'completed', + Failed = 'failed', } export type DatabaseStatus = components['schemas']['DatabaseStatusResponse_Output'] diff --git a/apps/studio/hooks/misc/__tests__/useUserProjectRegions.test.ts b/apps/studio/hooks/misc/__tests__/useUserProjectRegions.test.ts index 14bece9af85..50b142420f3 100644 --- a/apps/studio/hooks/misc/__tests__/useUserProjectRegions.test.ts +++ b/apps/studio/hooks/misc/__tests__/useUserProjectRegions.test.ts @@ -21,15 +21,13 @@ function mockProject( ): OrgProject { return { cloud_provider: 'AWS', - databases: databases.map( - ({ region, type }): OrgDatabase => ({ - cloud_provider: 'AWS', - identifier: ref, - region, - status: 'ACTIVE_HEALTHY', - type, - }) - ), + databases: databases.map(({ region, type }): OrgDatabase => ({ + cloud_provider: 'AWS', + identifier: ref, + region, + status: 'ACTIVE_HEALTHY', + type, + })), inserted_at: new Date().toISOString(), integration_source: null, is_branch: false, diff --git a/apps/studio/lib/status-page/status-page.schema.ts b/apps/studio/lib/status-page/status-page.schema.ts index a6653a352ce..8b2f2b5515f 100644 --- a/apps/studio/lib/status-page/status-page.schema.ts +++ b/apps/studio/lib/status-page/status-page.schema.ts @@ -48,22 +48,21 @@ function tolerantArray(itemSchema: T, arrayName: string) return z .array(z.unknown()) .default([]) - .transform( - (items): Array> => - items.flatMap((item) => { - const result = itemSchema.safeParse(item) - if (result.success) return [result.data] + .transform((items): Array> => + items.flatMap((item) => { + const result = itemSchema.safeParse(item) + if (result.success) return [result.data] - const rawId = - typeof item === 'object' && item !== null && 'id' in item - ? (item as { id?: unknown }).id - : undefined - console.warn(`incident.io Widget API: dropping malformed item in ${arrayName}`, { - id: rawId, - issues: result.error.issues, - }) - return [] + const rawId = + typeof item === 'object' && item !== null && 'id' in item + ? (item as { id?: unknown }).id + : undefined + console.warn(`incident.io Widget API: dropping malformed item in ${arrayName}`, { + id: rawId, + issues: result.error.issues, }) + return [] + }) ) } diff --git a/apps/studio/lib/status-page/status-page.utils.ts b/apps/studio/lib/status-page/status-page.utils.ts index b6983f62a2e..5eabbb82e88 100644 --- a/apps/studio/lib/status-page/status-page.utils.ts +++ b/apps/studio/lib/status-page/status-page.utils.ts @@ -120,35 +120,29 @@ export function normalizeStatusPage(res: StatusPageResponse): NormalizedStatusPa const items: Array = [ ...res.ongoing_incidents .filter((incident) => incident.visible) - .map( - (incident): StatusItem => ({ - ...buildBase(incident), - kind: 'incident', - status: incident.status, - impact: incident.current_worst_impact, - }) - ), + .map((incident): StatusItem => ({ + ...buildBase(incident), + kind: 'incident', + status: incident.status, + impact: incident.current_worst_impact, + })), ...res.in_progress_maintenances .filter((maintenance) => maintenance.visible) - .map( - (maintenance): StatusItem => ({ - ...buildBase(maintenance), - kind: 'maintenance', - startedAt: maintenance.started_at, - scheduledEndAt: maintenance.scheduled_end_at ?? null, - }) - ), + .map((maintenance): StatusItem => ({ + ...buildBase(maintenance), + kind: 'maintenance', + startedAt: maintenance.started_at, + scheduledEndAt: maintenance.scheduled_end_at ?? null, + })), ...res.scheduled_maintenances .filter((maintenance) => maintenance.visible) - .map( - (maintenance): StatusItem => ({ - ...buildBase(maintenance), - kind: 'upcoming_maintenance', - startsAt: maintenance.starts_at ?? null, - endsAt: maintenance.ends_at ?? null, - leadDays: maintenance.banner_lead_days ?? DEFAULT_UPCOMING_LEAD_DAYS, - }) - ), + .map((maintenance): StatusItem => ({ + ...buildBase(maintenance), + kind: 'upcoming_maintenance', + startsAt: maintenance.starts_at ?? null, + endsAt: maintenance.ends_at ?? null, + leadDays: maintenance.banner_lead_days ?? DEFAULT_UPCOMING_LEAD_DAYS, + })), ] return { pageUrl: res.page_url, items } diff --git a/apps/ui-library/components/block-item-code.tsx b/apps/ui-library/components/block-item-code.tsx index 243091f9e25..4bed9912338 100644 --- a/apps/ui-library/components/block-item-code.tsx +++ b/apps/ui-library/components/block-item-code.tsx @@ -35,13 +35,11 @@ interface TreeNode { } const flattenChildren = (files: RegistryNode[]): TreeNode[] => { - return files.map( - (node): TreeNode => ({ - name: node.name, - children: node.children ? flattenChildren(node.children) : [], - metadata: { path: node.path }, - }) - ) + return files.map((node): TreeNode => ({ + name: node.name, + children: node.children ? flattenChildren(node.children) : [], + metadata: { path: node.path }, + })) } const LANGUAGES: Record = { diff --git a/apps/ui-library/registry/default/fixtures/database.types.ts b/apps/ui-library/registry/default/fixtures/database.types.ts index 0f5b655d220..66925fba194 100644 --- a/apps/ui-library/registry/default/fixtures/database.types.ts +++ b/apps/ui-library/registry/default/fixtures/database.types.ts @@ -643,10 +643,10 @@ export type Tables< PublicTableNameOrOptions extends | keyof (PublicSchema['Tables'] & PublicSchema['Views']) | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + TableName extends (PublicTableNameOrOptions extends { schema: keyof Database } ? keyof (Database[PublicTableNameOrOptions['schema']]['Tables'] & Database[PublicTableNameOrOptions['schema']]['Views']) - : never = never, + : never) = never, > = PublicTableNameOrOptions extends { schema: keyof Database } ? (Database[PublicTableNameOrOptions['schema']]['Tables'] & Database[PublicTableNameOrOptions['schema']]['Views'])[TableName] extends { @@ -664,9 +664,9 @@ export type Tables< export type TablesInsert< PublicTableNameOrOptions extends keyof PublicSchema['Tables'] | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + TableName extends (PublicTableNameOrOptions extends { schema: keyof Database } ? keyof Database[PublicTableNameOrOptions['schema']]['Tables'] - : never = never, + : never) = never, > = PublicTableNameOrOptions extends { schema: keyof Database } ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends { Insert: infer I @@ -683,9 +683,9 @@ export type TablesInsert< export type TablesUpdate< PublicTableNameOrOptions extends keyof PublicSchema['Tables'] | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + TableName extends (PublicTableNameOrOptions extends { schema: keyof Database } ? keyof Database[PublicTableNameOrOptions['schema']]['Tables'] - : never = never, + : never) = never, > = PublicTableNameOrOptions extends { schema: keyof Database } ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends { Update: infer U @@ -702,9 +702,9 @@ export type TablesUpdate< export type Enums< PublicEnumNameOrOptions extends keyof PublicSchema['Enums'] | { schema: keyof Database }, - EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database } + EnumName extends (PublicEnumNameOrOptions extends { schema: keyof Database } ? keyof Database[PublicEnumNameOrOptions['schema']]['Enums'] - : never = never, + : never) = never, > = PublicEnumNameOrOptions extends { schema: keyof Database } ? Database[PublicEnumNameOrOptions['schema']]['Enums'][EnumName] : PublicEnumNameOrOptions extends keyof PublicSchema['Enums'] diff --git a/apps/www/_alternatives/supabase-vs-firebase.mdx b/apps/www/_alternatives/supabase-vs-firebase.mdx index 6e5b95ec75f..001d3992868 100644 --- a/apps/www/_alternatives/supabase-vs-firebase.mdx +++ b/apps/www/_alternatives/supabase-vs-firebase.mdx @@ -16,7 +16,7 @@ Supabase is an open‑source backend platform that runs on **Postgres**. Each p ## What is Firebase? -Firebase is a managed platform owned by Google. It includes Cloud Firestore (a document‑oriented NoSQL database), authentication, Cloud Storage for files and Cloud Functions for backend logic. Firestore stores data as JSON‑like documents grouped in collections. The SDKs automatically cache documents on the device so apps can read, write and listen to data while offline; changes are synchronized when the device reconnects[.](https://firebase.google.com/docs/firestore/manage-data/enable-offline#:~:text=Cloud%20Firestore%20supports%20offline%20data,to%20the%20Cloud%20Firestore%20backend) Firestore supports *collection group queries*, which let you query across collections with the same name. To handle relational data you often denormalize documents or perform multiple queries in code. +Firebase is a managed platform owned by Google. It includes Cloud Firestore (a document‑oriented NoSQL database), authentication, Cloud Storage for files and Cloud Functions for backend logic. Firestore stores data as JSON‑like documents grouped in collections. The SDKs automatically cache documents on the device so apps can read, write and listen to data while offline; changes are synchronized when the device reconnects[.](https://firebase.google.com/docs/firestore/manage-data/enable-offline#:~:text=Cloud%20Firestore%20supports%20offline%20data,to%20the%20Cloud%20Firestore%20backend) Firestore supports _collection group queries_, which let you query across collections with the same name. To handle relational data you often denormalize documents or perform multiple queries in code. ## Core architecture and database @@ -35,7 +35,7 @@ Firestore’s schemaless design makes it easy to prototype. As data relationship | Feature | Firebase | Supabase | | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -| **Login methods** | Email/password, phone, anonymous and OAuth providers; additional SAML and OpenID Connect support requires upgrading to *Firebase Authentication with Identity Platform* | Email/password, OAuth providers (Google, GitHub, Apple, etc.), SMS and custom providers | +| **Login methods** | Email/password, phone, anonymous and OAuth providers; additional SAML and OpenID Connect support requires upgrading to _Firebase Authentication with Identity Platform_ | Email/password, OAuth providers (Google, GitHub, Apple, etc.), SMS and custom providers | | **Enterprise auth** | The Identity Platform upgrade enables multi‑factor auth, SAML and OIDC | SSO, SAML and OIDC are available on Pro and Enterprise plans without changing SDKs | | **Access control** | Security Rules use a domain‑specific language and differ for Firestore, Storage and Functions | Row‑Level Security (RLS) policies written in SQL control access across the database | | **Offline auth** | The client SDK persists auth tokens locally and handles session renewal | Session management integrates with Postgres; tokens are validated on the server | diff --git a/apps/www/_blog/2022-03-28-community-day-lw4.mdx b/apps/www/_blog/2022-03-28-community-day-lw4.mdx index 8f65bc4718e..42c2d7457bc 100644 --- a/apps/www/_blog/2022-03-28-community-day-lw4.mdx +++ b/apps/www/_blog/2022-03-28-community-day-lw4.mdx @@ -180,7 +180,7 @@ The awesome folks at [Ionic](https://twitter.com/Ionicframework) have put togeth ![Untitled](/images/blog/launch-week-4/community-day/Untitled%201.png) -From the good folks at Everything Svelte, this course teaches you everything you need to know to build to a custom full stack web application. They start from scratch (no starter files!) then take it one step at a time, building the frontend *and* backend. This course explores topics like authentication, accepting payments, [relational databases](/database), testing, and automatic deployment. +From the good folks at Everything Svelte, this course teaches you everything you need to know to build to a custom full stack web application. They start from scratch (no starter files!) then take it one step at a time, building the frontend _and_ backend. This course explores topics like authentication, accepting payments, [relational databases](/database), testing, and automatic deployment. Head over to [everythingsvelte.com](https://www.everythingsvelte.com/) and sign up to get notified when the course launches later in spring! diff --git a/apps/www/_blog/2024-04-25-nix-postgres.mdx b/apps/www/_blog/2024-04-25-nix-postgres.mdx index 2eaa31ed199..2bc79fa6a75 100644 --- a/apps/www/_blog/2024-04-25-nix-postgres.mdx +++ b/apps/www/_blog/2024-04-25-nix-postgres.mdx @@ -16,7 +16,7 @@ toc_depth: 3 Straight from the [Nix manual](https://nixos.org/manual/nix/stable/introduction#introduction): -> Nix is a *purely functional package manager*. This means that it treats packages like values in purely functional programming languages such as Haskell — they are built by functions that don’t have side-effects, and they never change after they have been built. Nix stores packages in the *Nix store*, usually the directory `/nix/store`, where each package has its own unique sub-directory such as +> Nix is a _purely functional package manager_. This means that it treats packages like values in purely functional programming languages such as Haskell — they are built by functions that don’t have side-effects, and they never change after they have been built. Nix stores packages in the _Nix store_, usually the directory `/nix/store`, where each package has its own unique sub-directory such as ```sh /nix/store/b6gvzjyb2pg0kjfwrjmg1vfhh54ad73z-firefox-33.1/ diff --git a/apps/www/_blog/2025-03-29-postgres-language-server.mdx b/apps/www/_blog/2025-03-29-postgres-language-server.mdx index dd30460453f..92b221e5415 100644 --- a/apps/www/_blog/2025-03-29-postgres-language-server.mdx +++ b/apps/www/_blog/2025-03-29-postgres-language-server.mdx @@ -97,7 +97,7 @@ As laid out in a [previous blog post](https://supabase.com/blog/postgres-languag This is why we decided not to create a custom parser. Instead, we leverage the existing [libpg_query](https://github.com/pganalyze/libpg_query) library to parse SQL code reliably. The pganalyze team has published a great blog post on [why this approach is preferred](https://pganalyze.com/blog/parse-postgresql-queries-in-ruby). -However, `libpg_query` is designed to parse *executable* SQL — not to provide language intelligence. This limitation posed several challenges, requiring us to find pragmatic solutions along the way. The biggest challenge of this project has been (and continues to be) resisting the urge to chase perfection, avoiding unnecessary complexity, and prioritizing practical solutions instead. +However, `libpg_query` is designed to parse _executable_ SQL — not to provide language intelligence. This limitation posed several challenges, requiring us to find pragmatic solutions along the way. The biggest challenge of this project has been (and continues to be) resisting the urge to chase perfection, avoiding unnecessary complexity, and prioritizing practical solutions instead. Let’s explore some of these solutions by walking through the document lifecycle. @@ -327,7 +327,7 @@ However, our vision for this project is larger: We want to create a home for all - behind a HTTP API - (hopefully soon) from Wasm right in your browser. -This approach is *heavily* inspired by (and borrows a lot from) [Biome](https://github.com/biomejs/biome). Without their sophisticated and well-structured codebase, we wouldn’t have been able to implement an entire toolchain infrastructure this quickly over the past months. Cheers to Open Source! +This approach is _heavily_ inspired by (and borrows a lot from) [Biome](https://github.com/biomejs/biome). Without their sophisticated and well-structured codebase, we wouldn’t have been able to implement an entire toolchain infrastructure this quickly over the past months. Cheers to Open Source! ## What’s Next diff --git a/apps/www/components/Forms/ApplyToSupaSquadForm.tsx b/apps/www/components/Forms/ApplyToSupaSquadForm.tsx index 4296fde950a..6aa86bc2d40 100644 --- a/apps/www/components/Forms/ApplyToSupaSquadForm.tsx +++ b/apps/www/components/Forms/ApplyToSupaSquadForm.tsx @@ -222,8 +222,8 @@ const FormContent = memo(function FormContent({ { // Convert selected headings back to track objects - const selectedTracks = values.map( - (heading) => tracks.find((track) => track.heading === heading)! + const selectedTracks = values.map((heading) => + tracks.find((track) => track.heading === heading)! ) field.onChange(selectedTracks) }} diff --git a/apps/www/internals/generate-sitemap.mjs b/apps/www/internals/generate-sitemap.mjs index fc3de023b8c..a4e339b5ec6 100644 --- a/apps/www/internals/generate-sitemap.mjs +++ b/apps/www/internals/generate-sitemap.mjs @@ -1,6 +1,6 @@ import { readFileSync, writeFileSync } from 'fs' import { globby } from 'globby' -import prettier from 'prettier' +import { format } from 'oxfmt' import { parseFrontmatter } from '../lib/frontmatter.mjs' @@ -75,8 +75,6 @@ function urlEntry(loc, lastmod) { } async function generate() { - const prettierConfig = await prettier.resolveConfig('./.prettierrc.js') - const unsortedPages = await globby([ 'pages/*.js', 'pages/*.tsx', @@ -233,10 +231,14 @@ async function generate() { ` - const formatted = await prettier.format(sitemap, { - ...prettierConfig, - parser: 'html', + const { code: formatted, errors } = await format('sitemap.html', sitemap, { + tabWidth: 2, + printWidth: 100, + endOfLine: 'lf', }) + if (errors.length > 0) { + throw new Error(`Failed to format www sitemap: ${errors.map((e) => e.message).join('; ')}`) + } /** * generate sitemap router diff --git a/apps/www/lib/contribute.types.ts b/apps/www/lib/contribute.types.ts index 577a5f77321..4b92bc683b1 100644 --- a/apps/www/lib/contribute.types.ts +++ b/apps/www/lib/contribute.types.ts @@ -233,12 +233,12 @@ export type Tables< DefaultSchemaTableNameOrOptions extends | keyof (DefaultSchema['Tables'] & DefaultSchema['Views']) | { schema: keyof DatabaseWithoutInternals }, - TableName extends DefaultSchemaTableNameOrOptions extends { + TableName extends (DefaultSchemaTableNameOrOptions extends { schema: keyof DatabaseWithoutInternals } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Views']) - : never = never, + : never) = never, > = DefaultSchemaTableNameOrOptions extends { schema: keyof DatabaseWithoutInternals } @@ -260,11 +260,11 @@ export type TablesInsert< DefaultSchemaTableNameOrOptions extends | keyof DefaultSchema['Tables'] | { schema: keyof DatabaseWithoutInternals }, - TableName extends DefaultSchemaTableNameOrOptions extends { + TableName extends (DefaultSchemaTableNameOrOptions extends { schema: keyof DatabaseWithoutInternals } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] - : never = never, + : never) = never, > = DefaultSchemaTableNameOrOptions extends { schema: keyof DatabaseWithoutInternals } @@ -285,11 +285,11 @@ export type TablesUpdate< DefaultSchemaTableNameOrOptions extends | keyof DefaultSchema['Tables'] | { schema: keyof DatabaseWithoutInternals }, - TableName extends DefaultSchemaTableNameOrOptions extends { + TableName extends (DefaultSchemaTableNameOrOptions extends { schema: keyof DatabaseWithoutInternals } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] - : never = never, + : never) = never, > = DefaultSchemaTableNameOrOptions extends { schema: keyof DatabaseWithoutInternals } @@ -310,11 +310,11 @@ export type Enums< DefaultSchemaEnumNameOrOptions extends | keyof DefaultSchema['Enums'] | { schema: keyof DatabaseWithoutInternals }, - EnumName extends DefaultSchemaEnumNameOrOptions extends { + EnumName extends (DefaultSchemaEnumNameOrOptions extends { schema: keyof DatabaseWithoutInternals } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions['schema']]['Enums'] - : never = never, + : never) = never, > = DefaultSchemaEnumNameOrOptions extends { schema: keyof DatabaseWithoutInternals } @@ -327,11 +327,11 @@ export type CompositeTypes< PublicCompositeTypeNameOrOptions extends | keyof DefaultSchema['CompositeTypes'] | { schema: keyof DatabaseWithoutInternals }, - CompositeTypeName extends PublicCompositeTypeNameOrOptions extends { + CompositeTypeName extends (PublicCompositeTypeNameOrOptions extends { schema: keyof DatabaseWithoutInternals } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions['schema']]['CompositeTypes'] - : never = never, + : never) = never, > = PublicCompositeTypeNameOrOptions extends { schema: keyof DatabaseWithoutInternals } diff --git a/apps/www/lib/database.types.ts b/apps/www/lib/database.types.ts index 05a334bb372..8ddedb2816a 100644 --- a/apps/www/lib/database.types.ts +++ b/apps/www/lib/database.types.ts @@ -356,10 +356,10 @@ export type Tables< PublicTableNameOrOptions extends | keyof (PublicSchema['Tables'] & PublicSchema['Views']) | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + TableName extends (PublicTableNameOrOptions extends { schema: keyof Database } ? keyof (Database[PublicTableNameOrOptions['schema']]['Tables'] & Database[PublicTableNameOrOptions['schema']]['Views']) - : never = never, + : never) = never, > = PublicTableNameOrOptions extends { schema: keyof Database } ? (Database[PublicTableNameOrOptions['schema']]['Tables'] & Database[PublicTableNameOrOptions['schema']]['Views'])[TableName] extends { @@ -377,9 +377,9 @@ export type Tables< export type TablesInsert< PublicTableNameOrOptions extends keyof PublicSchema['Tables'] | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + TableName extends (PublicTableNameOrOptions extends { schema: keyof Database } ? keyof Database[PublicTableNameOrOptions['schema']]['Tables'] - : never = never, + : never) = never, > = PublicTableNameOrOptions extends { schema: keyof Database } ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends { Insert: infer I @@ -396,9 +396,9 @@ export type TablesInsert< export type TablesUpdate< PublicTableNameOrOptions extends keyof PublicSchema['Tables'] | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + TableName extends (PublicTableNameOrOptions extends { schema: keyof Database } ? keyof Database[PublicTableNameOrOptions['schema']]['Tables'] - : never = never, + : never) = never, > = PublicTableNameOrOptions extends { schema: keyof Database } ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends { Update: infer U @@ -415,9 +415,9 @@ export type TablesUpdate< export type Enums< PublicEnumNameOrOptions extends keyof PublicSchema['Enums'] | { schema: keyof Database }, - EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database } + EnumName extends (PublicEnumNameOrOptions extends { schema: keyof Database } ? keyof Database[PublicEnumNameOrOptions['schema']]['Enums'] - : never = never, + : never) = never, > = PublicEnumNameOrOptions extends { schema: keyof Database } ? Database[PublicEnumNameOrOptions['schema']]['Enums'][EnumName] : PublicEnumNameOrOptions extends keyof PublicSchema['Enums'] diff --git a/apps/www/package.json b/apps/www/package.json index 74931f633d5..9848d1f791c 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -119,6 +119,7 @@ "@types/three": "^0.169.0", "api-types": "workspace:*", "maybe-turbo": "workspace:*", + "oxfmt": "catalog:", "postcss": "catalog:", "react-hook-form": "^7.71.2", "remark-mdx": "^3.0.1", diff --git a/apps/www/pages/changelog.tsx b/apps/www/pages/changelog.tsx index b0577d3427a..a922e114408 100644 --- a/apps/www/pages/changelog.tsx +++ b/apps/www/pages/changelog.tsx @@ -73,16 +73,14 @@ export const getServerSideProps: GetServerSideProps = async ({ res }) // Serialized independently so one entry's MDX failure doesn't drop the others. const featuredResults = await Promise.allSettled( - firstEntries.map( - async (entry): Promise => ({ - slug: entry.slug, - title: entry.frontmatter.title, - created_at: entry.sortDate, - source: await mdxSerialize(entry.bodySection), - changeType: entry.frontmatter.change_type, - affectedProducts: entry.frontmatter.affected_products ?? [], - }) - ) + firstEntries.map(async (entry): Promise => ({ + slug: entry.slug, + title: entry.frontmatter.title, + created_at: entry.sortDate, + source: await mdxSerialize(entry.bodySection), + changeType: entry.frontmatter.change_type, + affectedProducts: entry.frontmatter.affected_products ?? [], + })) ) const featured = featuredResults.flatMap((result) => { if (result.status === 'rejected') { diff --git a/i18n/README.bg.md b/i18n/README.bg.md index 1dfc7f23616..68006e11f18 100644 --- a/i18n/README.bg.md +++ b/i18n/README.bg.md @@ -79,7 +79,7 @@ Supabase е [хоствана платформа](https://supabase.com/dashboard Клиент Функционални клиенти (в комплект с клиента на Supabase) - + Supabase @@ -100,9 +100,9 @@ Supabase е [хоствана платформа](https://supabase.com/dashboard storage-lang END ROW --> - + ⚡️ Официален ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Supabase е [хоствана платформа](https://supabase.com/dashboard storage-dart functions-dart - + 💚 Общност 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Supabase е [хоствана платформа](https://supabase.com/dashboard storage-gdscript functions-gdscript - + diff --git a/i18n/README.cs.md b/i18n/README.cs.md index 561485cdf8a..93e3d7369db 100644 --- a/i18n/README.cs.md +++ b/i18n/README.cs.md @@ -79,7 +79,7 @@ Náš přístup ke klientským knihovnám je modulární. Každá dílčí kniho Klient Feature-Clients (v rámci klienta Supabase) - + Supabase @@ -100,9 +100,9 @@ Náš přístup ke klientským knihovnám je modulární. Každá dílčí kniho storage-lang END ROW --> - + ⚡️ Oficiální ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Náš přístup ke klientským knihovnám je modulární. Každá dílčí kniho storage-dart functions-dart - + 💚 Komunita 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Náš přístup ke klientským knihovnám je modulární. Každá dílčí kniho storage-gdscript functions-gdscript - + diff --git a/i18n/README.da.md b/i18n/README.da.md index d986d60b7cc..da928e71f08 100644 --- a/i18n/README.da.md +++ b/i18n/README.da.md @@ -79,7 +79,7 @@ Vores tilgang til klientbiblioteker er modulær. Hvert delbibliotek er en selvst Klient Feature-Clients (medtaget i Supabase-klienten) - + Supabase @@ -100,9 +100,9 @@ Vores tilgang til klientbiblioteker er modulær. Hvert delbibliotek er en selvst storage-lang END ROW --> - + ⚡️ Officiel ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Vores tilgang til klientbiblioteker er modulær. Hvert delbibliotek er en selvst storage-dart functions-dart - + 💚 Fællesskab 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Vores tilgang til klientbiblioteker er modulær. Hvert delbibliotek er en selvst storage-gdscript functions-gdscript - + diff --git a/i18n/README.de.md b/i18n/README.de.md index 7383e9b6917..d4a07f5ba96 100644 --- a/i18n/README.de.md +++ b/i18n/README.de.md @@ -79,7 +79,7 @@ Unser Ansatz für Client-Bibliotheken ist modular. Jede Unterbibliothek ist eine Client Feature-Clients (gebündelt im Supabase-Client) - + Supabase @@ -100,9 +100,9 @@ Unser Ansatz für Client-Bibliotheken ist modular. Jede Unterbibliothek ist eine storage-lang END ROW --> - + ⚡️ Offiziell ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Unser Ansatz für Client-Bibliotheken ist modular. Jede Unterbibliothek ist eine storage-dart functions-dart - + 💚 Gemeinschaft 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Unser Ansatz für Client-Bibliotheken ist modular. Jede Unterbibliothek ist eine storage-gdscript functions-gdscript - + diff --git a/i18n/README.el.md b/i18n/README.el.md index f1e538f1b79..3e82d171350 100644 --- a/i18n/README.el.md +++ b/i18n/README.el.md @@ -79,7 +79,7 @@ Πελάτης Πελάτες-χαρακτηριστικά (που περιλαμβάνονται στον πελάτη Supabase) - + Supabase @@ -100,9 +100,9 @@ storage-lang END ROW --> - + ⚡️ Επίσημο ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ storage-dart functions-dart - + 💚 Κοινότητα 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ storage-gdscript functions-gdscript - + diff --git a/i18n/README.es.md b/i18n/README.es.md index 7a03a42634a..1ffd48368c7 100644 --- a/i18n/README.es.md +++ b/i18n/README.es.md @@ -79,7 +79,7 @@ Nuestro enfoque para las bibliotecas cliente es modular. Cada sublibrería es un Cliente Feature-Clients (incluido en el cliente Supabase) - + Supabase @@ -100,9 +100,9 @@ Nuestro enfoque para las bibliotecas cliente es modular. Cada sublibrería es un storage-lang END ROW --> - + ⚡️ Oficial ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Nuestro enfoque para las bibliotecas cliente es modular. Cada sublibrería es un storage-dart functions-dart - + 💚 Comunidad 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Nuestro enfoque para las bibliotecas cliente es modular. Cada sublibrería es un storage-gdscript functions-gdscript - + diff --git a/i18n/README.et.md b/i18n/README.et.md index ce4226d01ec..a6af823e2ee 100644 --- a/i18n/README.et.md +++ b/i18n/README.et.md @@ -79,7 +79,7 @@ Meie lähenemine kliendiraamatukogudele on modulaarne. Iga alamraamatukogu on is Klient Funktsioon-kliendid (komplekteeritud Supabase'i kliendiga) - + Supabase @@ -100,9 +100,9 @@ Meie lähenemine kliendiraamatukogudele on modulaarne. Iga alamraamatukogu on is storage-lang END ROW --> - + ⚡️ Ametlik ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Meie lähenemine kliendiraamatukogudele on modulaarne. Iga alamraamatukogu on is storage-dart functions-dart - + 💚 Kogukond 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Meie lähenemine kliendiraamatukogudele on modulaarne. Iga alamraamatukogu on is storage-gdscript functions-gdscript - + diff --git a/i18n/README.fi.md b/i18n/README.fi.md index 01a38189673..1e2550c918e 100644 --- a/i18n/README.fi.md +++ b/i18n/README.fi.md @@ -79,7 +79,7 @@ Lähestymistapamme asiakaskirjastoihin on modulaarinen. Jokainen osakirjasto on Asiakas Feature-Clients (niputettu Supabase-asiakasohjelmaan) - + Supabase @@ -100,9 +100,9 @@ Lähestymistapamme asiakaskirjastoihin on modulaarinen. Jokainen osakirjasto on storage-lang END ROW --> - + ⚡️ Virallinen ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Lähestymistapamme asiakaskirjastoihin on modulaarinen. Jokainen osakirjasto on storage-dart functions-dart - + 💚 Yhteisö 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Lähestymistapamme asiakaskirjastoihin on modulaarinen. Jokainen osakirjasto on storage-gdscript functions-gdscript - + diff --git a/i18n/README.fr.md b/i18n/README.fr.md index 15ab5b7289e..a40913fa437 100644 --- a/i18n/README.fr.md +++ b/i18n/README.fr.md @@ -79,7 +79,7 @@ Notre approche des bibliothèques clientes est modulaire. Chaque sous-bibliothè Client Feature-Clients (intégrés dans le client Supabase) - + Supabase @@ -100,9 +100,9 @@ Notre approche des bibliothèques clientes est modulaire. Chaque sous-bibliothè storage-lang END ROW --> - + ⚡️ Officiel ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Notre approche des bibliothèques clientes est modulaire. Chaque sous-bibliothè storage-dart functions-dart - + 💚 Community 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Notre approche des bibliothèques clientes est modulaire. Chaque sous-bibliothè storage-gdscript functions-gdscript - + diff --git a/i18n/README.gu.md b/i18n/README.gu.md index 8ae3fd6fd6d..ef78e6dd5b0 100644 --- a/i18n/README.gu.md +++ b/i18n/README.gu.md @@ -70,7 +70,7 @@ - `realtime-{lang}`: [Realtime](https://github.com/supabase/realtime) સાથે કામ કરવા માટે ક્લાયન્ટ લાઇબ્રેરી. - `gotrue-{lang}`: [GoTrue](https://github.com/netlify/gotrue) સાથે કામ કરવા માટે ક્લાયન્ટ લાઇબ્રેરી. -| રીપો | ઓફિશ્યિલ | સમુદાય | +| રીપો | ઓફિશ્યિલ | સમુદાય | | --------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **`supabase-{lang}`** | [`JS`](https://github.com/supabase/supabase-js) | [`C#`](https://github.com/supabase/supabase-csharp) \| [`Flutter`](https://github.com/supabase/supabase-flutter) \| [`Python`](https://github.com/supabase/supabase-py) \| `Rust` \| [`Ruby`](https://github.com/supabase/supabase-rb) \| `Go` | | `postgrest-{lang}` | [`JS`](https://github.com/supabase/supabase-js/tree/master/packages/core/postgrest-js) | [`C#`](https://github.com/supabase/postgrest-csharp) \| [`Dart`](https://github.com/supabase/postgrest-dart) \| [`Python`](https://github.com/supabase/postgrest-py) \| [`Rust`](https://github.com/supabase-community/postgrest-rs) \| [`Ruby`](https://github.com/supabase-community/postgrest-rb) \| [`Go`](https://github.com/supabase/postgrest-go) | diff --git a/i18n/README.hu.md b/i18n/README.hu.md index 938bb6e0064..fae0b8a771e 100644 --- a/i18n/README.hu.md +++ b/i18n/README.hu.md @@ -79,7 +79,7 @@ Az ügyfélkönyvtárakra vonatkozó megközelítésünk moduláris. Minden egye Ügyfél Feature-kliensek (a Supabase klienssel együtt) - + Supabase @@ -100,9 +100,9 @@ Az ügyfélkönyvtárakra vonatkozó megközelítésünk moduláris. Minden egye storage-lang END ROW --> - + ⚡️ Hivatalos ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Az ügyfélkönyvtárakra vonatkozó megközelítésünk moduláris. Minden egye storage-dart functions-dart - + 💚 Közösség 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Az ügyfélkönyvtárakra vonatkozó megközelítésünk moduláris. Minden egye storage-gdscript functions-gdscript - + diff --git a/i18n/README.id.md b/i18n/README.id.md index bd5b3949e6e..7000a4d5e92 100644 --- a/i18n/README.id.md +++ b/i18n/README.id.md @@ -79,7 +79,7 @@ Pendekatan kami untuk pustaka klien bersifat modular. Setiap sub-pustaka adalah Klien Klien-Fitur (dibundel dalam klien Supabase) - + Supabase @@ -100,9 +100,9 @@ Pendekatan kami untuk pustaka klien bersifat modular. Setiap sub-pustaka adalah storage-lang END ROW --> - + ⚡️ Resmi ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Pendekatan kami untuk pustaka klien bersifat modular. Setiap sub-pustaka adalah storage-dart functions-dart - + 💚 Komunitas 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Pendekatan kami untuk pustaka klien bersifat modular. Setiap sub-pustaka adalah storage-gdscript functions-gdscript - + diff --git a/i18n/README.it.md b/i18n/README.it.md index 304ba86cfcd..62cf2341e9c 100644 --- a/i18n/README.it.md +++ b/i18n/README.it.md @@ -79,7 +79,7 @@ Il nostro approccio alle librerie client è modulare. Ogni sotto-libreria è un' Cliente Feature-Clients (in bundle con il client Supabase) - + Supabase @@ -100,9 +100,9 @@ Il nostro approccio alle librerie client è modulare. Ogni sotto-libreria è un' storage-lang END ROW --> - + ⚡️ Ufficiale ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Il nostro approccio alle librerie client è modulare. Ogni sotto-libreria è un' storage-dart functions-dart - + 💚 Comunità 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Il nostro approccio alle librerie client è modulare. Ogni sotto-libreria è un' storage-gdscript functions-gdscript - + diff --git a/i18n/README.ko.md b/i18n/README.ko.md index 67661178c1e..8c3790627ea 100644 --- a/i18n/README.ko.md +++ b/i18n/README.ko.md @@ -73,7 +73,7 @@ Supabase는 [호스팅 플랫폼](https://supabase.com/dashboard)입니다. 가 클라이언트 기능 클라이언트(Supabase 클라이언트에 번들로 제공) - + Supabase @@ -94,9 +94,9 @@ Supabase는 [호스팅 플랫폼](https://supabase.com/dashboard)입니다. 가 storage-lang END ROW --> - + ⚡️ 공식 ⚡️ - + JavaScript (TypeScript) supabase-js @@ -133,9 +133,9 @@ Supabase는 [호스팅 플랫폼](https://supabase.com/dashboard)입니다. 가 storage-py functions-py - + 💚 커뮤니티 💚 - + C# supabase-csharp @@ -199,7 +199,7 @@ Supabase는 [호스팅 플랫폼](https://supabase.com/dashboard)입니다. 가 storage-gdscript functions-gdscript - + diff --git a/i18n/README.lt.md b/i18n/README.lt.md index edbb560afdd..d64f0136d64 100644 --- a/i18n/README.lt.md +++ b/i18n/README.lt.md @@ -79,7 +79,7 @@ Mūsų požiūris į klientų bibliotekas yra modulinis. Kiekviena dalinė bibli Klientas Funkcijų klientai (įtraukti į "Supabase" klientą) - + Supabase @@ -100,9 +100,9 @@ Mūsų požiūris į klientų bibliotekas yra modulinis. Kiekviena dalinė bibli storage-lang END ROW --> - + ⚡️ Oficialus ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Mūsų požiūris į klientų bibliotekas yra modulinis. Kiekviena dalinė bibli storage-dart functions-dart - + 💚 Bendruomenė 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Mūsų požiūris į klientų bibliotekas yra modulinis. Kiekviena dalinė bibli storage-gdscript functions-gdscript - + diff --git a/i18n/README.lv.md b/i18n/README.lv.md index c7d2d5568b4..9d4cd7fbbc6 100644 --- a/i18n/README.lv.md +++ b/i18n/README.lv.md @@ -79,7 +79,7 @@ Mūsu pieeja klientu bibliotēkām ir modulāra. Katra apakšbibliotēka ir atse Klients Funkciju klienti (komplektā ar Supabase klientu) - + Supabase @@ -100,9 +100,9 @@ Mūsu pieeja klientu bibliotēkām ir modulāra. Katra apakšbibliotēka ir atse storage-lang END ROW --> - + ⚡️ Oficiālais ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Mūsu pieeja klientu bibliotēkām ir modulāra. Katra apakšbibliotēka ir atse storage-dart functions-dart - + 💚 Kopiena 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Mūsu pieeja klientu bibliotēkām ir modulāra. Katra apakšbibliotēka ir atse storage-gdscript functions-gdscript - + diff --git a/i18n/README.nb.md b/i18n/README.nb.md index 994eb39eda7..fc9da6a1ac9 100644 --- a/i18n/README.nb.md +++ b/i18n/README.nb.md @@ -79,7 +79,7 @@ Vår tilnærming til klientbiblioteker er modulbasert. Hvert underbibliotek er e Klient Funksjonsklienter (inkludert i Supabase-klienten) - + Supabase @@ -100,9 +100,9 @@ Vår tilnærming til klientbiblioteker er modulbasert. Hvert underbibliotek er e storage-lang END ROW --> - + ⚡️ Offisiell ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Vår tilnærming til klientbiblioteker er modulbasert. Hvert underbibliotek er e storage-dart functions-dart - + 💚 Fellesskap 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Vår tilnærming til klientbiblioteker er modulbasert. Hvert underbibliotek er e storage-gdscript functions-gdscript - + diff --git a/i18n/README.ne.md b/i18n/README.ne.md index 78eae32dc1f..d1d215814ad 100644 --- a/i18n/README.ne.md +++ b/i18n/README.ne.md @@ -69,7 +69,7 @@ - `realtime-{lang}`: ग्राहक पुस्तकालय [Realtime](https://github.com/supabase/realtime) को साथ काम गर्न - `gotrue-{lang}`: ग्राहक पुस्तकालय [GoTrue](https://github.com/netlify/gotrue) को साथ काम गर्न -| Repo | आधिकारिक | समुदाय | +| Repo | आधिकारिक | समुदाय | | --------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **`supabase-{lang}`** | [`JS`](https://github.com/supabase/supabase-js) | [`C#`](https://github.com/supabase/supabase-csharp) \| [`Flutter`](https://github.com/supabase/supabase-flutter) \| [`Python`](https://github.com/supabase/supabase-py) \| `Rust` | | `postgrest-{lang}` | [`JS`](https://github.com/supabase/supabase-js/tree/master/packages/core/postgrest-js) | [`C#`](https://github.com/supabase/postgrest-csharp) \| [`Dart`](https://github.com/supabase/postgrest-dart) \| [`Python`](https://github.com/supabase/postgrest-py) \| [`Rust`](https://github.com/supabase-community/postgrest-rs) | diff --git a/i18n/README.nl.md b/i18n/README.nl.md index efb1ba06171..38af5d90b0f 100644 --- a/i18n/README.nl.md +++ b/i18n/README.nl.md @@ -79,7 +79,7 @@ Onze aanpak voor client libraries is modulair. Elke sub-bibliotheek is een op zi Client Feature-Clients (gebundeld in Supabase client) - + Supabase @@ -100,9 +100,9 @@ Onze aanpak voor client libraries is modulair. Elke sub-bibliotheek is een op zi storage-lang END ROW --> - + ⚡️ Officieel ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Onze aanpak voor client libraries is modulair. Elke sub-bibliotheek is een op zi storage-dart functions-dart - + 💚 gemeenschap 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Onze aanpak voor client libraries is modulair. Elke sub-bibliotheek is een op zi storage-gdscript functions-gdscript - + diff --git a/i18n/README.pl.md b/i18n/README.pl.md index c7d371cb137..6f6bde62f3c 100644 --- a/i18n/README.pl.md +++ b/i18n/README.pl.md @@ -79,7 +79,7 @@ Nasze podejście do bibliotek klienckich jest modułowe. Każda pod-biblioteka j Klient Klienty funkcji (dołączone do klienta Supabase) - + Supabase @@ -100,9 +100,9 @@ Nasze podejście do bibliotek klienckich jest modułowe. Każda pod-biblioteka j storage-lang END ROW --> - + ⚡️ Oficjalny ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Nasze podejście do bibliotek klienckich jest modułowe. Każda pod-biblioteka j storage-dart functions-dart - + społeczność 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Nasze podejście do bibliotek klienckich jest modułowe. Każda pod-biblioteka j storage-gdscript functions-gdscript - + diff --git a/i18n/README.pt-PT.md b/i18n/README.pt-PT.md index 72535a018eb..b98cac087b0 100644 --- a/i18n/README.pt-PT.md +++ b/i18n/README.pt-PT.md @@ -79,7 +79,7 @@ A nossa abordagem para as bibliotecas de clientes é modular. Cada sub-bibliotec Cliente Feature-Clients (incluídos no cliente Supabase) - + Supabase @@ -100,9 +100,9 @@ A nossa abordagem para as bibliotecas de clientes é modular. Cada sub-bibliotec storage-lang END ROW --> - + ⚡️ Oficial ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ A nossa abordagem para as bibliotecas de clientes é modular. Cada sub-bibliotec storage-dart functions-dart - + 💚 Comunidade 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ A nossa abordagem para as bibliotecas de clientes é modular. Cada sub-bibliotec storage-gdscript functions-gdscript - + diff --git a/i18n/README.pt-br.md b/i18n/README.pt-br.md index 3cf4e242599..9cd672f53b4 100644 --- a/i18n/README.pt-br.md +++ b/i18n/README.pt-br.md @@ -71,7 +71,7 @@ Nossa abordagem para bibliotecas de clientes é modular. Cada sub-biblioteca é Cliente Feature-Clients (incluídos no cliente Supabase) - + Supabase @@ -92,9 +92,9 @@ Nossa abordagem para bibliotecas de clientes é modular. Cada sub-biblioteca é storage-lang END ROW --> - + ⚡️ Oficial ⚡️ - + JavaScript (TypeScript) supabase-js @@ -113,9 +113,9 @@ Nossa abordagem para bibliotecas de clientes é modular. Cada sub-biblioteca é storage-dart functions-dart - + 💚 comunidade 💚 - + C# supabase-csharp @@ -197,7 +197,7 @@ Nossa abordagem para bibliotecas de clientes é modular. Cada sub-biblioteca é storage-gdscript functions-gdscript - + diff --git a/i18n/README.ro.md b/i18n/README.ro.md index daca2b64254..07d9ea3ae25 100644 --- a/i18n/README.ro.md +++ b/i18n/README.ro.md @@ -79,7 +79,7 @@ Abordarea noastră pentru bibliotecile client este modulară. Fiecare subbibliot Client Feature-Clienți (inclus în clientul Supabase) - + Supabase @@ -100,9 +100,9 @@ Abordarea noastră pentru bibliotecile client este modulară. Fiecare subbibliot storage-lang END ROW --> - + ⚡️ Oficial ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Abordarea noastră pentru bibliotecile client este modulară. Fiecare subbibliot storage-dart functions-dart - + 💚 Comunitate 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Abordarea noastră pentru bibliotecile client este modulară. Fiecare subbibliot storage-gdscript functions-gdscript - + diff --git a/i18n/README.ru.md b/i18n/README.ru.md index 3ddcb7663c6..ff3f5d3fe1b 100644 --- a/i18n/README.ru.md +++ b/i18n/README.ru.md @@ -79,7 +79,7 @@ Supabase - это [размещенная платформа](https://supabase.c Клиент Feature-Clients (поставляется в составе клиента Supabase) - + Supabase @@ -100,9 +100,9 @@ Supabase - это [размещенная платформа](https://supabase.c storage-lang END ROW --> - + ⚡️ Официальный ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Supabase - это [размещенная платформа](https://supabase.c storage-dart functions-dart - + 💚 Сообщество 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Supabase - это [размещенная платформа](https://supabase.c storage-gdscript functions-gdscript - + diff --git a/i18n/README.sk.md b/i18n/README.sk.md index 5fe2d61abf4..77d645060fd 100644 --- a/i18n/README.sk.md +++ b/i18n/README.sk.md @@ -79,7 +79,7 @@ Náš prístup ku klientskym knižniciam je modulárny. Každá čiastková kni Klient Feature-Clients (v balíku s klientom Supabase) - + Supabase @@ -100,9 +100,9 @@ Náš prístup ku klientskym knižniciam je modulárny. Každá čiastková kni storage-lang END ROW --> - + ⚡️ Oficiálna stránka ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Náš prístup ku klientskym knižniciam je modulárny. Každá čiastková kni storage-dart functions-dart - + 💚 Komunita 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Náš prístup ku klientskym knižniciam je modulárny. Každá čiastková kni storage-gdscript functions-gdscript - + diff --git a/i18n/README.sl.md b/i18n/README.sl.md index 87528b76ed3..603f21bda26 100644 --- a/i18n/README.sl.md +++ b/i18n/README.sl.md @@ -79,7 +79,7 @@ Naš pristop k odjemalskim knjižnicam je modularen. Vsaka pod-knjižnica je sam Odjemalec Odjemalci funkcij (v paketu z odjemalcem Supabase) - + Supabase @@ -100,9 +100,9 @@ Naš pristop k odjemalskim knjižnicam je modularen. Vsaka pod-knjižnica je sam storage-lang END ROW --> - + ⚡️ Uradni ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Naš pristop k odjemalskim knjižnicam je modularen. Vsaka pod-knjižnica je sam storage-dart functions-dart - + 💚 Skupnost 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Naš pristop k odjemalskim knjižnicam je modularen. Vsaka pod-knjižnica je sam storage-gdscript functions-gdscript - + diff --git a/i18n/README.sv.md b/i18n/README.sv.md index 77bfacecf29..27abdc521d1 100644 --- a/i18n/README.sv.md +++ b/i18n/README.sv.md @@ -69,7 +69,7 @@ Vårt tillvägagångssätt för klientbibliotek är modulärt. Varje delbibliote Klient Feature-Clients (ingår i Supabase-klienten) - + Supabase @@ -90,9 +90,9 @@ Vårt tillvägagångssätt för klientbibliotek är modulärt. Varje delbibliote storage-lang END ROW --> - + ⚡️ Officiell ⚡️ - + JavaScript (TypeScript) supabase-js @@ -111,9 +111,9 @@ Vårt tillvägagångssätt för klientbibliotek är modulärt. Varje delbibliote storage-dart functions-dart - + 💚 Community 💚 - + C# supabase-csharp @@ -195,7 +195,7 @@ Vårt tillvägagångssätt för klientbibliotek är modulärt. Varje delbibliote storage-gdscript functions-gdscript - + ## Märken diff --git a/i18n/README.tr.md b/i18n/README.tr.md index 0ae4a4c9684..33da5abb026 100644 --- a/i18n/README.tr.md +++ b/i18n/README.tr.md @@ -67,7 +67,7 @@ Ayrıca [self-host](https://supabase.com/docs/guides/self-hosting) ve [yerel ola Müşteri Özellik İstemcileri (Supabase istemcisinde paketlenmiştir) - + Supabase @@ -88,9 +88,9 @@ Ayrıca [self-host](https://supabase.com/docs/guides/self-hosting) ve [yerel ola storage-lang END ROW --> - + ⚡️ Resmi ⚡️ - + JavaScript (TypeScript) supabase-js @@ -109,9 +109,9 @@ Ayrıca [self-host](https://supabase.com/docs/guides/self-hosting) ve [yerel ola storage-dart functions-dart - + 💚 Topluluk 💚 - + C# supabase-csharp @@ -193,7 +193,7 @@ Ayrıca [self-host](https://supabase.com/docs/guides/self-hosting) ve [yerel ola storage-gdscript functions-gdscript - + diff --git a/i18n/README.uk.md b/i18n/README.uk.md index 39dd7ccf26e..dacb67b9a29 100644 --- a/i18n/README.uk.md +++ b/i18n/README.uk.md @@ -79,7 +79,7 @@ Supabase - це [хостингова платформа](https://supabase.com/d Клієнтська Функціональні клієнти (у комплекті з клієнтом Supabase) - + Supabase @@ -100,9 +100,9 @@ Supabase - це [хостингова платформа](https://supabase.com/d storage-lang END ROW --> - + ⚡️ Офіційний ⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Supabase - це [хостингова платформа](https://supabase.com/d storage-dart functions-dart - + 💚 Спільнота 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Supabase - це [хостингова платформа](https://supabase.com/d storage-gdscript functions-gdscript - + diff --git a/i18n/README.zh-tw.md b/i18n/README.zh-tw.md index a4ddcb0ae04..d0e06f08683 100644 --- a/i18n/README.zh-tw.md +++ b/i18n/README.zh-tw.md @@ -79,7 +79,7 @@ Supabase 是一個[托管平台](https://supabase.com/dashboard)。你可以註 客户端 特徵-客户端(捆绑在Supabase客户端中) - + Supabase @@ -100,9 +100,9 @@ Supabase 是一個[托管平台](https://supabase.com/dashboard)。你可以註 storage-lang END ROW --> - + ⚡️ 官方⚡️ - + JavaScript (TypeScript) supabase-js @@ -121,9 +121,9 @@ Supabase 是一個[托管平台](https://supabase.com/dashboard)。你可以註 storage-dart functions-dart - + 💚社群 💚 - + C# supabase-csharp @@ -205,7 +205,7 @@ Supabase 是一個[托管平台](https://supabase.com/dashboard)。你可以註 storage-gdscript functions-gdscript - + diff --git a/package.json b/package.json index 74447042d1f..526f68a5d34 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,8 @@ "lint": "turbo run lint", "typecheck": "turbo --continue typecheck", "test:case-hazards": "node scripts/check-case-hazards.mjs", - "test:prettier": "SORT_IMPORTS=false prettier --config prettier.config.mjs --cache --check '{apps,packages,blocks,examples,i18n}/**/*.{js,jsx,ts,tsx,css,md,mdx,json}'", - "format": "SORT_IMPORTS=false prettier --config prettier.config.mjs --cache --write '{apps,packages,blocks,examples,i18n}/**/*.{js,jsx,ts,tsx,css,md,mdx,json}'", + "format:check": "oxfmt --check '{apps,packages,blocks,i18n}/**/*.{js,jsx,ts,tsx,css,md,mdx,json}'", + "format": "oxfmt '{apps,packages,blocks,i18n}/**/*.{js,jsx,ts,tsx,css,md,mdx,json}'", "test:docs": "turbo run test --filter=docs --filter=docs-search", "test:kb": "turbo run test --filter=kb", "test:ui": "turbo run test --filter=ui", @@ -58,14 +58,12 @@ }, "devDependencies": { "@aws-sdk/client-secrets-manager": "^3.1041.0", - "@ianvs/prettier-plugin-sort-imports": "^4.7.0", "@types/node": "catalog:", "cn": "catalog:", "eslint": "^9.0.0", "jsdom": "^28.1.0", "knip": "6.32.3", - "prettier": "^3.8.0", - "prettier-plugin-sql-cst": "^0.18.0", + "oxfmt": "catalog:", "rimraf": "^6.0.0", "supabase": "^2.114.0", "supports-color": "^8.0.0", diff --git a/packages/api-types/package.json b/packages/api-types/package.json index d3973b61e73..a7630e3f851 100644 --- a/packages/api-types/package.json +++ b/packages/api-types/package.json @@ -7,7 +7,7 @@ "scripts": { "preinstall": "npx only-allow pnpm", "clean": "rimraf .turbo tsconfig.tsbuildinfo", - "codegen": "openapi-typescript --redocly ./redocly.yaml --alphabetize --default-non-nullable=false && node ./scripts/generate-fga-requirements.mjs && prettier --cache --write types/*.d.ts types/fga-requirements.ts", + "codegen": "openapi-typescript --redocly ./redocly.yaml --alphabetize --default-non-nullable=false && node ./scripts/generate-fga-requirements.mjs && oxfmt types/*.d.ts types/fga-requirements.ts", "codegen:prod": "node ./scripts/generate-production-types.mjs", "verify-production-types": "node ./scripts/verify-production-types.mjs", "test": "node --test ./scripts/*.test.mjs" @@ -16,7 +16,7 @@ "license": "MIT", "devDependencies": { "openapi-typescript": "^7.4.3", - "prettier": "*", + "oxfmt": "catalog:", "@typescript/native": "catalog:", "typescript": "catalog:" } diff --git a/packages/api-types/scripts/generate-production-types.test.mjs b/packages/api-types/scripts/generate-production-types.test.mjs index 9398ebe5aeb..b3b90b8eba6 100644 --- a/packages/api-types/scripts/generate-production-types.test.mjs +++ b/packages/api-types/scripts/generate-production-types.test.mjs @@ -36,7 +36,6 @@ test('generateTypes fetches specifications and generates types straight into the fetchImpl: async (url) => ({ ok: true, text: async () => validSpecification }), runImpl: async (command, args) => { runCalls.push([command, args]) - if (args.includes('--find-config-path')) return { stdout: '/repo/.prettierrc\n' } return { stdout: '' } }, }) @@ -50,11 +49,11 @@ test('generateTypes fetches specifications and generates types straight into the const redocly = await readFile(join(temporaryDirectory, 'redocly.yaml'), 'utf8') assert.match(redocly, new RegExp(`output: ${generatedTypesDirectory}/api-v1.d.ts`)) - assert.equal(runCalls.length, 3) + assert.equal(runCalls.length, 2) assert.deepEqual(runCalls[0][0], 'pnpm') assert.ok(runCalls[0][1].includes('openapi-typescript')) - assert.ok(runCalls[1][1].includes('--find-config-path')) - assert.ok(runCalls[2][1].includes('--write')) - assert.ok(runCalls[2][1].includes(join(generatedTypesDirectory, 'api-v1.d.ts'))) - assert.ok(runCalls[2][1].includes(join(generatedTypesDirectory, 'fga-requirements.ts'))) + assert.ok(runCalls[1][1].includes('oxfmt')) + assert.ok(runCalls[1][1].includes('--config')) + assert.ok(runCalls[1][1].includes(join(generatedTypesDirectory, 'api-v1.d.ts'))) + assert.ok(runCalls[1][1].includes(join(generatedTypesDirectory, 'fga-requirements.ts'))) }) diff --git a/packages/api-types/scripts/verify-production-types.mjs b/packages/api-types/scripts/verify-production-types.mjs index af64d79d5ab..659bd571108 100644 --- a/packages/api-types/scripts/verify-production-types.mjs +++ b/packages/api-types/scripts/verify-production-types.mjs @@ -1,7 +1,7 @@ import { execFile } from 'node:child_process' import { appendFile, mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises' import { tmpdir } from 'node:os' -import { dirname, join } from 'node:path' +import { dirname, join, resolve } from 'node:path' import { fileURLToPath } from 'node:url' import { promisify } from 'node:util' @@ -121,7 +121,7 @@ export async function reportTypeDifferences( } // Fetches the given OpenAPI specifications and generates types for them into -// `generatedTypesDirectory`, formatted with the repository's Prettier config. Shared by +// `generatedTypesDirectory`, formatted with the repository's oxfmt config. Shared by // `verifyProductionTypes` (which generates into a throwaway directory to diff against the // committed types) and `generate-production-types.mjs` (which generates directly into the // committed types directory). @@ -168,23 +168,18 @@ export async function generateTypes( { cwd: packageDirectory } ) - // Prettier resolves its config from the formatted file's location. The generated files live + // oxfmt resolves its config from the formatted file's location. The generated files live // in a temporary directory outside the repository, so pass the repository config explicitly - // or they are formatted with Prettier's defaults and never match the committed files. - const { stdout: prettierConfigPath } = await runImpl( - 'pnpm', - ['exec', 'prettier', '--find-config-path', join(packageDirectory, 'package.json')], - { cwd: packageDirectory } - ) + // or they are formatted with oxfmt's defaults and never match the committed files. + const oxfmtConfigPath = resolve(packageDirectory, '../../.oxfmtrc.jsonc') await runImpl( 'pnpm', [ 'exec', - 'prettier', + 'oxfmt', '--config', - prettierConfigPath.trim(), - '--write', + oxfmtConfigPath, ...specifications.map(({ name }) => join(generatedTypesDirectory, `${name}.d.ts`)), join(generatedTypesDirectory, FGA_REQUIREMENTS_FILENAME), ], diff --git a/packages/api-types/types/api-v2.d.ts b/packages/api-types/types/api-v2.d.ts index bf3ed82e0f4..948d407c6e1 100644 --- a/packages/api-types/types/api-v2.d.ts +++ b/packages/api-types/types/api-v2.d.ts @@ -803,6 +803,72 @@ export interface paths { patch?: never trace?: never } + '/v2/projects/{ref}/warehouse/replication/add': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** + * Add source tables to Warehouse replication + * @description Adds one eligible source table or the currently eligible tables in a schema to an enabled Warehouse. Existing selections and layouts are preserved; already-selected tables are unchanged. Schema selection excludes future tables, except future partitions of selected partition roots. An active pipeline restarts once, interrupting replication for other tables; their in-progress initial copies may restart from scratch. A stopped pipeline remains stopped and requires an explicit start before copying. Initial copy adds source reads; duration is unknown. Unsafe reattachment of retained data is rejected. The response describes configuration and restart acceptance, not completed copy or streaming. Failures may have partial effects; inspect table and pipeline state before retrying. + * + * This endpoint is currently in its **Alpha** stage. + */ + post: operations['v2-add-warehouse-replication'] + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/v2/projects/{ref}/warehouse/replication/remove': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** + * Remove source tables from Warehouse replication + * @description Removes one selected source table or all selected tables in a schema as a batch. Source PostgreSQL rows and existing Warehouse data are retained. The retained copy stops receiving updates. An active pipeline restarts once, interrupting replication for other tables; their in-progress initial copies may restart from scratch. A stopped pipeline stays stopped. Removing an unselected target is unchanged. Removing the last target leaves Warehouse enabled with an empty selection. Publication changes and restart acceptance do not establish observed exclusion by active replication. Failures may have partial effects; inspect the selection and pipeline before retrying. + * + * This endpoint is currently in its **Alpha** stage. + */ + post: operations['v2-remove-warehouse-replication'] + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/v2/projects/{ref}/warehouse/replication/resync': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** + * Reset and rebuild one Warehouse table + * @description Resets replication for one selected source table using its currently saved layout. Source rows, saved layouts and completed replication state for unrelated tables are preserved. In-progress initial copies of other tables may restart from scratch. The Warehouse copy is deleted and rebuilt when replication resumes; table reads may be unavailable, freshness can lag, and the source incurs additional reads. Stopping and restarting the pipeline interrupts replication for other tables. Duration is unknown. The pipeline must be started and initial sync enabled for the table before the reset. The immediate response retains ETL reset states; it does not establish recopy completion. Inspect warehouse tables get and warehouse status separately. Do not automatically retry an uncertain response: repeating this request may reset the table again. There is no server-side preview, revision check, idempotency key or operation polling. + * + * This endpoint is currently in its **Alpha** stage. + */ + post: operations['v2-resync-warehouse-replication'] + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } '/v2/projects/{ref}/warehouse/setups': { parameters: { query?: never @@ -3902,6 +3968,170 @@ export interface components { type: 'warehouse_metric' }[] } + V2WarehouseReplicationRequest: { + data: { + attributes: { + /** @description Literal source PostgreSQL schema. Omit table to select its current tables. */ + schema: string + /** @description Literal source table name. Omit to select the schema. */ + table?: string + } + /** + * @description Resource type. + * @enum {string} + */ + type: 'warehouse_replication_change' + } + } + V2WarehouseReplicationResponse_Output: { + data: { + attributes: { + /** @enum {string} */ + action: 'add' | 'remove' + affected_tables: { + id: number + name: string + schema: string + }[] + /** + * @description Immediate orchestration result. Restart acceptance does not establish runtime application or copy completion. + * @enum {string} + */ + application_status: 'unchanged' | 'restart_requested' | 'configured' + changed: boolean + /** @enum {boolean} */ + includes_future_tables: false + pipeline_id: string + pipeline_status_before: string + selected_table_count: number + /** @enum {boolean} */ + source_data_preserved: true + /** @description Resulting configured selection, with best-effort replication observations. */ + tables: { + copy_name: string + id: number + lag_ms: number | null + name: string + replication_state: string | null + schema: string + /** + * @description Last observed table state; null when unavailable. Does not establish completion of this request. + * @enum {string|null} + */ + state: 'syncing' | 'live' | 'error' | null + }[] + unchanged_tables: { + id: number + name: string + schema: string + }[] + /** @enum {boolean} */ + warehouse_data_retained: true + /** @enum {boolean} */ + warehouse_enabled: true + } + id: string + /** + * @description Resource type. + * @enum {string} + */ + type: 'warehouse_replication_change' + } + } + V2WarehouseResyncRequest: { + data: { + attributes: { + /** @description Literal source PostgreSQL schema. Omit table to select its current tables. */ + schema: string + /** @description Literal name of the single source table to reset and recopy. */ + table: string + } + /** + * @description Resource type. + * @enum {string} + */ + type: 'warehouse_replication_resync' + } + } + V2WarehouseResyncResponse_Output: { + data: { + attributes: { + /** + * @description ETL reset replication state. Destination rebuild and recopy may still be pending. + * @enum {string} + */ + application_status: 'reset' + /** + * @description Pipeline ID + * @example 03dg2o5teb2eucxr9ggh3uie6 + */ + pipeline_id: string + /** @enum {boolean} */ + source_data_preserved: true + source_table: { + id: number + name: string + schema: string + } + /** @description Rolled back tables */ + tables: { + /** @description Table replication state */ + new_state: + | { + /** @enum {string} */ + name: 'queued' + } + | { + /** @enum {string} */ + name: 'copying_table' + } + | { + /** @enum {string} */ + name: 'copied_table' + } + | { + /** @enum {string} */ + name: 'following_wal' + } + | { + /** @enum {string} */ + name: 'error' + reason: string + retry_policy: + | { + /** @enum {string} */ + policy: 'no_retry' + } + | { + /** @enum {string} */ + policy: 'manual_retry' + } + | { + /** + * @description Next retry time (RFC 3339 timestamp) + * @example 2025-01-02T03:04:05Z + */ + next_retry: string + /** @enum {string} */ + policy: 'timed_retry' + } + solution?: string | null + } + /** + * @description Table id (Postgres OID) + * @example 16408 + */ + table_id: number + }[] + } + id: string + /** + * @description Resource type. + * @enum {string} + */ + type: 'warehouse_replication_resync' + } + } V2WarehouseSetupAcceptedResponse_Output: { data: { attributes: { @@ -4279,72 +4509,139 @@ export interface components { } V2WarehouseTableLayoutUpdateRequest: { data: { - attributes: { - /** @description Omit to preserve the saved partitioning. Null makes partitioning unmanaged. An empty list explicitly clears partitioning. Otherwise, supply all ordered partition keys. */ - partition_by?: - | { - /** @description Source column name. */ - column: string - transform: - | { - /** @enum {string} */ - kind: 'identity' - } - | { - /** @enum {string} */ - kind: 'year' - } - | { - /** @enum {string} */ - kind: 'month' - } - | { - /** @enum {string} */ - kind: 'day' - } - | { - /** @enum {string} */ - kind: 'hour' - } - | { - /** @description Number of hash buckets. */ - count: number - /** @enum {string} */ - kind: 'bucket' - } - }[] - | null - /** @description Defaults to false, preserving historical files and replication progress. When the layout changes, true resets the table and copies it again. This requires initial sync to be enabled. Reads are disrupted during the copy. An unchanged layout never resets the table. */ - reset_table?: boolean - /** @description Omit to preserve the saved sorting. Null makes sorting unmanaged. The none selector explicitly clears sorting. Otherwise, supply the complete sort selector. */ - sort_by?: - | ( + attributes: + | { + /** @description Omit to preserve the saved partitioning. Null makes partitioning unmanaged. An empty list explicitly clears partitioning. Otherwise, supply all ordered partition keys. */ + partition_by?: | { - /** @enum {string} */ - kind: 'none' - } + /** @description Source column name. */ + column: string + transform: + | { + /** @enum {string} */ + kind: 'identity' + } + | { + /** @enum {string} */ + kind: 'year' + } + | { + /** @enum {string} */ + kind: 'month' + } + | { + /** @enum {string} */ + kind: 'day' + } + | { + /** @enum {string} */ + kind: 'hour' + } + | { + /** @description Number of hash buckets. */ + count: number + /** @enum {string} */ + kind: 'bucket' + } + }[] + | null + /** @description Defaults to false, preserving historical files and replication progress. When the layout changes, true resets the table and copies it again. This requires initial sync to be enabled. Reads are disrupted during the copy. An unchanged layout never resets the table. */ + reset_table?: boolean + /** @description Omit to preserve the saved sorting. Null makes sorting unmanaged. The none selector explicitly clears sorting. Otherwise, supply the complete sort selector. */ + sort_by: + | ( + | { + /** @enum {string} */ + kind: 'none' + } + | { + /** @enum {string} */ + kind: 'primary_key' + } + | { + columns: { + /** @enum {string} */ + direction: 'asc' | 'desc' + /** @description Source column name. */ + name: string + /** + * @description Null placement. Null uses DuckLake's default placement. + * @enum {string|null} + */ + nulls?: 'first' | 'last' | null + }[] + /** @enum {string} */ + kind: 'columns' + } + ) + | (never | null) + } + | { + /** @description Omit to preserve the saved partitioning. Null makes partitioning unmanaged. An empty list explicitly clears partitioning. Otherwise, supply all ordered partition keys. */ + partition_by: | { - /** @enum {string} */ - kind: 'primary_key' - } - | { - columns: { - /** @enum {string} */ - direction: 'asc' | 'desc' - /** @description Source column name. */ - name: string - /** - * @description Null placement. Null uses DuckLake's default placement. - * @enum {string|null} - */ - nulls?: 'first' | 'last' | null - }[] - /** @enum {string} */ - kind: 'columns' - } - ) - | (never | null) - } + /** @description Source column name. */ + column: string + transform: + | { + /** @enum {string} */ + kind: 'identity' + } + | { + /** @enum {string} */ + kind: 'year' + } + | { + /** @enum {string} */ + kind: 'month' + } + | { + /** @enum {string} */ + kind: 'day' + } + | { + /** @enum {string} */ + kind: 'hour' + } + | { + /** @description Number of hash buckets. */ + count: number + /** @enum {string} */ + kind: 'bucket' + } + }[] + | null + /** @description Defaults to false, preserving historical files and replication progress. When the layout changes, true resets the table and copies it again. This requires initial sync to be enabled. Reads are disrupted during the copy. An unchanged layout never resets the table. */ + reset_table?: boolean + /** @description Omit to preserve the saved sorting. Null makes sorting unmanaged. The none selector explicitly clears sorting. Otherwise, supply the complete sort selector. */ + sort_by?: + | ( + | { + /** @enum {string} */ + kind: 'none' + } + | { + /** @enum {string} */ + kind: 'primary_key' + } + | { + columns: { + /** @enum {string} */ + direction: 'asc' | 'desc' + /** @description Source column name. */ + name: string + /** + * @description Null placement. Null uses DuckLake's default placement. + * @enum {string|null} + */ + nulls?: 'first' | 'last' | null + }[] + /** @enum {string} */ + kind: 'columns' + } + ) + | (never | null) + } /** * @description Resource type. * @enum {string} @@ -10655,6 +10952,300 @@ export interface operations { } } } + 'v2-add-warehouse-replication': { + parameters: { + query?: never + header?: never + path: { + /** @description Project ref */ + ref: string + } + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['V2WarehouseReplicationRequest'] + } + } + responses: { + 202: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['V2WarehouseReplicationResponse_Output'] + } + } + /** @description Invalid or ineligible source selection */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description This feature requires the Pro, Team, or Enterprise organization plan. */ + 402: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Forbidden action */ + 403: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Warehouse pipeline, publication or selected table not found */ + 404: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Warehouse lifecycle, initial sync or retained data conflict */ + 409: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Rate limit exceeded */ + 429: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Backend unavailable or outcome uncertain; inspect table and pipeline state before retrying */ + 503: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + } + } + 'v2-remove-warehouse-replication': { + parameters: { + query?: never + header?: never + path: { + /** @description Project ref */ + ref: string + } + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['V2WarehouseReplicationRequest'] + } + } + responses: { + 202: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['V2WarehouseReplicationResponse_Output'] + } + } + /** @description Invalid or ineligible source selection */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description This feature requires the Pro, Team, or Enterprise organization plan. */ + 402: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Forbidden action */ + 403: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Warehouse pipeline, publication or selected table not found */ + 404: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Warehouse lifecycle, initial sync or retained data conflict */ + 409: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Rate limit exceeded */ + 429: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Backend unavailable or outcome uncertain; inspect table and pipeline state before retrying */ + 503: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + } + } + 'v2-resync-warehouse-replication': { + parameters: { + query?: never + header?: never + path: { + /** @description Project ref */ + ref: string + } + cookie?: never + } + requestBody: { + content: { + 'application/json': components['schemas']['V2WarehouseResyncRequest'] + } + } + responses: { + 202: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['V2WarehouseResyncResponse_Output'] + } + } + /** @description Invalid or ineligible source selection */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description This feature requires the Pro, Team, or Enterprise organization plan. */ + 402: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Forbidden action */ + 403: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Warehouse pipeline, publication or selected table not found */ + 404: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Warehouse lifecycle, initial sync or retained data conflict */ + 409: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Rate limit exceeded */ + 429: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + /** @description Backend unavailable or outcome uncertain; inspect table and pipeline state before retrying */ + 503: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseBody'] + } + } + } + } 'v2-create-warehouse-setup': { parameters: { query?: never diff --git a/packages/api-types/types/fga-requirements.ts b/packages/api-types/types/fga-requirements.ts index fa068d01878..e7c780ad69c 100644 --- a/packages/api-types/types/fga-requirements.ts +++ b/packages/api-types/types/fga-requirements.ts @@ -308,6 +308,13 @@ export const fgaRequirements = { 'POST /v2/projects/{ref}/transfers': [['organization_admin_write']], 'POST /v2/projects/{ref}/transfers/previews': [['project_admin_read']], 'POST /v2/projects/{ref}/warehouse/enable': [['project_admin_write', 'database_write']], + 'POST /v2/projects/{ref}/warehouse/replication/add': [['project_admin_write', 'database_write']], + 'POST /v2/projects/{ref}/warehouse/replication/remove': [ + ['project_admin_write', 'database_write'], + ], + 'POST /v2/projects/{ref}/warehouse/replication/resync': [ + ['project_admin_write', 'database_write'], + ], 'POST /v2/projects/{ref}/warehouse/setups': [['project_admin_write', 'database_write']], 'PUT /v1/projects/{ref}/api-keys/legacy': [['api_gateway_keys_write']], 'PUT /v1/projects/{ref}/config/auth/sso/providers/{provider_id}': [['auth_config_write']], diff --git a/packages/build-icons/package.json b/packages/build-icons/package.json index 202c5dd92d2..a0ca0e5c282 100644 --- a/packages/build-icons/package.json +++ b/packages/build-icons/package.json @@ -17,6 +17,7 @@ "license": "ISC", "devDependencies": { "minimist": "^1.2.7", + "oxfmt": "catalog:", "svgson": "^5.2.1" } } diff --git a/packages/build-icons/src/building/generateIconFiles.mjs b/packages/build-icons/src/building/generateIconFiles.mjs index 92030ce26b2..1719f457f65 100644 --- a/packages/build-icons/src/building/generateIconFiles.mjs +++ b/packages/build-icons/src/building/generateIconFiles.mjs @@ -1,6 +1,6 @@ import fs from 'fs' import path from 'path' -import prettier from 'prettier' +import { format } from 'oxfmt' import { readSvg, toPascalCase } from '../utils/helpers.mjs' export default ({ @@ -66,15 +66,28 @@ export const Index: Record = [` // const { deprecated = false } = iconMetaData[iconName] const deprecated = false - const elementTemplate = template({ componentName, iconName, children, getSvg, deprecated, svgAttributes }) - const output = pretty - ? await prettier.format(elementTemplate, { + const elementTemplate = template({ + componentName, + iconName, + children, + getSvg, + deprecated, + svgAttributes, + }) + let output = elementTemplate + if (pretty) { + const { code, errors } = await format(`${iconName}${iconFileExtension}`, elementTemplate, { singleQuote: true, trailingComma: 'all', printWidth: 100, - parser: 'babel', }) - : elementTemplate + if (errors.length > 0) { + throw new Error( + `Failed to format icon ${iconName}: ${errors.map((e) => e.message).join('; ')}` + ) + } + output = code + } const rawSvg = JSON.stringify(readSvg(`${iconName}.svg`, iconsDir)) diff --git a/packages/common/database-types.ts b/packages/common/database-types.ts index 67e0e217f69..3024010a1f3 100644 --- a/packages/common/database-types.ts +++ b/packages/common/database-types.ts @@ -1140,10 +1140,10 @@ export type Tables< PublicTableNameOrOptions extends | keyof (PublicSchema['Tables'] & PublicSchema['Views']) | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + TableName extends (PublicTableNameOrOptions extends { schema: keyof Database } ? keyof (Database[PublicTableNameOrOptions['schema']]['Tables'] & Database[PublicTableNameOrOptions['schema']]['Views']) - : never = never, + : never) = never, > = PublicTableNameOrOptions extends { schema: keyof Database } ? (Database[PublicTableNameOrOptions['schema']]['Tables'] & Database[PublicTableNameOrOptions['schema']]['Views'])[TableName] extends { @@ -1161,9 +1161,9 @@ export type Tables< export type TablesInsert< PublicTableNameOrOptions extends keyof PublicSchema['Tables'] | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + TableName extends (PublicTableNameOrOptions extends { schema: keyof Database } ? keyof Database[PublicTableNameOrOptions['schema']]['Tables'] - : never = never, + : never) = never, > = PublicTableNameOrOptions extends { schema: keyof Database } ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends { Insert: infer I @@ -1180,9 +1180,9 @@ export type TablesInsert< export type TablesUpdate< PublicTableNameOrOptions extends keyof PublicSchema['Tables'] | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + TableName extends (PublicTableNameOrOptions extends { schema: keyof Database } ? keyof Database[PublicTableNameOrOptions['schema']]['Tables'] - : never = never, + : never) = never, > = PublicTableNameOrOptions extends { schema: keyof Database } ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends { Update: infer U @@ -1199,9 +1199,9 @@ export type TablesUpdate< export type Enums< PublicEnumNameOrOptions extends keyof PublicSchema['Enums'] | { schema: keyof Database }, - EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database } + EnumName extends (PublicEnumNameOrOptions extends { schema: keyof Database } ? keyof Database[PublicEnumNameOrOptions['schema']]['Enums'] - : never = never, + : never) = never, > = PublicEnumNameOrOptions extends { schema: keyof Database } ? Database[PublicEnumNameOrOptions['schema']]['Enums'][EnumName] : PublicEnumNameOrOptions extends keyof PublicSchema['Enums'] diff --git a/packages/common/marketplace.types.ts b/packages/common/marketplace.types.ts index 4e5382b1e9f..5d91c9a43be 100644 --- a/packages/common/marketplace.types.ts +++ b/packages/common/marketplace.types.ts @@ -220,12 +220,12 @@ export type Tables< DefaultSchemaTableNameOrOptions extends | keyof (DefaultSchema['Tables'] & DefaultSchema['Views']) | { schema: keyof DatabaseWithoutInternals }, - TableName extends DefaultSchemaTableNameOrOptions extends { + TableName extends (DefaultSchemaTableNameOrOptions extends { schema: keyof DatabaseWithoutInternals } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Views']) - : never = never, + : never) = never, > = DefaultSchemaTableNameOrOptions extends { schema: keyof DatabaseWithoutInternals } @@ -247,11 +247,11 @@ export type TablesInsert< DefaultSchemaTableNameOrOptions extends | keyof DefaultSchema['Tables'] | { schema: keyof DatabaseWithoutInternals }, - TableName extends DefaultSchemaTableNameOrOptions extends { + TableName extends (DefaultSchemaTableNameOrOptions extends { schema: keyof DatabaseWithoutInternals } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] - : never = never, + : never) = never, > = DefaultSchemaTableNameOrOptions extends { schema: keyof DatabaseWithoutInternals } @@ -272,11 +272,11 @@ export type TablesUpdate< DefaultSchemaTableNameOrOptions extends | keyof DefaultSchema['Tables'] | { schema: keyof DatabaseWithoutInternals }, - TableName extends DefaultSchemaTableNameOrOptions extends { + TableName extends (DefaultSchemaTableNameOrOptions extends { schema: keyof DatabaseWithoutInternals } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] - : never = never, + : never) = never, > = DefaultSchemaTableNameOrOptions extends { schema: keyof DatabaseWithoutInternals } @@ -297,11 +297,11 @@ export type Enums< DefaultSchemaEnumNameOrOptions extends | keyof DefaultSchema['Enums'] | { schema: keyof DatabaseWithoutInternals }, - EnumName extends DefaultSchemaEnumNameOrOptions extends { + EnumName extends (DefaultSchemaEnumNameOrOptions extends { schema: keyof DatabaseWithoutInternals } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions['schema']]['Enums'] - : never = never, + : never) = never, > = DefaultSchemaEnumNameOrOptions extends { schema: keyof DatabaseWithoutInternals } @@ -314,11 +314,11 @@ export type CompositeTypes< PublicCompositeTypeNameOrOptions extends | keyof DefaultSchema['CompositeTypes'] | { schema: keyof DatabaseWithoutInternals }, - CompositeTypeName extends PublicCompositeTypeNameOrOptions extends { + CompositeTypeName extends (PublicCompositeTypeNameOrOptions extends { schema: keyof DatabaseWithoutInternals } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions['schema']]['CompositeTypes'] - : never = never, + : never) = never, > = PublicCompositeTypeNameOrOptions extends { schema: keyof DatabaseWithoutInternals } diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json index bbb02c7fce4..d49a4c6ee80 100644 --- a/packages/tsconfig/package.json +++ b/packages/tsconfig/package.json @@ -3,5 +3,9 @@ "version": "0.0.0", "private": true, "main": "index.js", - "files": ["base.json", "nextjs.json", "react-library.json"] + "files": [ + "base.json", + "nextjs.json", + "react-library.json" + ] } diff --git a/packages/ui-patterns/src/Trace/utils.ts b/packages/ui-patterns/src/Trace/utils.ts index d2055623dc7..d7f2082c849 100644 --- a/packages/ui-patterns/src/Trace/utils.ts +++ b/packages/ui-patterns/src/Trace/utils.ts @@ -326,7 +326,7 @@ export function computeMinimapRects( const rects: MinimapRect[] = [] cells.forEach((lane, laneIndex) => { - for (let column = 0; column < columns; ) { + for (let column = 0; column < columns;) { if (lane[column] === 0) { column++ continue diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 216ed262e99..20c6e62ae2c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -78,6 +78,9 @@ catalogs: next-themes: specifier: ^0.4.6 version: 0.4.6 + oxfmt: + specifier: 0.79.0 + version: 0.79.0 radix-ui: specifier: ^1.4.3 version: 1.4.3 @@ -158,9 +161,6 @@ importers: '@aws-sdk/client-secrets-manager': specifier: ^3.1041.0 version: 3.1041.0 - '@ianvs/prettier-plugin-sort-imports': - specifier: ^4.7.0 - version: 4.7.0(@vue/compiler-sfc@3.5.44)(prettier@3.8.1)(supports-color@8.1.1) '@types/node': specifier: 'catalog:' version: 24.19.0 @@ -179,12 +179,9 @@ importers: knip: specifier: 6.32.3 version: 6.32.3 - prettier: - specifier: ^3.8.0 - version: 3.8.1 - prettier-plugin-sql-cst: - specifier: ^0.18.0 - version: 0.18.0 + oxfmt: + specifier: 'catalog:' + version: 0.79.0(@astrojs/compiler-rs@0.5.2) rimraf: specifier: ^6.0.0 version: 6.0.1 @@ -336,6 +333,9 @@ importers: npm-run-all: specifier: ^4.1.5 version: 4.1.5 + oxfmt: + specifier: 'catalog:' + version: 0.79.0(@astrojs/compiler-rs@0.5.2) postcss: specifier: ^8.5.18 version: 8.5.28 @@ -534,6 +534,9 @@ importers: openapi-fetch: specifier: 0.12.4 version: 0.12.4 + oxfmt: + specifier: 'catalog:' + version: 0.79.0(@astrojs/compiler-rs@0.5.2) radix-ui: specifier: 'catalog:' version: 1.4.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.6(react@19.2.6))(react@19.2.6) @@ -2134,6 +2137,9 @@ importers: maybe-turbo: specifier: workspace:* version: link:../../packages/maybe-turbo + oxfmt: + specifier: 'catalog:' + version: 0.79.0(@astrojs/compiler-rs@0.5.2) postcss: specifier: ^8.5.18 version: 8.5.28 @@ -2360,9 +2366,9 @@ importers: openapi-typescript: specifier: ^7.4.3 version: 7.5.2(encoding@0.1.13)(typescript@6.0.2) - prettier: - specifier: '*' - version: 3.8.1 + oxfmt: + specifier: 'catalog:' + version: 0.79.0(@astrojs/compiler-rs@0.5.2) typescript: specifier: 'catalog:' version: 6.0.2 @@ -2372,6 +2378,9 @@ importers: minimist: specifier: ^1.2.7 version: 1.2.8 + oxfmt: + specifier: 'catalog:' + version: 0.79.0(@astrojs/compiler-rs@0.5.2) svgson: specifier: ^5.2.1 version: 5.3.1 @@ -3551,10 +3560,6 @@ packages: resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} engines: {node: '>=6.9.0'} - '@babel/generator@7.29.0': - resolution: {integrity: sha512-vSH118/wwM/pLR38g/Sgk05sNtro6TlTJKuiMXDaZqPUfjTFcudpCOt00IhOfj+1BFAX+UFAlzCU+6WXr3GLFQ==} - engines: {node: '>=6.9.0'} - '@babel/generator@7.29.7': resolution: {integrity: sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==} engines: {node: '>=6.9.0'} @@ -3613,10 +3618,6 @@ packages: resolution: {integrity: sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.27.1': - resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.29.11': resolution: {integrity: sha512-snZbO7MEDOof+hvNa97EjEY7qD7h2kwvQr5AJC3ZhQudKW5dnej6k3kP9NQV88hJwaS8vDqRLFo9rivLEhle2g==} engines: {node: '>=6.9.0'} @@ -3629,10 +3630,6 @@ packages: resolution: {integrity: sha512-6mJgmFFFIIO82vvoLt9XtRC7/TkzXfts1t/SpRX4IHSzMgqoPYCWesVu1udUPUWioAE/2fcG6WuI8zrkE1gwrg==} engines: {node: ^22.18.0 || >=24.11.0} - '@babel/helper-validator-identifier@7.28.5': - resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} - engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.29.7': resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} engines: {node: '>=6.9.0'} @@ -3727,18 +3724,10 @@ packages: resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.29.0': - resolution: {integrity: sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==} - engines: {node: '>=6.9.0'} - '@babel/traverse@7.29.7': resolution: {integrity: sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==} engines: {node: '>=6.9.0'} - '@babel/types@7.29.0': - resolution: {integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==} - engines: {node: '>=6.9.0'} - '@babel/types@7.29.11': resolution: {integrity: sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ==} engines: {node: '>=6.9.0'} @@ -5126,24 +5115,6 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} - '@ianvs/prettier-plugin-sort-imports@4.7.0': - resolution: {integrity: sha512-soa2bPUJAFruLL4z/CnMfSEKGznm5ebz29fIa9PxYtu8HHyLKNE1NXAs6dylfw1jn/ilEIfO2oLLN6uAafb7DA==} - peerDependencies: - '@prettier/plugin-oxc': ^0.0.4 - '@vue/compiler-sfc': 2.7.x || 3.x - content-tag: ^4.0.0 - prettier: 2 || 3 || ^4.0.0-0 - prettier-plugin-ember-template-tag: ^2.1.0 - peerDependenciesMeta: - '@prettier/plugin-oxc': - optional: true - '@vue/compiler-sfc': - optional: true - content-tag: - optional: true - prettier-plugin-ember-template-tag: - optional: true - '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} @@ -6889,6 +6860,128 @@ packages: cpu: [x64] os: [win32] + '@oxfmt/binding-android-arm-eabi@0.79.0': + resolution: {integrity: sha512-xOCQ/rvokUXs8SxOQY5Wy2ukPaZJZ0PmdJovN0ryB1c8DVEtbcvliLdYtINUYh8QOTpmBOctIisSJk9tvh+J6w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxfmt/binding-android-arm64@0.79.0': + resolution: {integrity: sha512-WMLDvCjjchUYtI6zXKOdzTDGm72BaYZiz1/VhB1rrxdakUZRlJh1aMr3CT6ui51uHcWVBycULIXSZHpw6u2pTQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxfmt/binding-darwin-arm64@0.79.0': + resolution: {integrity: sha512-+LzSN7w7tULz96ntS1Uqe5oI00XZ0o/m/t3+eSfiQp3aTPnj2eGUafqEWryMLk84j7x9NiF+GEP2YT4/BfClgA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxfmt/binding-darwin-x64@0.79.0': + resolution: {integrity: sha512-KFiMRhKeiiooaS1dKc4r8AZgOrfOhwVe1yf/aRef+8BajJwtVjMtlsQl/BNRxtkFbq13GjEo/4Q+9YhFGU4o6g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxfmt/binding-freebsd-x64@0.79.0': + resolution: {integrity: sha512-lHVIp0g8ZOFKiqVscvttp+3HJkkRH6XkGgfAA0lVexIlE1mMFVp4V7RBdxz/P9p7T8pSNsYdapFWvdT21Mib9w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxfmt/binding-linux-arm-gnueabihf@0.79.0': + resolution: {integrity: sha512-Pt35GoxiMUfnr+23cuzk07XQVvISDFxxPcp/aFVB87+RQvJoQaBo/XN7Re9XxgElvbELdyxTLnV9XM2aTfJeUA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm-musleabihf@0.79.0': + resolution: {integrity: sha512-zPi9Dni58VKp3r1QUcFvnbJNfBr49qyecq0vlM4SaX/MSjmguq77VngirghDua5tyhIDfqdUMTCK2KRlnZFp/g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm64-gnu@0.79.0': + resolution: {integrity: sha512-XhRehATEWjwX7VVEgDUD+7pfHYncQIJaEU0qsHvEKtu9XX0QYzcKvXhU9+URfiGX9WRh3wy2Ow+YCc3EeHtImg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-arm64-musl@0.79.0': + resolution: {integrity: sha512-gbVjFZYug0MEyqvuTAzXGNxFJmBqBO32o1Fud1lG8bGs6oVz48ZtNQyEcAzqrOwaaG+Sxtv4gVzcsfht9aqmkg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-ppc64-gnu@0.79.0': + resolution: {integrity: sha512-0N0sD3vnllyuiNh1r6zKvNXWE/CakcPKJAespg7XE2+sfvxpz5Q1iFah8sF5aedsOmVvbZaOPZcSHVmMosT1fA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-gnu@0.79.0': + resolution: {integrity: sha512-YtjqUHolcX6cv0ZMZuKQCM4H0ae/okcowy0wGcPHJk4O+8zjy3TvNhzDQ1/KGCkMJO8Fwulm1JcPJsraVJ3p+w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-musl@0.79.0': + resolution: {integrity: sha512-H2gb9bEBr5tcdP5FU8JYTfgOavXDorWcAAlwci/zEKF2jzgh/oEr/SAw6aHB9n3FLEvnKvOh0A1fjku+vgYoUA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-s390x-gnu@0.79.0': + resolution: {integrity: sha512-aZUbyWW5dSOxT/u6suWc4S9GVDt7YPPNMKQon+z79M8dpXmosadcFHAb7jBhpU7Hdsd2GN6/y3nd0JFTsGddZw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-gnu@0.79.0': + resolution: {integrity: sha512-5pW/ZHYfjjQ71gQR+EKzDz8ZzWIDHlTUtWtxVFNgZbKxVZnRxiSXVrllbjpJtx1q8VtSPZ+Lyg9BLny3yw+PTA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-musl@0.79.0': + resolution: {integrity: sha512-3IVUerTDB7Dvd90c1EurAzlVnlE9Azl7Wn8e33qX3wL/IqnslF+P7HvwkD+VeMbHxRtuw0EEBGSArZFXpUAZrQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-openharmony-arm64@0.79.0': + resolution: {integrity: sha512-C5QDgJBtu9+/2BQScoP7ynv54PLOqfoSqhRWwI0D0RPOwYD4tYj0TUdJbXMO1fNegL/5zJiSOxkq6II2xvttWg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxfmt/binding-win32-arm64-msvc@0.79.0': + resolution: {integrity: sha512-zlW1m8M49vNGgqQF/ze80KW8pZMicnW2XDZGBHuYtXTRYn4ewvgpqN9wwoqb6uLZZfb1R1zaQWKEB8cs7KYjwA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxfmt/binding-win32-ia32-msvc@0.79.0': + resolution: {integrity: sha512-wbb7hFv2wK3SCTfu8dl1ydNsXM5dmH+PJMU3sojCkfKcG29VDpITL5/AtouCzXjkOc90QRkcAZcg36gP0KqoHA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxfmt/binding-win32-x64-msvc@0.79.0': + resolution: {integrity: sha512-JLaeaQ+4LkQiVXY06JIV1dBFEDJzssvDieK/3Poi6CsY+c4UxghZVrrsfcKGJ5R/0F2Sw3C5Lf5Hu0sM5qJfPw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + '@parcel/watcher-android-arm64@2.5.6': resolution: {integrity: sha512-YQxSS34tPF/6ZG7r/Ih9xy+kP/WwediEUsqmtf0cuCV5TPPKw/PQHRhueUo6JdeFJaqV3pyjm0GdYjZotbRt/A==} engines: {node: '>= 10.0.0'} @@ -16056,6 +16149,22 @@ packages: rolldown: optional: true + oxfmt@0.79.0: + resolution: {integrity: sha512-92iLHGxAgtYk6jLp/1ZBnEeABveNduHZgMDQj7tyqO9iafuJG3q+YHJq0R5Aa4YT+E6xswMQXdmPZYMwynS8ig==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@astrojs/compiler-rs': ^0.5.0 + svelte: ^5.0.0 + vite-plus: '*' + peerDependenciesMeta: + '@astrojs/compiler-rs': + optional: true + svelte: + optional: true + vite-plus: + optional: true + p-finally@1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} @@ -16441,9 +16550,6 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier-plugin-sql-cst@0.18.0: - resolution: {integrity: sha512-IEbKtlZ+H94uWFHQt4iKWMiJJRIuzWYw8jeLz+RCzy4bDtsM3/07GIF1+EFCbT9d0gWibTPotZWx8o3hz+ITeA==} - prettier@3.8.1: resolution: {integrity: sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==} engines: {node: '>=14'} @@ -17316,11 +17422,6 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.7.3: - resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==} - engines: {node: '>=10'} - hasBin: true - semver@7.8.5: resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} engines: {node: '>=10'} @@ -17649,9 +17750,6 @@ packages: resolution: {integrity: sha512-5vmt2HlCAVozxsBZuXWkAki/KGawaK+b5GG5x+BtXOFVpN/8cqppblFUxHl4jxdA0cvo14lABhM+KBnrUapOlw==} hasBin: true - sql-parser-cst@0.38.2: - resolution: {integrity: sha512-4SR3cZYMxG4gsmvZQSQYYzzfk20OnbpsnwOVbU6Fw39ORLPpIHCMqoX5li0dz+ZWyF5HeR+mSgbgayKhN4JR9w==} - srvx@1.0.5: resolution: {integrity: sha512-KvSKRpgPG/oaq3cyT614OQ2bAa7DynuGamivCZeoZzIUULOdbQz6wUtnnVuC4+DCx2Zglzo8v5gBYmWIWYhDxA==} engines: {node: '>=20.16.0'} @@ -18060,6 +18158,10 @@ packages: resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} + tinypool@2.2.0: + resolution: {integrity: sha512-jBrmx4lYmaC9k/mgPbylxs7kBUxHtD8256up+HjLaDFfXScKJQyil+SWXSvhAtT7XHo+yTVlpB81PGmHP8oLSQ==} + engines: {node: ^20.0.0 || >=22.0.0} + tinyps@0.5.1: resolution: {integrity: sha512-B6Ykif5HflC3AdDkS4Zst/2muYVfeXoVMy+KorqH80s/1x4vunIORpNySH681X7fjj+dFM9MDKD6/Hsccjb87Q==} @@ -20257,14 +20359,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.29.0': - dependencies: - '@babel/parser': 7.29.8 - '@babel/types': 7.29.7 - '@jridgewell/gen-mapping': 0.3.13 - '@jridgewell/trace-mapping': 0.3.31 - jsesc: 3.1.0 - '@babel/generator@7.29.7': dependencies: '@babel/parser': 7.29.8 @@ -20353,16 +20447,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-string-parser@7.27.1': {} - '@babel/helper-string-parser@7.29.11': {} '@babel/helper-string-parser@7.29.7': {} '@babel/helper-string-parser@8.0.0': {} - '@babel/helper-validator-identifier@7.28.5': {} - '@babel/helper-validator-identifier@7.29.7': {} '@babel/helper-validator-identifier@8.0.4': {} @@ -20456,18 +20546,6 @@ snapshots: '@babel/parser': 7.29.8 '@babel/types': 7.29.8 - '@babel/traverse@7.29.0(supports-color@8.1.1)': - dependencies: - '@babel/code-frame': 7.29.7 - '@babel/generator': 7.29.7 - '@babel/helper-globals': 7.29.7 - '@babel/parser': 7.29.8 - '@babel/template': 7.29.7 - '@babel/types': 7.29.7 - debug: 4.4.3(supports-color@8.1.1) - transitivePeerDependencies: - - supports-color - '@babel/traverse@7.29.7(supports-color@8.1.1)': dependencies: '@babel/code-frame': 7.29.7 @@ -20480,11 +20558,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/types@7.29.0': - dependencies: - '@babel/helper-string-parser': 7.27.1 - '@babel/helper-validator-identifier': 7.28.5 - '@babel/types@7.29.11': dependencies: '@babel/helper-string-parser': 7.29.11 @@ -21969,19 +22042,6 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@ianvs/prettier-plugin-sort-imports@4.7.0(@vue/compiler-sfc@3.5.44)(prettier@3.8.1)(supports-color@8.1.1)': - dependencies: - '@babel/generator': 7.29.0 - '@babel/parser': 7.29.0 - '@babel/traverse': 7.29.0(supports-color@8.1.1) - '@babel/types': 7.29.0 - prettier: 3.8.1 - semver: 7.7.3 - optionalDependencies: - '@vue/compiler-sfc': 3.5.44 - transitivePeerDependencies: - - supports-color - '@iconify/types@2.0.0': {} '@iconify/utils@3.0.2(supports-color@8.1.1)': @@ -23836,6 +23896,63 @@ snapshots: '@oxc-resolver/binding-win32-x64-msvc@11.24.2': optional: true + '@oxfmt/binding-android-arm-eabi@0.79.0': + optional: true + + '@oxfmt/binding-android-arm64@0.79.0': + optional: true + + '@oxfmt/binding-darwin-arm64@0.79.0': + optional: true + + '@oxfmt/binding-darwin-x64@0.79.0': + optional: true + + '@oxfmt/binding-freebsd-x64@0.79.0': + optional: true + + '@oxfmt/binding-linux-arm-gnueabihf@0.79.0': + optional: true + + '@oxfmt/binding-linux-arm-musleabihf@0.79.0': + optional: true + + '@oxfmt/binding-linux-arm64-gnu@0.79.0': + optional: true + + '@oxfmt/binding-linux-arm64-musl@0.79.0': + optional: true + + '@oxfmt/binding-linux-ppc64-gnu@0.79.0': + optional: true + + '@oxfmt/binding-linux-riscv64-gnu@0.79.0': + optional: true + + '@oxfmt/binding-linux-riscv64-musl@0.79.0': + optional: true + + '@oxfmt/binding-linux-s390x-gnu@0.79.0': + optional: true + + '@oxfmt/binding-linux-x64-gnu@0.79.0': + optional: true + + '@oxfmt/binding-linux-x64-musl@0.79.0': + optional: true + + '@oxfmt/binding-openharmony-arm64@0.79.0': + optional: true + + '@oxfmt/binding-win32-arm64-msvc@0.79.0': + optional: true + + '@oxfmt/binding-win32-ia32-msvc@0.79.0': + optional: true + + '@oxfmt/binding-win32-x64-msvc@0.79.0': + optional: true + '@parcel/watcher-android-arm64@2.5.6': optional: true @@ -34772,6 +34889,31 @@ snapshots: oxc-parser: 0.148.0 rolldown: 1.2.19 + oxfmt@0.79.0(@astrojs/compiler-rs@0.5.2): + dependencies: + tinypool: 2.2.0 + optionalDependencies: + '@astrojs/compiler-rs': 0.5.2 + '@oxfmt/binding-android-arm-eabi': 0.79.0 + '@oxfmt/binding-android-arm64': 0.79.0 + '@oxfmt/binding-darwin-arm64': 0.79.0 + '@oxfmt/binding-darwin-x64': 0.79.0 + '@oxfmt/binding-freebsd-x64': 0.79.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.79.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.79.0 + '@oxfmt/binding-linux-arm64-gnu': 0.79.0 + '@oxfmt/binding-linux-arm64-musl': 0.79.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.79.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.79.0 + '@oxfmt/binding-linux-riscv64-musl': 0.79.0 + '@oxfmt/binding-linux-s390x-gnu': 0.79.0 + '@oxfmt/binding-linux-x64-gnu': 0.79.0 + '@oxfmt/binding-linux-x64-musl': 0.79.0 + '@oxfmt/binding-openharmony-arm64': 0.79.0 + '@oxfmt/binding-win32-arm64-msvc': 0.79.0 + '@oxfmt/binding-win32-ia32-msvc': 0.79.0 + '@oxfmt/binding-win32-x64-msvc': 0.79.0 + p-finally@1.0.0: {} p-limit@3.1.0: @@ -35133,11 +35275,6 @@ snapshots: prelude-ls@1.2.1: {} - prettier-plugin-sql-cst@0.18.0: - dependencies: - prettier: 3.8.1 - sql-parser-cst: 0.38.2 - prettier@3.8.1: {} prettier@3.9.9: {} @@ -36346,8 +36483,6 @@ snapshots: semver@6.3.1: {} - semver@7.7.3: {} - semver@7.8.5: {} send@0.19.0(supports-color@8.1.1): @@ -36796,8 +36931,6 @@ snapshots: get-stdin: 8.0.0 nearley: 2.20.1 - sql-parser-cst@0.38.2: {} - srvx@1.0.5: {} sse.js@2.2.0: {} @@ -37228,6 +37361,8 @@ snapshots: fdir: 6.5.0(picomatch@4.0.7) picomatch: 4.0.7 + tinypool@2.2.0: {} + tinyps@0.5.1: {} tinyrainbow@3.2.0: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index cf11843d616..206d2e0d8ef 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -45,6 +45,8 @@ catalog: motion: ^11.18.2 next: ^16.4.3 next-themes: ^0.4.6 + # Pin exact version while oxfmt is 0.x so patch releases don't cause surprise CI diffs. + oxfmt: 0.79.0 postcss: ^8.5.18 radix-ui: ^1.4.3 react: ^19.2.6 diff --git a/prettier.config.mjs b/prettier.config.mjs deleted file mode 100644 index cfebffdb7da..00000000000 --- a/prettier.config.mjs +++ /dev/null @@ -1,36 +0,0 @@ -let options = { - trailingComma: 'es5', - tabWidth: 2, - semi: false, - singleQuote: true, - printWidth: 100, - endOfLine: 'lf', - sqlKeywordCase: 'lower', - sqlLiteralCase: 'lower', - sqlTypeCase: 'lower', - plugins: ['prettier-plugin-sql-cst'], - overrides: [ - { - files: '**/*.json', - options: { parser: 'json' }, - }, - ], -} - -const sortImportsOptions = { - plugins: ['prettier-plugin-sql-cst', '@ianvs/prettier-plugin-sort-imports'], - importOrder: ['', '', '^(@|\\.{1,2})/(.*)$'], -} - -// Disable sorting imports when running a prettier command in CI. This is to make the sorting work in editors -// for easier migration. Studio components are always sorted regardless of this flag. -if (process.env.SORT_IMPORTS !== 'false') { - options = { ...options, ...sortImportsOptions } -} else { - options.overrides.push({ - files: 'apps/studio/**/*.{js,jsx,ts,tsx}', - options: sortImportsOptions, - }) -} - -export default options