Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Commit 60ffa3c

Browse files
committed
refactor: use micromatch, update deps
1 parent 8c4f7c6 commit 60ffa3c

File tree

4 files changed

+507
-44
lines changed

4 files changed

+507
-44
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@
3636
"enhanced-resolve": "^3.1.0",
3737
"loader-utils": "^1.1.0",
3838
"lodash": "^4.17.4",
39-
"minimatch": "^3.0.4",
39+
"micromatch": "^3.0.3",
4040
"mkdirp": "^0.5.1",
4141
"object-assign": "^4.1.1",
4242
"source-map-support": "^0.4.15"
4343
},
4444
"devDependencies": {
45-
"@types/chai": "^4.0.0",
45+
"@types/chai": "^4.0.1",
4646
"@types/colors": "^1.1.3",
47-
"@types/lodash": "^4.14.66",
48-
"@types/minimatch": "^2.0.29",
47+
"@types/lodash": "^4.14.67",
48+
"@types/micromatch": "^2.3.29",
4949
"@types/mocha": "^2.2.41",
50-
"@types/node": "^7.0.31",
50+
"@types/node": "^8.0.5",
5151
"@types/shelljs": "^0.7.2",
52-
"@types/sinon": "^2.3.1",
53-
"@types/webpack": "^2.2.15",
52+
"@types/sinon": "^2.3.2",
53+
"@types/webpack": "^3.0.1",
5454
"bluebird": "^3.5.0",
5555
"chai": "^4.0.2",
5656
"empty-module": "0.0.2",
@@ -62,7 +62,7 @@
6262
"standard-version": "^4.2.0",
6363
"temp": "^0.8.3",
6464
"tslint": "^5.4.3",
65-
"typescript": "^2.3.4",
65+
"typescript": "^2.4.1",
6666
"webpack": "^2.6.1"
6767
}
6868
}

src/__test__/react.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec(__filename, async function() {
2121
src('app.tsx', `
2222
import * as React from 'react'
2323
24-
export default class App extends React.Component<{title: string}, void> {
24+
export default class App extends React.Component<{title: string}, {}> {
2525
render() {
2626
return <div>{ this.props.title }</div>
2727
}

src/checker/runtime.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as ts from 'typescript';
22
import * as path from 'path';
3-
import * as minimatch from 'minimatch';
3+
import * as micromatch from 'micromatch';
44
import * as colors from 'colors';
55
import { findResultFor, toUnix } from '../helpers';
66
import {
@@ -443,9 +443,7 @@ function createChecker(receive: (cb: (msg: Req) => void) => void, send: (msg: Re
443443
if (loaderConfig.reportFiles) {
444444
filters.push(file => {
445445
const fileName = path.relative(context, file.fileName);
446-
return loaderConfig.reportFiles.every(pattern => {
447-
return minimatch(fileName, pattern);
448-
});
446+
return micromatch(fileName, loaderConfig.reportFiles).length > 0;
449447
});
450448
}
451449

0 commit comments

Comments
 (0)