-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking changes in v3.3.0 #405
Labels
Comments
It looks like both behaviours are incorrect. [
".cjs", // matched by **/*.cjs when the dot option is true
".cts", // matched by **/!(*.d).cts when the dot option is true
".js", // matched by **/*.js when the dot option is true
".mjs", // matched by **/*.mjs when the dot option is true
".mts", // matched by **/!(*.d).mts when the dot option is true
"a.mjs", // matched by **/*.mjs
"ad.cts", // matched by **/*.cjs
"ad.mts", // matched by **/!(*.d).mts
"a/.cjs", // matched by **/*.cjs when the dot option is true
"a/.cts", // matched by **/!(*.d).cts when the dot option is true
"a/.js", // matched by **/*.js when the dot option is true
"a/.mjs", // matched by **/*.mjs when the dot option is true
"a/.mts", // matched by **/!(*.d).mts when the dot option is true
"a/a.mjs", // matched by **/*.mjs
"a/ad.cts", // matched by **/!(*.d).cts
"a/ad.mts", // matched by **/!(*.d).mts
] Correct result: // echo **/{!(*.d).mts,!(*.d).cts,*.{mjs,cjs,js}}
[
"a.mjs",
"a/a.mjs",
"a/ad.cts",
"a/ad.mts",
"ad.cts",
"ad.mts"
] In the new version we are closer to the correct result, but it is still incorrect. Probably related issues:
Yeap… the root issue is here: Here the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With v3.2.12 the glob
**/{!(*.d).mts,!(*.d).cts,*.{mjs,cjs,js}}
used to select these files:But now with v3.3.0 it only selects these files:
This is breaking this test assertion in
find-unused-exports
, which usesfast-glob
indirectly as a dependency of a dependency (globby
):https://github.com/jaydenseric/find-unused-exports/blob/dd74e679e819c84e606d683f79d9ada1181a20b9/MODULE_GLOB.test.mjs#L15-L41
When using a
package.json
fieldoverrides
I was able to determine that the specific cause for the changed behavior of the glob was thefast-glob
update from v3.2.12 to v3.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 offast-glob
that still works because it's a dependency of a dependency (globby
). It would be fantastic if this could be resolved in a speedyfast-glob
patch release, assuming I'm not doing something blatantly incorrect with in my glob I could update to a more correct version.Environment
The text was updated successfully, but these errors were encountered: