Repository navigation
fix(test-discovery): keep +, $ and ^ literal in globs, and match everything with ** - #249
Merged
Merged
Conversation
…ything with ** globToRegex escaped only backslashes and dots, so `+`, `$` and `^` reached RegExp as operators. A declared input naming a Remix route such as app/routes/users.$id.tsx matched nothing and its tests were not selected, app/routes/_auth+/** missed remix-flat-routes folders, and c++/** threw. A bare ** also stayed within one path segment. Groups, classes and extglobs behave as before, matching picomatch. Signed-off-by: FredApps <[email protected]>
FredApps
commented
Nov 17, 2026
FredApps
left a comment
Contributor
Author
There was a problem hiding this comment.
Cross-review of 9106c17.
Checked:
- The fix matches #247.
+,$and^are escaped after the class and extglob placeholders are taken out, so[^b],(a|b)and?(x)keep working. A bare**matches every path.c++/**no longer throws. - The new test fails with
src/reverted (3 of 4 fail) and passes with the fix. The expected values follow picomatch.tests/repo/glob-regex-literals.test.tsis listed inrelease-files.json. The commit is DCO-signed. The branch is level with main. CI is green.
Fixed: nothing.
Still open: none here. The planner and research copies of the converter are #173/#174 and #178/#179, as the issue says.
…ffCI#215 The manifest is an unordered set, and the PRs listed above add their entries at the same line. Moving this entry one line away lets them merge in either order without a conflict. Signed-off-by: FredApps <[email protected]>
FredApps
marked this pull request as ready for review
November 18, 2026 01:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #247
globToRegexnow escapes+,$, and^outside a character class before the glob conversion, and a bare**compiles to a match-everything pattern. Character classes (including[^…]), groups and extglobs behave as before.Related: #174 and #179 fix the planner and research-matcher copies of the same converter.
Validation:
tests/repo/glob-regex-literals.test.ts: three cases fail onmain(the Remix route input among them), all pass here. Matches were checked against picomatch 4.npm run typecheck,npm test(1171 pass),npm run build,npm run audit:boundary.