Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved support for numeric brace ranges #170

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

koopero
Copy link

@koopero koopero commented Jun 14, 2019

Description

This PR improves support for numeric brace ranges in micromatch globbing ( ie {1..9} ). The top-level methods micromatch, isMatch, makeRe and capture are modified to use the newly introduced braces module. New test cases have been introduced to cover these additions.

This PR also introduces some disabled test cases which cover errors in the upstream braces module, specifically bugs with conversion of zero-padded brace range to regex ( ie {000...200} ).

Since this functionality is already covered in docs, no changes have been made to README. Version has been bumped to 4.0.3, reflecting a patching of existing functionality.

@jonschlinkert
Copy link
Member

@koopero sorry for the late reply. I've been mulling this over. I might prefer a different approach to solving this in micromatch, but first I think it will help to get the problem fixed in underlying libs, so I'll review your other PRs, then we can come back to this one. Thanks for doing this!!!

@koopero
Copy link
Author

koopero commented Jul 3, 2019

@jonschlinkert No worries. I haven't had time for this collection of issues either. Thank you for your patience and hard work.

At the very least, I don't see merging this until we take care of the upstream issues in braces. As well, there is another bug in makeRe and capture, specifically handling of single char ? glob patterns.

I think you should consider how the capture and makeRe functions fit into micromatch vs other matching modules in your repertoire. To my mind, these features should work perfectly or not be included.

I am happy to help with improvements, but it would be helpful to have more context as to the scope, intentions and connections of modules with the micromatch network.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants