Skip to content

fix(build): supabase:build has been failing on the Stripe apiVersion pin (#454) - #596

Merged
thinkclay merged 1 commit into
mainfrom
claude/fix-454-stripe-apiversion
Aug 12, 2026
Merged

thinkclay merged 1 commit into
mainfrom
claude/fix-454-stripe-apiversion

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Partially addresses #454 — the build-blocking half of it.

The problem

nx run supabase:build 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 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/supabase gets 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:

const STRIPE_API_VERSION = '2025-11-17.clover' as Stripe.LatestApiVersion

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.ts pins '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

…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]>
@thinkclay
thinkclay merged commit 257ccdb into main Aug 12, 2026
6 of 12 checks passed
@thinkclay
thinkclay deleted the claude/fix-454-stripe-apiversion branch August 12, 2026 02:56
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.

1 participant