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

Tweak jest-haste-map watchman initial query to make it faster #6689

Merged
merged 4 commits into from
Jul 13, 2018

Conversation

rafeca
Copy link
Contributor

@rafeca rafeca commented Jul 13, 2018

Summary

This PR tweaks the initial watchman query that's used by jest-haste-map crawler to use the glob filter instead of the standard expression (more info).

This makes initial crawls using watchman considerably faster in some situations (specially when using jest internally at FB).

Test plan

Tested in our internal codebase (against Metro bundler). Checked that jest-haste-map gets initialized correctly both with and without its local cache.

@rafeca
Copy link
Contributor Author

rafeca commented Jul 13, 2018

Interestingly, the watchman tests didn't run when I execute yarn run jest on the repo. I'm going to fix them

@mjesun
Copy link
Contributor

mjesun commented Jul 13, 2018

You can run yarn typecheck and yarn lint --fix to get rid of all linting errors.

@codecov-io
Copy link

Codecov Report

Merging #6689 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #6689      +/-   ##
=========================================
+ Coverage   63.57%   63.6%   +0.02%     
=========================================
  Files         235     235              
  Lines        8992    8998       +6     
  Branches        4       3       -1     
=========================================
+ Hits         5717    5723       +6     
  Misses       3274    3274              
  Partials        1       1
Impacted Files Coverage Δ
packages/jest-haste-map/src/crawlers/watchman.js 94.87% <100%> (+0.42%) ⬆️

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 7eaeb03...1fe87e5. Read the comment docs.

@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 12, 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.

None yet

4 participants