-
-
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
Avoid reading files from Haste map if not needed #6667
Conversation
Changelog 😀 |
Codecov Report
@@ Coverage Diff @@
## master #6667 +/- ##
==========================================
+ Coverage 63.73% 63.77% +0.03%
==========================================
Files 235 235
Lines 8940 8943 +3
Branches 3 3
==========================================
+ Hits 5698 5703 +5
+ Misses 3241 3239 -2
Partials 1 1
Continue to review full report at Codecov.
|
This Pull Request updates dependency [jest](https://github.com/facebook/jest) from `v23.3.0` to `v23.4.0` <details> <summary>Release Notes</summary> ### [`v23.4.0`](https://github.com/facebook/jest/blob/master/CHANGELOG.md#​2340) [Compare Source](jestjs/jest@v23.3.0...v23.4.0) ##### Features - `[jest-haste-map]` Add `computeDependencies` flag to avoid opening files if not needed ([#​6667](`https://github.com/facebook/jest/pull/6667`)) - `[jest-runtime]` Support `require.resolve.paths` ([#​6471](`https://github.com/facebook/jest/pull/6471`)) - `[jest-runtime]` Support `paths` option for `require.resolve` ([#​6471](`https://github.com/facebook/jest/pull/6471`)) ##### Fixes - `[jest-runner]` Force parallel runs for watch mode, to avoid TTY freeze ([#​6647](`https://github.com/facebook/jest/pull/6647`)) - `[jest-cli]` properly reprint resolver errors in watch mode ([#​6407](`https://github.com/facebook/jest/pull/6407`)) - `[jest-cli]` Write configuration to stdout when the option was explicitly passed to Jest ([#​6447](`https://github.com/facebook/jest/pull/6447`)) - `[jest-cli]` Fix regression on non-matching suites ([6657](`https://github.com/facebook/jest/pull/6657`)) - `[jest-runtime]` Roll back `micromatch` version to prevent regression when matching files ([#​6661](`https://github.com/facebook/jest/pull/6661`)) --- </details> --- This PR has been generated by [Renovate Bot](https://renovatebot.com).
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. |
Metro also uses
jest-haste-map
, but there is no need to extract dependencies from it, since Metro has its own algorithms. This PR implements a boolean flag that avoids reading from the filesystem when we do not want to extract dependencies. The default is kept totrue
so it's backwards compatible.I also added specific tests for non-UTF-8 files, and for non-computed dependencies too. The argument is made mandatory at the worker level.