File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ class Restriction {
39
39
const negate = raw [ 0 ] === "!" && raw [ 1 ] !== "("
40
40
const pattern = negate ? raw . slice ( 1 ) : raw
41
41
const absolute = path . isAbsolute ( pattern )
42
- const matcher = new Minimatch ( pattern , { dot : true } )
42
+ const matcher = new Minimatch ( pattern , {
43
+ allowWindowsEscape : true ,
44
+ dot : true ,
45
+ } )
43
46
return { absolute, matcher, negate }
44
47
} )
45
48
Original file line number Diff line number Diff line change 4
4
*/
5
5
"use strict"
6
6
7
- const Minimatch = require ( "minimatch" ) . Minimatch
7
+ const { Minimatch } = require ( "minimatch" )
8
8
9
9
/**
10
10
* @param {any } x - An any value.
@@ -53,8 +53,12 @@ function toStringArray(x) {
53
53
* @returns {function } Created predicate function.
54
54
*/
55
55
function createMatch ( includePatterns , excludePatterns ) {
56
- const include = includePatterns . map ( pattern => new Minimatch ( pattern ) )
57
- const exclude = excludePatterns . map ( pattern => new Minimatch ( pattern ) )
56
+ const include = includePatterns . map (
57
+ pattern => new Minimatch ( pattern , { allowWindowsEscape : true } )
58
+ )
59
+ const exclude = excludePatterns . map (
60
+ pattern => new Minimatch ( pattern , { allowWindowsEscape : true } )
61
+ )
58
62
59
63
return filePath =>
60
64
include . some ( m => m . match ( filePath ) ) &&
You can’t perform that action at this time.
0 commit comments