mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
## Problem The `file-upload-storage` Edge Function imports `createClient` from `npm:supabase-js@2`. That unscoped package does not resolve, so Deno cannot load the example's dependencies: ```text error: Could not find npm package 'supabase-js' matching '2'. ``` ## Solution Import the official scoped v2 client, `npm:@supabase/supabase-js@2`, consistent with the other Edge Function examples. This changes one import and keeps the v2 major constraint. ## Review instructions 1. From `examples/edge-functions/supabase/functions/file-upload-storage`, run `deno cache --no-config index.ts`. 2. Confirm the complete dependency graph resolves with the corrected import. Validation completed in a disposable `denoland/deno:2.5.6` container: - Reproduced the original package-resolution failure with `deno cache --no-config npm:supabase-js@2`. - Successfully cached the actual corrected example and its dependency graph. - Imported `createClient`, constructed a client with placeholder settings, and verified its Storage upload method exists without making API calls. - Prettier 3.8.0 with the repository configuration and `git diff --check` passed. No real upload, deployed Edge Function test, full type check, or monorepo build was run. This PR only corrects dependency resolution. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md). - Docs authoring checklist: not applicable; no documentation topic was added or edited. AI assistance: this contribution was prepared with OpenAI Codex.