-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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: vendor micromatch
under @jest/micromatch
#8046
chore: vendor micromatch
under @jest/micromatch
#8046
Conversation
Browser build is failing because it can't find |
Thanks for doing this, I'll profile the performance of this when I have some time this week so we can better decide if it's worth it. |
So the bundled micromatch 3 is even better than micromatch 2. We really seem to have a problem with loading many small modules, which could also come from our custom require impl / module registry, given that a normal Node |
Way out of scope of fixing this regression, but it sounds like Jest may benefit from bundling in general. This article on performance of bundled vs. unbundled code is interesting: https://zeit.co/blog/ncc#faster-bootup |
I'm against bundling dependencies for a good number of reasons. The only reason I put forward vendoring |
Hi! Any ideas when this will be merged? |
The browser build is broken in this PR which needs to be fixed first. That said, I'm more in favor of waiting for micromatch@4 to come out. |
It can be fixed by adding |
I'm more afraid about it being a breaking change to use v2 (more specifically, going from 2 to 3/4 later is breaking) than the CVE. If CVEs stops people's build pipelines with no way to ignore specific dependencies (in this case, it's a development time one), they should fix their pipeline. That said, downgrading is, unless everybody strongly disagrees with me, not an option |
Tests failing linting because of license check. I'm not sure how that'd work; I don't think vendored stuff is supposed to have a Facebook license. |
@SimenB sooooo would you be fine with using this temporarily? In case micromatch 4 really does come out soon (and performs well) we don't really lose anything (this might not even be in a Jest release if it's really soon) but if it ends up taking longer we'll help people esp. with small projects a lot. |
@jeysal Can you provide instructions on how to benchmark it? I want to look into the root cause of the slowness & see if changes I made haven't already improved it. |
We just had a call about this, a quick summary for documentation purposes:
|
Looks like |
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. |
Summary
Proposal for temporary measure as discussed in #8032 (use a
rollup
'd version ofmicromatch@3
untilmicromatch@4
becomes available to avoid require's). Probably needs a license note somewhere.Test plan
Everything should work as it did.