Repository navigation
fix(mcp-server-supabase): detect import maps uploaded with a ./ prefix - #591
Merged
barryroodt merged 1 commit intoNov 24, 2026
Merged
Conversation
barryroodt
approved these changes
Nov 24, 2026
barryroodt
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the clear write-up!
Merged
4 tasks
barryroodt
pushed a commit
that referenced
this pull request
Nov 26, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>mcp-utils: 0.11.1</summary> ## [0.11.1](mcp-utils-v0.11.0...mcp-utils-v0.11.1) (2026-11-26) ### Bug Fixes * **mcp-ui:** shared project card for create-project and create-branch ([#578](#578)) ([efe189f](efe189f)) </details> <details><summary>mcp-server-supabase: 0.20.0</summary> ## [0.20.0](mcp-server-supabase-v0.19.0...mcp-server-supabase-v0.20.0) (2026-11-26) ### Features * **debugging:** add project issues DEBUG-311 ([#546](#546)) ([01f8021](01f8021)) * **mcp-server-supabase:** add optional schemas parameter to generate_typescript_types ([#592](#592)) ([7532f53](7532f53)) ### Bug Fixes * **debugging:** link docs once per issue in get_issues ([#610](#610)) ([74801d8](74801d8)) * **mcp-server-supabase:** detect import maps uploaded with a ./ prefix ([#591](#591)) ([6b8f4dc](6b8f4dc)) * **mcp-server-supabase:** keep a declined or cancelled SQL confirmation final ([#581](#581)) ([03afe8e](03afe8e)) * **mcp-server-supabase:** match Studio's notebook row_limit and clarify skip and blank-input messages ([#593](#593)) ([ad07f1b](ad07f1b)) * **mcp-server-supabase:** skip cost confirmation for $0 projects on clients without forms ([#608](#608)) ([50cfc37](50cfc37)) * **mcp-server-supabase:** stop reusing a removed import map on edge function redeploy ([#588](#588)) ([56093a6](56093a6)) * **mcp-ui:** shared project card for create-project and create-branch ([#578](#578)) ([efe189f](efe189f)) * **mcp:** confirm UPDATEs without WHERE that follow a comment and set a dollar-quoted value ([#612](#612)) ([468907a](468907a)) * **mcp:** confirm UPDATEs without WHERE that use inheritance syntax ([#565](#565)) ([687b3ee](687b3ee)) * **mcp:** confirm UPDATEs without WHERE when a column name ends in where ([#557](#557)) ([57fa34b](57fa34b)) </details> --- 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>
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.
What kind of change does this PR introduce?
Bug fix.
What is the current behavior?
Fixes #590
On a first deploy with no
import_map_path,deploy_edge_functionlooks fordeno.json,deno.jsonc, orimport_map.jsonin the uploaded files. It compares names exactly, so./deno.jsonis not found and the function deploys with no import map.With
import_map.jsonand./deno.jsoncuploaded together, it also picksimport_map.jsoninstead of./deno.jsonc.What is the new behavior?
Names are compared after
normalizefromnode:path/posix, so./deno.jsonmatchesdeno.json. The order staysdeno.json, thendeno.jsonc, thenimport_map.json. Files in a subfolder, such aslib/deno.json, are still not picked.The function returns the name as the caller sent it (
./deno.json, notdeno.json), soimport_map_pathis always the name of an uploaded file.How to Review
The fix
packages/mcp-server-supabase/src/edge-function.tsgetDefaultImportMapPathmatches on the normalized name and returns the original name. Its only caller isdeployEdgeFunctioninsrc/platform/api-platform.ts, which is unchanged.Tests
packages/mcp-server-supabase/src/edge-function.test.ts./names for all three files, the order with./names, a mix of bare and./names, and./lib/deno.jsonnot being picked.Review questions
./deno.json) or the cleaned name (deno.json)?normalizealso turnslib/../deno.jsonintodeno.json. Is matching that fine, or should only a leading./be stripped?deno.jsonand./deno.jsonare uploaded, the one listed first is returned. Is that fine?src/server.functions.test.tstoo?Verification
From the repo root, on Node 24.22.3:
edge-function.tsreverted to main,src/edge-function.test.tshas 5 failed and 15 passed. The 5 failures are the new./cases.typecheckandformat:check: clean.Not tested: a deploy with this build to a hosted project. The tests use the repo's mock API.
Additional context
What hosted users see today, checked on 2026-11-21 on a test project through the hosted server at mcp.supabase.com: a first deploy of a new function sent
index.ts,greeting.ts, and./deno.json(itsimportsmapgreetingto./greeting.ts), with noimport_map_path. It returnedimport_map: falseand noimport_map_path. The hosted server runs different code from this repo'smainfor the Edge Function tools, so this shows the bug as users meet it. It does not test this branch.