Commit d41602b
fix: handle //:name depends without crashing task graph
`//:name` refers to a task at the monorepo root config root, so the
`pathPattern` between `//` and `:` is empty. `dependsPatternMatchesTask`
short-circuits when that empty string exactly matches a root target's
config root, but for a target in a non-root config root it fell through
to `micromatch.isMatch(targetConfigRoot, "", ...)`, which picomatch
rejects with `Expected pattern to be a non-empty string`. That path is
hit for every non-root task while building the task graph, so a single
`//:name` depends entry took the whole graph webview down.
Skip the micromatch call for an empty pathPattern (the exact-match
branch already yields the correct answer for root-only targets), and
guard `matchesTaskName` against empty patterns defensively so any other
edge case that leaks an empty pattern returns `false` instead of
throwing.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 2571ed5 commit d41602b
2 files changed
Lines changed: 45 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
451 | 466 | | |
452 | 467 | | |
453 | 468 | | |
| |||
774 | 789 | | |
775 | 790 | | |
776 | 791 | | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
777 | 809 | | |
778 | 810 | | |
779 | 811 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| |||
461 | 466 | | |
462 | 467 | | |
463 | 468 | | |
| 469 | + | |
| 470 | + | |
464 | 471 | | |
465 | 472 | | |
466 | 473 | | |
467 | 474 | | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
473 | 481 | | |
474 | 482 | | |
475 | 483 | | |
| |||
0 commit comments