Commit 9136e10
committed
fix(pgai): resolve postgresai/cli export instead of package.json
The previous code tried to require.resolve("postgresai/package.json"),
but package.json is not listed in the postgresai package's exports field.
Node.js ESM resolution strictly enforces exports, causing the resolution
to fail when running via npx/bunx.
Now resolves "postgresai/cli" directly, which is properly exported and
matches the approach used by the postgres-ai wrapper package.1 parent 5bff76f commit 9136e10
1 file changed
Lines changed: 5 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
30 | 26 | | |
31 | 27 | | |
32 | 28 | | |
| |||
36 | 32 | | |
37 | 33 | | |
38 | 34 | | |
| 35 | + | |
39 | 36 | | |
40 | 37 | | |
41 | 38 | | |
| |||
48 | 45 | | |
49 | 46 | | |
50 | 47 | | |
51 | | - | |
52 | 48 | | |
53 | 49 | | |
54 | 50 | | |
| |||
0 commit comments