Fix extglob patterns matching valid paths and update tests. #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
isGlob
was currently matching things like@mypath
as a glob, but@mypath
being a perfectlyvalid path, even with
extglob
on, I think it shoud not match.Here is the bash documentation about this.
https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html
I updated to match
@(my|pattern)
as a glob, but not@mypath
. I did the same for paths with+
.This is actually causing an issue in chokidar (which relies implicitly on this through glob-parent),
as
path/to/@mydir
is not treated as it should be.Also, from
should.js
0.7,should.be.true
like matchers all became functions so I modified the tests,otherwise they would become noop as the version of should.js was not locked.
Thanks.