Skip to content

fix(typegen): pin @supabase/postgrest-typegen to 0.2.5 - #222

Merged
spydon merged 2 commits into
mainfrom
lukasklingsbo/sdk-1963-typegen-pin-postgrest-typegen-0.2.5
Sep 25, 2026
Merged

spydon merged 2 commits into
mainfrom
lukasklingsbo/sdk-1963-typegen-pin-postgrest-typegen-0.2.5

Conversation

@spydon

@spydon spydon commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Why

postgrest-typegen 0.2.5 (#217, released in #220) is the first version whose src/ compiles under noUncheckedIndexedAccess. The Supabase CLI type-checks its dependencies from source through the bun exports condition, so with this pin the CLI can depend on @supabase/typegen alone and drop its direct, dist-pinned @supabase/postgrest-typegen dependency.

Second part of SDK-1963; the first part was #217.

What

  • Pin @supabase/postgrest-typegen to 0.2.5 and update bun.lock.
  • Add the consumer type-check that fix(postgrest-typegen): compile under noUncheckedIndexedAccess #217 deliberately left out of this package because it could not pass against 0.2.4: tsconfig.consumer.json extends @tsconfig/bun with customConditions: ["bun"] and includes src, wired up as bun run check-types:consumer and run in typegen-validate.yml. Because it resolves @supabase/postgrest-typegen to the pinned package's src/, it fails on a future pin bump whose source breaks under the CLI's compiler options.
  • Add @tsconfig/bun as a devDependency and document the command in CLAUDE.md and README.md.

Verification

  • bun run check-types, bun run check-types:consumer, bun run format-and-lint, bun run knip, bun run build pass.
  • bun run test: 47 tests pass.
  • Against the previous pin (0.2.4) the consumer check fails with 85 errors in node_modules/@supabase/postgrest-typegen/src/generation/*.ts, so the check is exercising the transitive source as intended.

Follow-up

Once the typegen release cut from this PR is on npm, the CLI can bump @supabase/typegen and remove the direct @supabase/postgrest-typegen devDependency, its minimumReleaseAgeExclude entry, the paths pin in apps/cli/tsconfig.types.json, the knip.jsonc ignoreDependencies entry, and the version-guard test in types.generator.unit.test.ts (follow-up to supabase/cli#6822).

0.2.5 is the first postgrest-typegen release whose src/ compiles under
noUncheckedIndexedAccess, so a consumer that type-checks dependencies from
source through the bun exports condition, like the Supabase CLI, can now
reach postgrest-typegen through this package alone.

Add the same consumer type-check postgrest-typegen gained in #217:
tsconfig.consumer.json extends @tsconfig/bun with customConditions: ["bun"]
and runs as check-types:consumer in CI, so a future pin bump that fails
the CLI's compiler options is caught here.

Refs SDK-1963
@spydon
spydon requested review from a team as code owners September 25, 2026 11:03
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 11ea75bb-60a8-4506-86f9-a92f456bba89

📥 Commits

Reviewing files that changed from the base of the PR and between e9835e5 and f7e1ad0.

⛔ Files ignored due to path filters (1)
  • packages/typegen/bun.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • .github/workflows/typegen-validate.yml
  • packages/typegen/CLAUDE.md
  • packages/typegen/README.md
  • packages/typegen/package.json
  • packages/typegen/tsconfig.consumer.json

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Developer Experience
    • Added a consumer-focused type check for the Typegen package, helping catch TypeScript issues that may appear when using it with Bun.
    • The check now runs as part of type validation and is documented alongside the package’s development commands.

Walkthrough

The typegen package adds a consumer TypeScript configuration and a check-types:consumer script. The check uses Bun package conditions and includes src. The validation workflow runs the new check after bun run check-types. The README and CLAUDE.md document the command. The @supabase/postgrest-typegen dependency is updated from 0.2.4 to 0.2.5.

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to f7e1a

The new consumer check is wired into validation, and the lockfile matches the pinned dependency version. No actionable merge risk is evident from the reviewed changes.

Architecture Summary

Architecture risk: 🔵 Low · up to f7e1a

The change affects 1 system.

Changed systems: packages/typegen

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — packages/typegen (library) was modified; 4 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in packages/typegen/CLAUDE.md: The Commands section adds check-types:consumer and documents its compiler configuration, Bun source-export conditions, coverage of the pinned postgrest-typegen source, and requirement to defer a failing pin bump until that package is fixed. Existing test and build command comments are realigned.
  • observed — Modified behavior in packages/typegen/README.md: The Development command list adds bun run check-types:consumer and aligns the existing commands’ comments and spacing; the documented test, type-check, lint, unused-code, and build commands remain.
  • observed — Modified behavior in packages/typegen/package.json: Added the check-types:consumer script to type-check using tsconfig.consumer.json.
  • observed — Modified behavior in packages/typegen/package.json: Updated the @supabase/postgrest-typegen dependency from 0.2.4 to 0.2.5.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@spydon
spydon enabled auto-merge (squash) September 25, 2026 11:13
@spydon
spydon merged commit ecca7f2 into main Sep 25, 2026
4 checks passed
@spydon
spydon deleted the lukasklingsbo/sdk-1963-typegen-pin-postgrest-typegen-0.2.5 branch September 25, 2026 11:33
spydon added a commit that referenced this pull request Sep 25, 2026
…en command comments (#223)

Documentation-only follow-up to #217 and #222. No code, workflow, or
configuration changes.

## What changed

- Root `CLAUDE.md`: the release notes for `release-typegen.yml` and
`release-postgrest-typegen.yml` now spell out what on-demand means.
release-please runs only on a manual `workflow_dispatch`, or on a push
that changes the package's manifest file, which happens only when a
release PR merges. Merging ordinary `fix:` or `feat:` commits into
`packages/typegen` or `packages/postgrest-typegen` opens no release PR
until someone dispatches the workflow.
- `packages/postgrest-typegen/CLAUDE.md`: re-align the comment column in
the Commands block. The `check-types:consumer` line added in #217 is
longer than the others, so every comment now starts at the same column
after it.

## Why

After #222 merged, no typegen release workflow run fired and no release
PR appeared. That was expected behavior from the manifest path filter,
but it was not obvious from the docs, so this records it. The typegen
release carrying the postgrest-typegen 0.2.5 pin is therefore waiting on
a manual dispatch.

## Notes for reviewers

This PR originally also passed `skip-github-pull-request` on push runs
of `release-typegen.yml`. That change was dropped because the existing
path filter already gives the described behavior, and it kept the two
release workflows identical apart from the package name.
spydon pushed a commit that referenced this pull request Sep 25, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.1.1](typegen/v0.1.0...typegen/v0.1.1)
(2026-09-25)


### Bug Fixes

* **typegen:** pin @supabase/postgrest-typegen to 0.2.5
([#222](#222))
([ecca7f2](ecca7f2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
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