Skip to content

Chaining pattern matches is failing to execute #415

@SeanWhipple

Description

@SeanWhipple

I have some files that have the following structure

file1.latest.min.js
file1.<filehash>.min.js
file2.latest.min.js
file2.<filehash>min.js
otherfile.latest.min.js
otherfile.<filehash>.min.js

I have the following pattern which works fine

'*.!(latest).min.+(js|css)+(.map|)'

But this pattern grabs all the files that don't have latest, including the ones that begin w/ otherfile. So I tried putting in another filter at the beginning

'+(file1|file2).!(latest).min.+(js|css)+(.map|)'

This however produces the following error

../node_modules/glob/sync.js:148
  var dotOk = this.dot || rawGlob.charAt(0) === '.'
                                  ^

TypeError: Cannot read property 'charAt' of undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions