You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't seem to get globbySync to perform a proper negation glob. I'm fairly sure this is likely user error but I honestly can't wrap my head around it.
A good example of my confusion is the test "Negation first › pulls non-css or non-js files - curly" which runs const files = globbySync(`!**/*.{json,css}`);. This should match 3 files but unexpectedly I get 0 matches.
Further if I take this exact example to an online glob tester this same glob !**/*.{json,css} does seem to actually result in matching everything except for json or css files.
Do note that some of those negate unit tests are meant to fail... I was mostly just trying stuff to see if anything worked.
So any help here to understand why globbySync wouldn't return the correct negation result would be helpful, thanks!
In case it matters:
Node: v16.13.0
NPM: 7.12.1
OS: Windows 10
The text was updated successfully, but these errors were encountered:
I can't seem to get globbySync to perform a proper negation glob. I'm fairly sure this is likely user error but I honestly can't wrap my head around it.
I created a repo with an
app
folder to run globby sync on - https://github.com/k2snowman69/issue-sortier-1763/tree/main/appThen I created some tests to show a variety of tests - https://github.com/k2snowman69/issue-sortier-1763/blob/main/app/globby.test.js
Currently none of the negation tests succeed.
A good example of my confusion is the test "Negation first › pulls non-css or non-js files - curly" which runs
const files = globbySync(`!**/*.{json,css}`);
. This should match 3 files but unexpectedly I get 0 matches.Further if I take this exact example to an online glob tester this same glob
!**/*.{json,css}
does seem to actually result in matching everything except for json or css files.Do note that some of those negate unit tests are meant to fail... I was mostly just trying stuff to see if anything worked.
So any help here to understand why globbySync wouldn't return the correct negation result would be helpful, thanks!
In case it matters:
The text was updated successfully, but these errors were encountered: