Commit 89bbda9
committed
fix: support parent directory glob patterns in imports (closes #13)
The ignore package doesn't accept paths starting with "../". When glob
patterns like @../../**/*.rs were used, relative paths were calculated
from the agent file's directory, resulting in paths like "../../target/..."
which the ignore package rejected.
Fix:
- Add extractGlobBaseDir() to determine actual search directory from glob
- Calculate relative paths from glob's base directory, not agent file's
- Load .gitignore from the correct directory
Behavioral change: glob XML path attributes now show paths relative to
the glob's base directory (e.g., "a.ts" instead of "imports/glob-test/a.ts")1 parent 41a4dfb commit 89bbda9
File tree
3 files changed
+95
-12
lines changed- src
- __snapshots__
3 files changed
+95
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
274 | 322 | | |
275 | 323 | | |
276 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
655 | 681 | | |
656 | 682 | | |
657 | 683 | | |
| |||
661 | 687 | | |
662 | 688 | | |
663 | 689 | | |
664 | | - | |
665 | 690 | | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
670 | 694 | | |
671 | 695 | | |
672 | | - | |
| 696 | + | |
673 | 697 | | |
674 | 698 | | |
675 | | - | |
676 | | - | |
| 699 | + | |
| 700 | + | |
677 | 701 | | |
678 | 702 | | |
| 703 | + | |
679 | 704 | | |
680 | 705 | | |
681 | 706 | | |
682 | 707 | | |
683 | 708 | | |
684 | 709 | | |
685 | 710 | | |
686 | | - | |
687 | | - | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
688 | 723 | | |
689 | 724 | | |
690 | 725 | | |
| |||
0 commit comments