We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
convertPathToPattern
some\\@directory\\
Works fine on non-Windows, e.g. Mac. convertPathToPattern checks OS so reproduces only on Windows.
const resolved = path.join(require.resolve("@vitest/coverage-v8"), ".."); const pattern = fg.convertPathToPattern(resolved) + "/**"; const files = fg.globSync(pattern); // resolved: 'C:\\Users\\Ari\\git\\fastglob\\node_modules\\@vitest\\coverage-v8\\dist', // pattern: 'C:/Users/Ari/git/fastglob/node_modules\\@vitest/coverage-v8/dist/**', // ^^^ // files: []
// resolved: 'C:\\Users\\Ari\\git\\fastglob\\node_modules\\@vitest\\coverage-v8\\dist', // pattern: 'C:/Users/Ari/git/fastglob/node_modules/@vitest/coverage-v8/dist/**', // ^^ // files: [ // 'C:/Users/Ari/git/fastglob/node_modules/@vitest/coverage-v8/dist/index.d.ts', // 'C:/Users/Ari/git/fastglob/node_modules/@vitest/coverage-v8/dist/index.js', // 'C:/Users/Ari/git/fastglob/node_modules/@vitest/coverage-v8/dist/provider.d.ts', // 'C:/Users/Ari/git/fastglob/node_modules/@vitest/coverage-v8/dist/provider.js' // ]
npm init
npm i -D fast-glob @vitest/coverage-v8
index.js
node index.js
const path = require("node:path"); const fg = require("fast-glob"); const resolved = path.join(require.resolve("@vitest/coverage-v8"), ".."); const pattern = fg.convertPathToPattern(resolved) + "/**"; const files = fg.globSync(pattern); console.log({ resolved, pattern, files, fixedPattern: pattern.replaceAll("\\@", "/@"), fixed: fg.globSync(pattern.replaceAll("\\@", "/@")), });
The text was updated successfully, but these errors were encountered:
I see that https://github.com/mrmlnc/fast-glob?tab=readme-ov-file#convertpathtopatternpath does mention @ and backslash using as espace characters. In this case \\@ is not escape for @, right? In \@ it would be?
@
\\@
\@
Sorry, something went wrong.
fast-glob
No branches or pull requests
Environment
Works fine on non-Windows, e.g. Mac.
convertPathToPattern
checks OS so reproduces only on Windows.Actual behavior
Expected behavior
Steps to reproduce
npm init
npm i -D fast-glob @vitest/coverage-v8
index.js
node index.js
Code sample
The text was updated successfully, but these errors were encountered: