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

chore: upgrade to micromatch v4 #8852

Merged
merged 5 commits into from
Aug 19, 2019
Merged

chore: upgrade to micromatch v4 #8852

merged 5 commits into from
Aug 19, 2019

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Aug 19, 2019

Summary

Hopefully this fixes some of out performance issues.

Test plan

Green CI

@SimenB
Copy link
Member Author

SimenB commented Aug 19, 2019

Lots of horrible failure 🙁 Anyone wanna dig into them? 😀

/cc @jeysal @thymikee

@thymikee
Copy link
Collaborator

FYI we bump into micromatch/micromatch#177 with negated matches.

@SimenB
Copy link
Member Author

SimenB commented Aug 19, 2019

Bah, that sucks. Thanks for digging into it 😀

@thymikee
Copy link
Collaborator

I'm working on a PR. As a workaround, we can use mm.default([filename], ...).length

@thymikee
Copy link
Collaborator

After some investigation and looking at the micromatch source, it looks like .some() does what it advertises in the description (but the example provided is wrong :D and the behavior seemingly changed since v3). However, because we allow negative patterns, we shouldn't be using .some() – we need to do a full pass on all globs with the default micromatch() to make sure the path we check passes every glob.

@SimenB
Copy link
Member Author

SimenB commented Aug 19, 2019

Ah, ok! That seems fair enough

@codecov-io
Copy link

codecov-io commented Aug 19, 2019

Codecov Report

❗ No coverage uploaded for pull request base (next@7d2be3c). Click here to learn what that means.
The diff coverage is 25%.

Impacted file tree graph

@@          Coverage Diff           @@
##             next   #8852   +/-   ##
======================================
  Coverage        ?   63.8%           
======================================
  Files           ?     274           
  Lines           ?   11576           
  Branches        ?    2841           
======================================
  Hits            ?    7386           
  Misses          ?    3560           
  Partials        ?     630
Impacted Files Coverage Δ
packages/jest-config/src/normalize.ts 79.87% <ø> (ø)
packages/jest-message-util/src/index.ts 68.34% <ø> (ø)
packages/jest-haste-map/src/lib/FSEventsWatcher.ts 10.9% <0%> (ø)
packages/jest-haste-map/src/HasteFS.ts 46.87% <0%> (ø)
packages/jest-transform/src/shouldInstrument.ts 88.23% <0%> (ø)
packages/jest-core/src/SearchSource.ts 64.04% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d2be3c...2da93b4. Read the comment docs.

@SimenB
Copy link
Member Author

SimenB commented Aug 19, 2019

Hey, circus passed! 😀

image

@thymikee thymikee merged commit 9336e74 into jestjs:next Aug 19, 2019
@SimenB SimenB deleted the micromatch-4 branch August 19, 2019 19:46
SimenB added a commit that referenced this pull request Aug 21, 2019
* chore: upgrade to micromatch v4

* fix anymatch namespace issue

* use match instead of some

* add explicit check for length 0

* more length boolean checks
SimenB added a commit that referenced this pull request Aug 22, 2019
* chore: upgrade to micromatch v4

* fix anymatch namespace issue

* use match instead of some

* add explicit check for length 0

* more length boolean checks
SimenB added a commit that referenced this pull request Aug 22, 2019
* chore: upgrade to micromatch v4

* fix anymatch namespace issue

* use match instead of some

* add explicit check for length 0

* more length boolean checks
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants