Skip to content

feat(cli): upgrade @supabase/typegen to 0.2.2 - #6919

Merged
avallete merged 1 commit into
developfrom
lukasklingsbo/bump-typegen-0.2.2
Oct 5, 2026
Merged

avallete merged 1 commit into
developfrom
lukasklingsbo/bump-typegen-0.2.2

Conversation

@spydon

@spydon spydon commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Summary

TL;DR: gen types bundles @supabase/typegen@0.2.2, which pins @supabase/postgrest-typegen@0.4.0. TypeScript output gains a ComputedFields key on every table and view, and functions taking a row through a named parameter are typed without the computed fields. Go, Python, Swift and Dart output are unchanged.

Why

postgrest-js leaves computed fields (functions taking the relation's row) out of select('*'), as PostgREST does, and used to infer which Row keys those are from Functions. That inference misses named parameters, which the generator has emitted into Row since CLI 2.118.0, so select('*') on such a relation was typed with keys PostgREST never returns. postgrest-typegen 0.4.0 declares them instead (supabase/sdk#243), and postgrest-js reads the declaration in supabase/supabase-js#2730. Design and measurements in SDK-1986.

What changed

  • Bump @supabase/typegen from 0.2.1 to 0.2.2 in apps/cli/package.json; the lockfile moves @supabase/postgrest-typegen from 0.3.1 to 0.4.0 and arktype from 2.2.3 to 2.2.5 (with @ark/schema, @ark/util and arkregex), which 0.4.0 pins exactly.
  • pnpm-workspace.yaml: the minimumReleaseAgeExclude entries for the two typegen packages move to the new versions, and the four arktype packages are added. They were published on 2026-09-24 and clear the 7-day window on 2026-10-01, after which their entries can go.

Output change for gen types typescript

channels: {
  Row: { id: number; slug: string | null; get_messages: { ... } | null }
  ComputedFields: "get_messages"        // new; `never` when there are none
  Insert: { ... }
  Update: { ... }
  Relationships: [...]
}
Functions: {
  get_messages: {
    Args: {
      channel_row: Omit<                 // was the plain Row reference
        Database["public"]["Tables"]["channels"]["Row"],
        Database["public"]["Tables"]["channels"]["ComputedFields"]
      >
    }
    ...
  }
}

A function named like a column of the relation it takes is no longer added to that relation's Row; the previous output declared the key twice and did not compile. Unnamed row parameters keep the plain Row reference. Older postgrest-js versions ignore ComputedFields.

Linked issue

SDK-1986 (Linear). No GitHub issue.

  • The linked issue is open and carries the open-for-contribution label (or I'm a Supabase maintainer).

Checklist

Takes postgrest-typegen 0.4.0 through the registry. `gen types
typescript` now declares `ComputedFields` next to every table's and
view's `Row`, types named row parameters of functions as
`Omit<Row, ComputedFields>`, and no longer adds a function named like one
of the relation's columns to `Row`. postgrest-js reads `ComputedFields`
to leave computed fields out of `select('*')`.

postgrest-typegen 0.4.0 pins arktype 2.2.5, published inside the
minimumReleaseAge window, so its four packages join the exclusion list
next to the typegen entries.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

Both independent reviews reported no findings. Reading the changed files and surrounding code confirmed that the dependency versions, lockfile entries, and release-age exclusions are consistent. No concrete issues found; upstream package behavior was not independently verified.

Findings

No issues found.

Stats

Claude findings: 0 · Codex findings: 0 · Confirmed: 0 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

@avallete
avallete added this pull request to the merge queue Oct 5, 2026
Merged via the queue into develop with commit 51fceff Oct 5, 2026
37 checks passed
@avallete
avallete deleted the lukasklingsbo/bump-typegen-0.2.2 branch October 5, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants