Skip to content

Commit d722d00

Browse files
authored
chore(deps): update 'glob' to v8 (#4970)
1 parent 9f24d0d commit d722d00

File tree

7 files changed

+6584
-8431
lines changed

7 files changed

+6584
-8431
lines changed

lib/cli/collect-files.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ module.exports = ({
3535
try {
3636
const moreSpecFiles = castArray(lookupFiles(arg, extension, recursive))
3737
.filter(filename =>
38-
ignore.every(pattern => !minimatch(filename, pattern))
38+
ignore.every(
39+
pattern =>
40+
!minimatch(filename, pattern, {windowsPathsNoEscape: true})
41+
)
3942
)
4043
.map(filename => path.resolve(filename));
4144
return [...specFiles, ...moreSpecFiles];

lib/cli/lookup-files.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ module.exports = function lookupFiles(
7575

7676
if (!fs.existsSync(filepath)) {
7777
let pattern;
78-
if (glob.hasMagic(filepath)) {
78+
if (glob.hasMagic(filepath, {windowsPathsNoEscape: true})) {
7979
// Handle glob as is without extensions
8080
pattern = filepath;
8181
} else {
@@ -86,7 +86,12 @@ module.exports = function lookupFiles(
8686
pattern = `${filepath}+(${strExtensions})`;
8787
debug('looking for files using glob pattern: %s', pattern);
8888
}
89-
files.push(...glob.sync(pattern, {nodir: true}));
89+
files.push(
90+
...glob.sync(pattern, {
91+
nodir: true,
92+
windowsPathsNoEscape: true
93+
})
94+
);
9095
if (!files.length) {
9196
throw createNoFilesMatchPatternError(
9297
`Cannot find any files matching pattern "${filepath}"`,

0 commit comments

Comments
 (0)