File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ export async function globWithGitIgnore(
233
233
234
234
let hasNegatedPattern = false
235
235
for ( const p of ignores ) {
236
- if ( p . charCodeAt ( 0 ) === 33 ) {
236
+ if ( p . charCodeAt ( 0 ) === 33 /*'!'*/ ) {
237
237
hasNegatedPattern = true
238
238
break
239
239
}
@@ -252,8 +252,10 @@ export async function globWithGitIgnore(
252
252
return await glob ( patterns as string [ ] , globOptions )
253
253
}
254
254
255
- const ig = ignore ( ) . add ( [ ...ignores ] )
255
+ // Add support for negated "ignore" patterns which many globbing libraries,
256
+ // including 'fast-glob', 'globby', and 'tinyglobby', lack support for.
256
257
const filtered : string [ ] = [ ]
258
+ const ig = ignore ( ) . add ( [ ...ignores ] )
257
259
const stream = globStream (
258
260
patterns as string [ ] ,
259
261
globOptions ,
You can’t perform that action at this time.
0 commit comments