-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Windows globby.sync no longer works for window's paths #130
Comments
Duplicate of #127 |
This is mentioned in the release notes: https://github.com/sindresorhus/globby/releases/tag/v10.0.0 |
Where in the release notes? This is all I see: Breaking: Enhancements: Fixes: |
Ahh you meant here |
Closing issue... will have to determine next steps on my own... |
If anyone finds this, this is the relevant part: https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows just using
|
Can you help me see where there is a problem with usage?
This can't find any matching files |
try to glob a specific file first. also you likely want to do the replace on the final path, looks like you've also got like a trailing , and no more glob patterns? let _path = path .join(process.cwd(), resolveApp('src') + '/containers/*/index.tsx') ;
//console.log(_path) is this right?? does resolveApp and process.cwd being joined truly work?
_path = _path.replace(/\\/g, '/');
globby.sync(_path); better suggestion? just use the const glob = require('globby');
const unixify = require('unixify');
function patternToFile(pattern) {
let _path = unixify(pattern);
return glob.sync(_path);
}
const files = patternToFile(`./containers/**/index.tsx`); |
- for "globby", candidate glob expressions must always be normalized to forward slashes - see <sindresorhus/globby#130> - see <https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows> @@ <https://archive.is/YUnk2#70.8%>
- for "globby", candidate glob expressions must always be normalized to forward slashes - see <sindresorhus/globby#130> - see <https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows> @@ <https://archive.is/YUnk2#70.8%>
- for "globby", candidate glob expressions must always be normalized to forward slashes - see <sindresorhus/globby#130> - see <https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows> @@ <https://archive.is/YUnk2#70.8%>
- for "globby", candidate glob expressions must always be normalized to forward slashes - see <sindresorhus/globby#130> - see <https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows> @@ <https://archive.is/YUnk2#70.8%>
dirname(import.meta) returns with \ on Windows, while globby, which uses fast-glob under the hood, does not treat as path delimiter. Thus upath is introduced to solve this issue. REF: sindresorhus/globby#130 REF: https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows
Recently updated from [email protected] -> [email protected] and I've found a difference in execution.
Note that this only happens on Windows. It does not happen on OSX or Linux
9.2.0
let fileList = sync("d:\Temporary\prettier\src***.js");
// fileList.length === 109
10.0.0
let fileList = sync("d:\Temporary\prettier\src***.js");
// fileList.length === 0
Expected:
fileList.length to be 109
The text was updated successfully, but these errors were encountered: