|
2 | 2 | import * as fsExtra from 'fs-extra'; |
3 | 3 | import * as path from 'path'; |
4 | 4 | import * as fs from 'fs'; |
5 | | -import * as picomatch from 'picomatch'; |
| 5 | +import * as micromatch from 'micromatch'; |
6 | 6 | import fastGlob = require("fast-glob") |
7 | 7 |
|
8 | 8 | export class Util { |
@@ -135,7 +135,7 @@ export class Util { |
135 | 135 | * Run a series of glob patterns, returning the matches in buckets corresponding to their pattern index. |
136 | 136 | */ |
137 | 137 | public async globAllByIndex(patterns: string[], cwd: string) { |
138 | | - //force all path separators to unit style |
| 138 | + //force all path separators to unix style |
139 | 139 | cwd = cwd.replace(/\\/g, '/'); |
140 | 140 |
|
141 | 141 | const globResults = patterns.map(async (pattern) => { |
@@ -179,7 +179,7 @@ export class Util { |
179 | 179 | private filterPaths(pattern: string, filesByIndex: string[][], cwd: string, stopIndex: number) { |
180 | 180 | //move the ! to the start of the string to negate the absolute path, replace windows slashes with unix ones |
181 | 181 | let negatedPatternAbsolute = '!' + path.posix.join(cwd, pattern.replace(/^!/, '')); |
182 | | - let filter = picomatch(negatedPatternAbsolute); |
| 182 | + let filter = micromatch.matcher(negatedPatternAbsolute); |
183 | 183 | for (let i = 0; i <= stopIndex; i++) { |
184 | 184 | if (filesByIndex[i]) { |
185 | 185 | //filter all matches by the specified pattern |
|
0 commit comments