-
Notifications
You must be signed in to change notification settings - Fork 135
Description
With v3.2.12 the glob **/{!(*.d).mts,!(*.d).cts,*.{mjs,cjs,js}} used to select these files:
[
".cjs",
".cts",
".js",
".mjs",
".mts",
"a.mjs",
"ad.cts",
"ad.mts",
"a/.cjs",
"a/.cts",
"a/.js",
"a/.mjs",
"a/.mts",
"a/a.mjs",
"a/ad.cts",
"a/ad.mts",
]But now with v3.3.0 it only selects these files:
[
".cts",
".mts",
"a.mjs",
"ad.cts",
"ad.mts",
"a/.cts",
"a/.mts",
"a/a.mjs",
"a/ad.cts",
"a/ad.mts",
]This is breaking this test assertion in find-unused-exports, which uses fast-glob indirectly as a dependency of a dependency (globby):
When using a package.json field overrides I was able to determine that the specific cause for the changed behavior of the glob was the fast-glob update from v3.2.12 to v3.3.0:
{
"overrides": {
- "fast-glob": "3.2.12"
+ "fast-glob": "3.3.0"
}
}It took me a lot of work to figure out the glob originally, and I'm not really sure what I can do in find-unused-exports to workaround this unexpected issue. I can't pin a particular version of fast-glob that still works because it's a dependency of a dependency (globby). It would be fantastic if this could be resolved in a speedy fast-glob patch release, assuming I'm not doing something blatantly incorrect with in my glob I could update to a more correct version.
Environment
- OS Version: macOS v13.4
- Node.js Version: v20.4.0