Peers
The optional peer dependencies of better-supabase, the version ranges they accept and the subpaths that need each one.
Dependencies the CLI installs
better-supabase installs four dependencies that only the CLI and the Node
entries import. Deployed code never loads them, so a function does not grow.
Each one is pinned to an exact version, because the output of gen, doctor
and db diff depends on it.
| Package | Version | Used for |
|---|---|---|
oxc-parser | 0.159.0 | Reading TypeScript |
@supabase/pg-parser | 0.1.7 | Reading SQL |
@supabase/pg-delta | 1.0.0-alpha.61 | db diff plans the migration |
@supabase/pg-topo | 1.0.0-alpha.8 | pg-delta orders the schema files |
Do not add @supabase/pg-delta or @supabase/pg-topo to your own
package.json: a second entry can install a second copy that plans a
different migration. doctor reports one as BS709.
Peers
better-supabase has one required peer, @supabase/supabase-js. Every other
peer is optional: install it only when you import a subpath that needs it.
Package managers still check an optional peer you have installed for another
reason, so with strictPeerDependencies an install fails when the version is
outside the range below. doctor reports such a
peer as BS601.
| Peer | Range | Needed by |
|---|---|---|
@supabase/supabase-js | ^2.119.0 | Everything (required) |
@supabase/postgrest-typegen | >=0.8.1 | The CLI: gen and doctor |
pg | >=8.23.1 <9 | The CLI's database commands, better-supabase/postgres, better-supabase/workflow-sdk/world |
oxfmt | >=0.66.0 <1 | The CLI, to format database.types.ts |
@supabase/config | ^1.10.0 | The CLI, to read supabase/config.toml (it falls back to its own parser) |
@supabase/lite | >=0.11.0 <0.12 | liteStack() in better-supabase/testing, and the CLI's gen and doctor on a Supabase Lite project |
@supabase/mcp-server-supabase | >=0.16.1 | supabaseMcp in better-supabase/ai-sdk/mcp and supabaseMcpHandler in better-supabase/mcp/sdk |
undici | >=8.13.1 <9 | keepAliveFetch in better-supabase/node (Node) |
temporal-polyfill | >=1.0.8 | Runtimes without a native Temporal (Temporal) |
typescript | >=5.0.0 | The CLI's symbol tier, which follows a symbol across files and needs 7.1 or newer (symbol tier) |
better-result | >=3.0.1 <4 | The types of better-supabase/better-result (better-result) |
react | ^19.3.1 | better-supabase/react, react/native, next/client and the /react entries of blocks, ai-sdk and chat-sdk |
@tanstack/query-core | ^5.108.4 | better-supabase/query, react, vue, solid, svelte, tanstack-db |
vue | ^3.5.46 | better-supabase/vue |
solid-js | ^1.9.19 | better-supabase/solid |
svelte | ^5.59.1 | better-supabase/svelte |
next | >=16.4.6 <17 | better-supabase/next, next/client, next/image |
@next/playwright | >=16.4.6 <17 | expectInstant in better-supabase/testing |
hono | >=4.13.21 <5 | better-supabase/hono |
react-router | >=8.5.2 <9 | better-supabase/react-router |
@sveltejs/kit | >=3.4.0 <4 | better-supabase/sveltekit |
h3 | >=1.15.11 <3 | better-supabase/h3 (H3 2) and h3/v1 (H3 1) |
nuxt | >=4.7.0 <5 | better-supabase/nuxt |
nuqs | >=2.10.3 <3 | the files the nuqs() generator writes (nuqs/server) |
astro | >=7.4.13 <8 | better-supabase/astro |
@solidjs/start | >=2.2.3 <3 | better-supabase/solid-start |
@tanstack/react-start | >=1.169.7 <2 | better-supabase/tanstack-start |
elysia | >=1.4.32 <2 | better-supabase/elysia |
express | >=5.3.0 <6 | toExpress in better-supabase/node |
fastify | >=5.12.8 <6 | toFastify in better-supabase/node |
koa | >=3.3.0 <4 | toKoa in better-supabase/node |
@orpc/server | >=2.0.0-beta.53 <3 | better-supabase/orpc |
@nestjs/common | >=12.6.0 <13 | better-supabase/nestjs |
expo-server | >=58.1.0 <59 | better-supabase/expo |
@modelcontextprotocol/server | >=2.4.0 <3 | better-supabase/mcp/sdk |
@opentelemetry/api | >=1.9.1 <2 | better-supabase/otel |
stripe | >=23.2.0 <24 | better-supabase/stripe, and better-supabase/blocks/billing, blocks/usage and commerce unless you pass a client |
redis | >=6.4.0 <7 | better-supabase/streams/redis with the url option |
yjs | >=13.6.33 <14 | better-supabase/yjs, unless you pass the module |
fast-xml-parser | >=5.12.1 <6 | fromUbl() in better-supabase/e-invoicing (unless you pass the module) and parseCamt053 in better-supabase/blocks/banking |
unpdf | >=2.2.2 <3 | pdfExtractor() in better-supabase/blocks/knowledge (unless you pass load) |
mammoth | >=1.13.0 <2 | docxExtractor() in better-supabase/blocks/knowledge (unless you pass load) |
jsonpath-rfc9535 | >=1.3.0 <2 | Overlays in better-supabase/spec, unless you pass a JSONPath engine |
resumable-stream | >=2.2.13 <3 | better-supabase/streams/resumable |
@json-render/core | >=0.23.2 <1 | Catalog checks next to better-supabase/json-render |
ai | >=7.0.181 <8 | better-supabase/ai-sdk and its subpaths |
@ai-sdk/react | >=4.0.186 <5 | better-supabase/ai-sdk/react, ai-sdk/workflow-react |
@ai-sdk/mcp | >=2.0.104 <3 | better-supabase/ai-sdk/mcp |
@ai-sdk/harness | >=1.0.192 <2 | harnessRoute in better-supabase/ai-sdk/agents |
@ai-sdk/workflow | >=2.0.113 <3 | better-supabase/ai-sdk/workflow |
chat | >=4.45.0 <5 | better-supabase/chat-sdk, and the chat state of better-supabase/testing |
@chat-adapter/catalog | >=4.45.0 <5 | better-supabase/chat-sdk, to read the Chat SDK adapter catalog (packages, capabilities and setup variables) |
@chat-adapter/whatsapp | >=4.45.0 <5 | better-supabase/chat-sdk, to send a template once the 24-hour window has closed (sendWithinWindowOrTemplate) |
workflow | >=5.8.0 <6 | better-supabase/workflow-sdk (including registerWorkflowLifecycle), workflow-sdk/builder, ai-sdk/workflow |
@workflow/world | >=5.4.0 <5.5 | better-supabase/workflow-sdk/world, workflow-sdk/builder |
@workflow/world-postgres | >=5.5.0 <5.6 | better-supabase/workflow-sdk/world |
zod | >=4.6.7 <5 | better-supabase/generators/zod, the zod() generator |
valibot | >=1.5.0 <2 | better-supabase/generators/valibot, the valibot() generator |
eve | >=1.5.0 <2 | better-supabase/eve |
@ai-sdk/anthropic | >=4.0.107 <5 | anthropicMemory in better-supabase/ai-sdk/memory |
@openfeature/server-sdk | >=1.23.0 <2 | createFlagsProvider in better-supabase/blocks/flags, as an OpenFeature server provider |
@supabase-labs/middleware-openfeature | >=0.2.0 <0.3 | createFlagClient in better-supabase/blocks/flags |
@powersync/common | >=2.5.0 <3 | better-supabase/powersync |
@vercel/connect | >=2.9.5 <3 | better-supabase/vercel-connect |
@vercel/queue | >=0.11.0 <0.12 | vercelQueueProvider and vercelQueueRoute in better-supabase/blocks/queue |
@vercel/sandbox | >=4.1.0 <5 | better-supabase/vercel-sandbox |
@ai-sdk/sandbox-vercel | >=1.0.192 <2 | better-supabase/vercel-sandbox |
@vercel/schedules | >=0.0.3 <0.1 | vercelScheduler in better-supabase/blocks/queue, with Schedules from the SDK |
botid | >=1.5.13 <2 | botIdGuard in better-supabase/vercel-security |
@vercel/firewall | >=1.2.6 <2 | firewallRateLimit in better-supabase/vercel-security |
@vercel/passport | >=1.2.0 <2 | verifyPassport in better-supabase/vercel-passport |
@vercel/sdk | >=1.28.67 <2 | vercelDomainProvider in better-supabase/blocks/domains |
@vercel/functions | >=3.11.3 <4 | attachDatabasePool in better-supabase/postgres, and vercelRuntimeCache for the JWKS cache |
@vercel/kms | >=0.3.12 <0.4 | vercelKmsKeyProvider in better-supabase/blocks/signing-keys |
@vercel/blob | >=2.9.0 <3 | vercelBlobStore for better-supabase/blocks/drive and blocks/attachments |
flags | >=4.5.1 <5 | better-supabase/flags-sdk |
Each range starts at the release the conformance tests run on. Most cover one
major release, or one minor release for a 0.x package. h3 covers H3 1, the
h3/v1 entry that Nitro 2 and Nuxt 4 run, and H3 2, and both are tested.
@json-render/core and oxfmt accept any later 0.x release; oxfmt
starts at 0.66.0, the version @supabase/postgrest-typegen 0.8.1 requires.
eve starts at 1.3.0, the release whose custom-skills context supabaseSkillScopes reads.
temporal-polyfill, @supabase/postgrest-typegen and
@supabase/mcp-server-supabase have a floor and no upper bound. The CLI is
tested against postgrest-typegen 0.8.1: gen prints a notice for any other
release, because database.types.ts can then differ from supabase gen types
output. Pin it with pnpm add -D @supabase/postgrest-typegen@0.8.1.
better-supabase imports none of the peers from @ai-sdk/anthropic on, and
none of the frameworks from react-router to koa: it types them
structurally or loads them on first use. They are peers so that your package
manager warns you when you upgrade one past the releases the conformance tests
cover.
Optional peers that better-supabase loads on first use, such as stripe for
{ secretKey }, redis and yjs, load through a native import() that
bundlers leave alone. That works in Node, Bun and Deno, and in a bundled app
that keeps the package external. When your bundler includes the package
instead, pass the client or module yourself; for Stripe, pass
stripeFromKey() from better-supabase/stripe, which imports stripe by name
so the bundler and file tracing pick it up. For Vercel Sandbox, pass load
and loadSession to vercelSandboxes().
When another package in your app needs a version outside a range, and you
don't import the subpath that needs it, allow it in pnpm-workspace.yaml:
peerDependencyRules:
allowedVersions:
"better-supabase>@modelcontextprotocol/server": "2"Last updated on