mirror of
https://gitea.com/actions/dorny-paths-filter.git
synced 2025-12-20 07:10:02 +00:00
Fix globbing, update metadata, update ncc (#4)
* Enable minimatch dot option It's not a default globbing behavior, however for our use-case is much more convenient to match those files. * Update README and package.json
This commit is contained in:
@@ -10,6 +10,10 @@ export default class Filter {
|
||||
this.throwInvalidFormatError()
|
||||
}
|
||||
|
||||
const opts: minimatch.IOptions = {
|
||||
dot: true
|
||||
}
|
||||
|
||||
for (const name of Object.keys(doc)) {
|
||||
const patterns = doc[name] as string[]
|
||||
if (!Array.isArray(patterns)) {
|
||||
@@ -18,7 +22,7 @@ export default class Filter {
|
||||
if (!patterns.every(x => typeof x === 'string')) {
|
||||
this.throwInvalidFormatError()
|
||||
}
|
||||
this.rules[name] = patterns.map(x => new minimatch.Minimatch(x))
|
||||
this.rules[name] = patterns.map(x => new minimatch.Minimatch(x, opts))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user