File tree 5 files changed +10
-9
lines changed
5 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 27
27
"gatsby-core-utils" : " ^1.3.20" ,
28
28
"glob" : " ^7.1.6" ,
29
29
"lodash" : " ^4.17.20" ,
30
- "micromatch" : " ^3.1.10 "
30
+ "micromatch" : " ^4.0.2 "
31
31
},
32
32
"devDependencies" : {
33
33
"@babel/cli" : " ^7.11.6" ,
Original file line number Diff line number Diff line change 1
- import * as mm from "micromatch"
1
+ import { isMatch , Options as mmOptions } from "micromatch"
2
2
3
3
interface IPathIgnoreOptions {
4
4
patterns ?: string | ReadonlyArray < string >
5
- options ?: mm . Options
5
+ options ?: mmOptions
6
6
}
7
7
8
8
export function ignorePath (
@@ -13,7 +13,7 @@ export function ignorePath(
13
13
if ( ! ignore ) return false
14
14
const settings : {
15
15
patterns : string | ReadonlyArray < string >
16
- options : mm . Options
16
+ options : mmOptions
17
17
} = {
18
18
patterns : `` ,
19
19
options : { } ,
@@ -37,5 +37,5 @@ export function ignorePath(
37
37
settings . patterns = ignore . patterns
38
38
}
39
39
}
40
- return mm . any ( path , settings . patterns , settings . options )
40
+ return isMatch ( path , settings . patterns , settings . options )
41
41
}
Original file line number Diff line number Diff line change 1
1
import { parse } from "path"
2
- import * as mm from "micromatch"
2
+ import { isMatch } from "micromatch"
3
3
4
4
const tsDeclarationExtTest = / \. d \. t s x ? $ /
5
5
const jsonYamlExtTest = / \. ( j s o n | y a ? m l ) $ /
@@ -11,7 +11,7 @@ function isTestFile(filePath: string): boolean {
11
11
`**/(*.)+(spec|test).(js|ts|jsx|tsx)` ,
12
12
]
13
13
14
- return mm . isMatch ( filePath , testPatterns )
14
+ return isMatch ( filePath , testPatterns )
15
15
}
16
16
17
17
export function validatePath ( path : string ) : boolean {
Original file line number Diff line number Diff line change 102
102
"lodash" : " ^4.17.20" ,
103
103
"md5-file" : " ^3.2.3" ,
104
104
"meant" : " ^1.0.1" ,
105
- "micromatch" : " ^3.1.10 " ,
105
+ "micromatch" : " ^4.0.2 " ,
106
106
"mime" : " ^2.4.6" ,
107
107
"mini-css-extract-plugin" : " ^0.11.2" ,
108
108
"mitt" : " ^1.2.0" ,
161
161
"@babel/cli" : " ^7.11.6" ,
162
162
"@babel/runtime" : " ^7.11.2" ,
163
163
"@types/hapi__joi" : " ^16.0.12" ,
164
+ "@types/micromatch" : " ^4.0.1" ,
164
165
"@types/normalize-path" : " ^3.0.0" ,
165
166
"@types/reach__router" : " ^1.3.5" ,
166
167
"@types/semver" : " ^7.1.0" ,
Original file line number Diff line number Diff line change 1
1
import { IGatsbyNode } from "./types"
2
2
import { GatsbyGraphQLType } from "../.."
3
3
import { prepareRegex } from "../utils/prepare-regex"
4
- const { makeRe } = require ( ` micromatch` )
4
+ import { makeRe } from " micromatch"
5
5
import { getValueAt } from "../utils/get-value-at"
6
6
import _ from "lodash"
7
7
import {
You can’t perform that action at this time.
0 commit comments