• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / mcp / 45366330996
98%

Build:
DEFAULT BRANCH: main
Ran 24 Nov 2026 09:46AM UTC
Jobs 1
Files 49
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Nov 2026 09:33AM UTC coverage: 98.159% (+0.001%) from 98.158%
45366330996

push

github

web-flow
fix(mcp-server-supabase): detect import maps uploaded with a ./ prefix (#591)

## 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_function`
looks for `deno.json`, `deno.jsonc`, or `import_map.json` in the
uploaded files. It compares names exactly, so `./deno.json` is not found
and the function deploys with no import map.

With `import_map.json` and `./deno.jsonc` uploaded together, it also
picks `import_map.json` instead of `./deno.jsonc`.

## What is the new behavior?

Names are compared after `normalize` from `node:path/posix`, so
`./deno.json` matches `deno.json`. The order stays `deno.json`, then
`deno.jsonc`, then `import_map.json`. Files in a subfolder, such as
`lib/deno.json`, are still not picked.

The function returns the name as the caller sent it (`./deno.json`, not
`deno.json`), so `import_map_path` is always the name of an uploaded
file.

## How to Review

1. **The fix**
   - `packages/mcp-server-supabase/src/edge-function.ts`
- `getDefaultImportMapPath` matches on the normalized name and returns
the original name. Its only caller is `deployEdgeFunction` in
`src/platform/api-platform.ts`, which is unchanged.

2. **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.json` not being picked.

**Review questions**

- [ ] Should the returned path be the name as sent (`./deno.json`) or
the cleaned name (`deno.json`)?
- [ ] `normalize` also turns `lib/../deno.json` into `deno.json`. Is
matching that fine, or should only a leading `./` be stripped?
- [ ] If both `deno.json` and `./deno.json` are uploaded, the one listed
first is returned. Is that fine?
- [ ] Is a helper test enough, or do you want a deploy test in
`src/server.functions.test.ts` too?

## Verification

From the repo root, on Node 24.22.3:

```bash
pn... (continued)

1342 of 1390 branches covered (96.55%)

Branch coverage included in aggregate %.

6 of 6 new or added lines in 1 file covered. (100.0%)

6282 of 6377 relevant lines covered (98.51%)

297.05 hits per line

Jobs
ID Job ID Ran Files Coverage
1 45366330996.1 24 Nov 2026 09:46AM UTC 49
98.16
GitHub Action Run
Source Files on build 45366330996
  • Tree
  • List 49
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #45366330996
  • 6b8f4dc5 on github
  • Prev Build on main (#45363703973)
  • Next Build on main (#45371955792)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc