micromatch / micromatch/picomatch
default value of regex option is both true and false
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 135
- Avg merge
- 23h 38m
- Merged PRs (30d)
- 7
Description
If the regex option is not specified, the value is treated as true in some scenarios and false in others. Only by setting the option explicitly do you get consistent behavior.
Here's a case where the regex option defaults to true:
(a|b|c)+
//=> /^(?:(a|b|c)+)$/
Here's case where the regex option defaults to false:
(a|b|c)*
//=> /^(?:(a|b|c)[^/]*?\/?)$/
I'm willing to contribute a PR to address this inconsistency.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing both regex-option examples against the current picomatch behavior and trace the option handling that produces the different outputs. Done means the default behavior is consistent for both patterns, with regression coverage for the examples and explicit-option behavior preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100