mirror of
https://github.com/dorny/paths-filter.git
synced 2025-06-23 10:58:03 +02:00
feat: Add support for multiple patterns when using file status
This adds support for using multiple patterns when checking for file status (added, modified, deleted) and as a result also allows you to use YAML anchors.
This commit is contained in:
@ -78,7 +78,7 @@ export class Filter {
|
||||
|
||||
if (typeof item === 'object') {
|
||||
return Object.entries(item).map(([key, pattern]) => {
|
||||
if (typeof key !== 'string' || typeof pattern !== 'string') {
|
||||
if (typeof key !== 'string' || (typeof pattern !== 'string' && !Array.isArray(pattern))) {
|
||||
this.throwInvalidFormatError(
|
||||
`Expected [key:string]= pattern:string, but [${key}:${typeof key}]= ${pattern}:${typeof pattern} found`
|
||||
)
|
||||
|
Reference in New Issue
Block a user