Open mohammadalipak opened 2 years ago
Thanks for the heads up, I've got a working reproduction locally. Trying to figure out the fix.
From what I can tell this issue is likely in globby or somewhere lower but I can't tell why. Let me explain, sortier uses globby to perform all glob interpretations and when I debug the code I see the following:
// args = ['**/!(*.json|*.css)']
const files = globbySync(args);
// files = ['package.json', 'app/app.css', 'app/app.html', 'app/app.js']
Testing the glob in
Seems to return the correct list of files so I'm not sure why this is happening.
Also, it seems **/*.{json,css}
and **/*.(json|css)
works perfectly fine
I created https://github.com/k2snowman69/issue-sortier-1763/blob/main/app/globby.test.js just to express the issue with globby a bit better. This reproduces the environment described in this bug. I created a test that shows that
**
results in (3699)Not going to lie, I'm confused. This might be something to follow up on the globby library with.
A work around might be temporarily using the .sortierignore
file instead but i haven't tested this yet
Language
Typescript | JavaScript | CSS
Sample input source code
Expected output
Actual output (or error message)