Repository navigation
fix: pin supabase CLI to workspace version, fix extensionless edge fn imports - #396
Merged
Merged
Conversation
… imports (#390) The `supa` wrapper (and its variants) invoked `pnpx supabase`, which resolves the latest published CLI instead of the version pinned in pnpm-workspace.yaml's catalog (2.102.0). CLI >=2.109 requires relative imports to include their extension, and ~15 edge functions imported `_shared/notifications/utils` without the `.ts` suffix — that worked under the pinned 2.102.0 but 503s under a newer CLI resolved by pnpx, breaking `functions serve` locally (surfacing as e.g. "No industries available" in onboarding). - Changed every `pnpx supabase` invocation in package.json's supa:* scripts to `pnpm exec supabase`, so they always resolve the workspace-pinned version. - Added the `.ts` extension to the extensionless `_shared/notifications/utils` imports across all 15 edge functions still missing it, so functions serve cleanly regardless of which CLI version is on PATH. Verified each import's relative path still resolves to the existing _shared/notifications/utils.ts file, and biome lint is clean on all changed files. Could not exercise `pnpm supa functions serve` live in this sandbox (no Docker daemon available for the local Supabase stack), so this hasn't been end-to-end verified against a running instance the way the issue's acceptance criteria describes. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Contributor
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 2da4bf3. |
This was referenced Jul 17, 2026
Closed
thinkclay
marked this pull request as ready for review
July 22, 2026 05:03
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.
Fixes #390.
Problem
The root
supascript (and itssupa:*variants) invokepnpx supabase, which resolves the latest published CLI instead of the version pinned inpnpm-workspace.yaml's catalog (supabase: 2.102.0). CLI ≥2.109 requires relative Deno imports to include their extension, and ~15 edge functions imported../_shared/notifications/utils(and deeper relative variants) without the.tssuffix. That resolved fine under the pinned 2.102.0, but under a newer CLI resolved viapnpxit fails at startup and every local API call 503s — downstream this surfaced as things like "No industries available" in onboarding.Fix
pnpx supabaseinvocation inpackage.json'ssupa/supa:*scripts topnpm exec supabase, so they always resolve the workspace-pinned version regardless of what's cached/latest on the machine..tsextension to the extensionless_shared/notifications/utilsimports across all 15 edge functions still missing it (the issue named 10; grepping turned up 15 total, includingpersona-webhook,notify-digest-daily, and the threewebhooks/{sms,email,push}functions with the same pattern at a different relative depth) — fixed all of them for consistency, sofunctions servedoesn't break again the next time the unpinned resolution path (or a future intentional CLI bump) is hit.Verification
../vs../../depending on nesting) still resolves to the existingpackages/supabase/functions/_shared/notifications/utils.tson disk.pnpm exec biome lintis clean on all 16 changed files.git diff package.jsontouches only the 13pnpx supabase→pnpm exec supabaseoccurrences — no other script changes.Not verified: this sandbox has no Docker daemon, so I couldn't actually run
pnpm supa functions serve apiand confirmGET /functions/v1/api/v1/industriesreturns 200 end-to-end, per the issue's acceptance criteria. The change is mechanical and the import paths are confirmed to resolve, but it hasn't been exercised against a live local Supabase stack.🤖 Opened by the Friday weekly-improvement routine.
Generated by Claude Code