Commit 1a4b0cf
Fix varlock binary resolution for monorepo sub-packages (#547)
* Initial plan
* Fix monorepo binary resolution in varlock/auto-load
- Extract findVarlockBin() helper that walks up without premature throw
when node_modules/.bin exists but lacks varlock (monorepo scenario)
- Add callerDir option to execSyncVarlock for additional search start point
- auto-load.ts passes import.meta.dirname as callerDir so binary search
starts from inside the varlock package itself in node_modules
Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/b32f0fb8-9a46-4a26-9f47-8ec85420b88c
Co-authored-by: philmillman <3722211+philmillman@users.noreply.github.com>
* Fix import.meta.dirname fallback and Windows binary name
- Add fallback to `new URL('.', import.meta.url).pathname` for older
Node versions where `import.meta.dirname` is undefined
- Use `varlock.exe` on Windows when searching node_modules/.bin
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: philmillman <3722211+philmillman@users.noreply.github.com>
Co-authored-by: Theo Ephraim <theo@dmno.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 0c27ed1 commit 1a4b0cf
3 files changed
Lines changed: 66 additions & 20 deletions
File tree
- .changeset
- packages/varlock/src
- lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
14 | 38 | | |
15 | 39 | | |
16 | 40 | | |
| |||
22 | 46 | | |
23 | 47 | | |
24 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
25 | 56 | | |
26 | 57 | | |
27 | 58 | | |
| |||
41 | 72 | | |
42 | 73 | | |
43 | 74 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
60 | 93 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 94 | | |
66 | 95 | | |
67 | 96 | | |
| |||
0 commit comments