Skip to content

fix: handle multiple non-nested braces and **/ in brace patterns#10

Merged
shulaoda merged 3 commits intooxc-project:mainfrom
dylan-conway:main
Feb 23, 2025
Merged

fix: handle multiple non-nested braces and **/ in brace patterns#10
shulaoda merged 3 commits intooxc-project:mainfrom
dylan-conway:main

Conversation

@dylan-conway
Copy link
Copy Markdown
Contributor

@dylan-conway dylan-conway commented Feb 22, 2025

Translated from oven-sh/bun#17516

  • fixes matching patterns with non-nested brace pairs and trailing characters.
  • fixes matching with **/ at the beginning of patterns in braces.

Minimized test cases:

match("{a,b}/c/{d,e}/**/*est.ts", "a/c/d/one/two/three.test.ts");
match("{**/a,**/b}", "b");

glob-match also fails the second test.

fixtures/input.txt is a list of files from vscode v1.97.0. The match-pattern-{n}.txt files were generated with minimatch.

@shulaoda shulaoda self-assigned this Feb 22, 2025
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 22, 2025

CodSpeed Performance Report

Merging #10 will not alter performance

Comparing dylan-conway:main (99231ee) with main (ca32266)

Summary

✅ 10 untouched benchmarks

@shulaoda shulaoda changed the title Fix matching multiple non-nested braces and **/ in brace patterns fix: handle multiple non-nested braces and **/ in brace patterns Feb 23, 2025
Copy link
Copy Markdown
Collaborator

@shulaoda shulaoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@shulaoda shulaoda merged commit c345eed into oxc-project:main Feb 23, 2025
3 checks passed
github-merge-queue bot pushed a commit to rolldown/rolldown that referenced this pull request Feb 23, 2025
### Description

Related to oxc-project/fast-glob#10

Fixed some matching issues.
graphite-app bot pushed a commit to oxc-project/oxc that referenced this pull request Feb 26, 2025
Related to oxc-project/fast-glob#10

Fixed some matching issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants