Commit 5deead9
committed
fix: improve ripgrep binary path resolution for bundled SDK
When the SDK is bundled and called from other packages during tests, the
ripgrep binary path resolution was failing because:
1. Caller's import.meta.url was passed to getBundledRgPath()
2. SDK tried to resolve vendor/ relative to the caller's location
3. This failed in workspace monorepo setups
Changes:
- SDK now uses its own import.meta.url as fallback when none provided
- Added distPath check for bundled SDK (dist/index.mjs → dist/vendor/)
- npm-app now calls getBundledRgPath() without passing import.meta.url
- This allows SDK to correctly locate vendor/ relative to itself
Fixes npm-app test failures where ripgrep binary couldn't be found.1 parent 6b5b0b0 commit 5deead9
2 files changed
+18
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | | - | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
58 | 73 | | |
59 | 74 | | |
60 | 75 | | |
| |||
0 commit comments