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

onMatch with micromatch.not #203

Open
desfero opened this issue Jun 21, 2020 · 0 comments
Open

onMatch with micromatch.not #203

desfero opened this issue Jun 21, 2020 · 0 comments

Comments

@desfero
Copy link

desfero commented Jun 21, 2020

(Thanks for reporting an issue to micromatch! If you haven't already read the contributor guidelines, Please do that now, then proceed to fill out the details below.)

Please describe the minimum necessary steps to reproduce this issue:

When .not function is used then onMatch is called with matched items but in reality what's important with not is to match items that do not match the provided patterns

const matches = micromatch.not(
    ["/config/constants", "/e2e/utils", "/libs/HttpService"],
    ["/config/**/*", "/e2e/*"], 
    { onMatch: (...args) => { console.log(args) }}
)

Therefore in the above matches returned by micromatch.not do not match what onMatch is invoked with.

What is happening that shouldn't be?

onMatch is called with different items that are returned at the end from micromatch.not

What should be happening instead?

matches returned from micromatch.not should equal the items that are passed to onMatch calls.

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

No branches or pull requests

1 participant