mrmlnc / fast-glob

:rocket: It's a very fast and efficient glob library for Node.js
MIT License
2.55k stars 110 forks source link

Regression in v3.3.1 #422

Closed fisker closed 12 months ago

fisker commented 1 year ago

Environment

Actual behavior

I have files

foo/bar.a
foo\/bar.a
# Note: The second dirname is `foo\`
> require('fast-glob').sync("foo@(\\\\)/**/{*.a,*.b}")
[] 
> require('fast-glob').sync("foo@(\\\\)/**/*")
[ 'foo\\/bar.a' ]
> require('fast-glob').sync("foo/**/*")
[ 'foo/bar.a' ]
> require('fast-glob').sync("foo/**/{*.a,*.b}")
[ 'foo/bar.a' ]

Expected behavior

Expect

require('fast-glob').sync("foo@(\\\\)/**/{*.a,*.b}")

to glob foo\/bar.a file, and previous version work as expected.

Steps to reproduce

N/A

Code sample

N/A

fisker commented 1 year ago

Just noticed, in previous version

require('fast-glob').sync("foo@(\\\\)/**/{*.a,*.b}")

works,

require('fast-glob').sync("foo@(\\\\)/{*.a,*.b}")

not work either.

mrmlnc commented 1 year ago

Fixed in the main branch and was backported to 3.x.x.

mrmlnc commented 12 months ago

https://github.com/mrmlnc/fast-glob/releases/tag/3.3.2