|
1 | 1 | import path, { posix } from 'node:path'; |
2 | 2 | import { type Options as FdirOptions, fdir } from 'fdir'; |
3 | | -import picomatch from 'picomatch'; |
| 3 | +import unmatch from 'unmatch'; |
4 | 4 | import { isDynamicPattern } from './utils.ts'; |
5 | 5 |
|
6 | 6 | export interface GlobOptions { |
@@ -177,21 +177,21 @@ function crawl(options: GlobOptions, cwd: string, sync: boolean) { |
177 | 177 |
|
178 | 178 | const processed = processPatterns(options, cwd, properties); |
179 | 179 |
|
180 | | - const unignoreMatcher = processed.unignore.length === 0 ? undefined : picomatch(processed.unignore) |
| 180 | + const unignoreMatcher = processed.unignore.length === 0 ? undefined : unmatch(processed.unignore) |
181 | 181 |
|
182 | | - const matcher = picomatch(processed.match, { |
| 182 | + const matcher = unmatch(processed.match, { |
183 | 183 | dot: options.dot, |
184 | 184 | nocase: options.caseSensitiveMatch === false, |
185 | 185 | ignore: processed.ignore, |
186 | | - onIgnore: unignoreMatcher ? (result => unignoreMatcher(result.output)) : undefined |
| 186 | + onIgnore: unignoreMatcher ? (result => unignoreMatcher(result.output) && unmatch.constants.UNIGNORE) : undefined |
187 | 187 | }); |
188 | 188 |
|
189 | | - const ignore = picomatch(processed.ignore, { |
| 189 | + const ignore = unmatch(processed.ignore, { |
190 | 190 | dot: options.dot, |
191 | 191 | nocase: options.caseSensitiveMatch === false |
192 | 192 | }); |
193 | 193 |
|
194 | | - const exclude = picomatch('*(../)**', { |
| 194 | + const exclude = unmatch('*(../)**', { |
195 | 195 | dot: true, |
196 | 196 | nocase: options.caseSensitiveMatch === false, |
197 | 197 | ignore: processed.transformed |
|
0 commit comments