-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Document breaking changes for glob@8
#467
Comments
Looks like it's only Node >= 12 |
More than that, I believe... v7.2.1...v8.0.1 |
The minimatch 5 breaking change is not a breaking change for glob, because it's always coerced all slashes to But sure, I'll add a changelog. |
Weird, my project completely broke with version 8. I must have misunderstood something. |
I also had to change my patterns sent to On Windows, and mixing or joining path values with "child" glob patterns, it works quite fine directly with v7.2, while with v8.0 you are required to replace backslashes with forward-slashes (basic replace, or like using normalize-path or unixify packages).
Sorry for the ref, but fast-glob helped me understand with its
|
I'm trying upath as we speak to see if that would work in my case. For sure a heads up would've been nice, as it worked before and is broken now for "\\" (read: non-UNIX) style paths. |
Confirmed, using upath as a drop-in replacement for path works great along with glob. |
Also breaks stuff for me, probably due to windows paths as noted above. |
This caveat has been in the readme for a a decade now (added in 386f7e8). But if someone has a repro case showing something that worked in v7 and doesn't work in v8, I'd be happy to take a look. |
thanks suggest adding a note about the caveat in the changelog, as the behavior changes from 7.2.0 to 8.0.0? My issue occurs in https://github.com/abaplint/abaplint/blob/main/packages/cli/src/file_operations.ts, however I have not taken the caveat into account, and also not debugged it, so its probably an issue in my library. |
The update broke widows support for me. Here is a repro case: vega/ts-json-schema-generator#1221. |
Same issue here. On Windows, version 8.x.x doesn't find files in folder that works on 7.2.0 |
Upgrade to v8.0.1 breaks Mocha as well. |
Using backslashes was never explicitly supported by glob, see the windows portion of the README. My current solution is to resolve paths and then normalize them to forward slashes. See this example: // assuming the pattern is stored in string variable pattern, and that node's path module has been imported
const normalizedPattern = path.resolve(pattern).split(path.sep).join("/");
glob.sync(normalizedPattern); The workaround will most likely change soon, assuming the implementation of #468 lands. |
Not to pile on, but this broke linkinator as well: Very specifically it changed something with paths on windows. I'll dig in and try to get a more minimal repo. |
Just to repeat what was already said above:
A v8 minor will come with the ability to explicitly choose to use Since |
Apologies, I used "broke" a tad flippantly :) The PR to update the dependency caused CI to fail in a way that wasn't obvious in the changelog. Thanks for the detailed explanations! |
@JustinBeckwith No worries! I definitely knew what you meant. More just trying to forestall the next dozen comments complaining about glob breaking their programs 😅 |
I'd just like to say that's the most relatable comment I've ever seen on GitHub! 😅 Also - I appreciate the work you've done for the community, node and npm through the years. A major version breaking assumptions is not a huge issue. Thank you! |
Would it be possible to document these changes in the change log? |
You are 100% right, but why not mention it in the changelog? |
Same issue came up on Windows for version 7.2.2 also. Was working fine with 7.2.0 |
please upgrade to 7.2.3 |
@nicolas377 thanks! That worked. |
It looks like
glob@8
has been released, congratulations! We would love to upgrade, but before that, would it be possible to document the changes, particularly the breaking changes, for this release, in the change log? Thank you in advance.The text was updated successfully, but these errors were encountered: