Commit 470de91
authored
Windows: Update context directory regex to match Windows-style file patterns (#1014)
I have added tests, but here also a screenshot from Windows machine
correctly matching current directory from the caller:
<img width="1097" height="501" alt="Screenshot 2025-11-07 at 19 37 41"
src="https://github.com/user-attachments/assets/95e3f7e2-efd2-44f9-867e-6de54400c07a"
/>
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Enhances `matchFileDir` to parse Windows and file:// stack trace paths
and adds tests; include changeset for patch release.
>
> - **packages/js-sdk**:
> - **Template utils (`src/template/utils.ts`)**:
> - Update `matchFileDir` regex and normalization to support Windows
drive letters, backslashes, and `file:///` URIs; strip `:line:column`
and trailing `)`.
> - **Tests (`tests/template/utils/matchFileDir.test.ts`)**:
> - Add cases for Windows paths (with/without anonymous), `file:///`
URIs, and paths containing parentheses.
> - **Release**:
> - Add changeset (`.changeset/every-wolves-brake.md`) marking a patch
for `e2b`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
eb53033. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 56d16a8 commit 470de91
File tree
3 files changed
+90
-3
lines changed- .changeset
- packages/js-sdk
- src/template
- tests/template/utils
3 files changed
+90
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
190 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
191 | 194 | | |
192 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
193 | 207 | | |
194 | 208 | | |
195 | 209 | | |
| |||
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
| 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 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
0 commit comments