Repository navigation
fix(build): supabase:build has been failing on the Stripe apiVersion pin (#454) - #596
Merged
Merged
Conversation
…pin (#454) `tsc --build` for the supabase project fails with seven copies of Type '"2025-11-17.clover"' is not assignable to type '"2026-02-25.clover"' [email protected] types `apiVersion` as `LatestApiVersion`, a literal of whatever version that SDK release shipped against, so pinning any earlier version is a type error even though the Stripe API supports pinning perfectly well. This is only visible when the nx cache misses. Any change under packages/supabase busts it and the build goes red, which is how it surfaced — it was not caught by a green prepush on an unrelated branch. Fixed as a type-only change: the runtime value stays '2025-11-17.clover' at all eight call sites. Moving the version Stripe is actually called with changes response shapes against a live payment provider; that belongs with the SDK upgrade evaluation in #454, not with unblocking the build. stripe-webhook/index.ts is left alone — it pins '2024-06-20' and does not currently type-error. Co-Authored-By: Claude Opus 5 <[email protected]>
This was referenced Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partially addresses #454 — the build-blocking half of it.
The problem
nx run supabase:buildfails with seven copies of:[email protected]typesapiVersionasLatestApiVersion— a literal pinned to whatever version that SDK release shipped against — so declaring any earlier version is a type error, even though pinning is a first-class Stripe feature.Why nobody noticed
It only shows up when the nx cache misses. A branch that touches nothing under
packages/supabasegets a cached green; the first change in that tree turns it red. I hit it while working on #587, and the failure has nothing to do with that change.The fix
Type-only. The runtime value stays
'2025-11-17.clover'at all eight call sites:Moving the version Stripe is actually called with changes response shapes against a live payment provider. That is a real decision with real blast radius and it belongs with the SDK-upgrade evaluation in #454 — not with unblocking a build. The comment at each site says so, so the next person does not "tidy" the cast away.
stripe-webhook/index.tspins'2024-06-20'and does not currently type-error, so it is untouched.Verification
nx run supabase:build— green (was 7 errors).pnpm prepush— passes; previously refused to stamp.🤖 Generated with Claude Code