Commit 5dc5cfc
authored
fix: replace npm:postgres with jsr:@oscar6echo/postgres for Supabase Edge Runtime compatibility (#552)
# Fix Supabase Edge Runtime compatibility with postgres client
This PR replaces `npm:postgres` with `jsr:@oscar6echo/postgres` fork to fix compatibility issues with Supabase Edge Runtime. The original npm package fails to parse database URLs in Deno edge environments, causing CONNECT_TIMEOUT errors.
## Changes:
- Replaced `npm:postgres@3.4.5` with `jsr:@oscar6echo/postgres@3.4.5-d` in all Deno configuration files
- Updated type imports from `Sql` to `postgres.Sql` throughout the codebase
- Added documentation in the README explaining why we're using a fork
- Removed deno.lock files which will be regenerated with the new dependency
The fork is functionally identical to postgres v3.4.5, with only the export syntax changed for Deno/JSR compatibility. This resolves the issue described in porsager/postgres#839.1 parent afe9e85 commit 5dc5cfc
File tree
19 files changed
+71
-532
lines changed- .changeset
- apps/demo/supabase/functions/article_flow_worker
- pkgs
- cli/supabase/functions/pgflow
- dsl/src/platforms
- edge-worker
- src
- core
- platform
- test
- supabase/functions
- tests/unit
19 files changed
+71
-532
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 0 additions & 46 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
211 | 221 | | |
212 | 222 | | |
213 | 223 | | |
0 commit comments