Avoid reading files from Haste map if not needed#6667
Merged
mjesun merged 2 commits intojestjs:masterfrom Jul 10, 2018
mjesun:haste-map-avoid-reading-files
Merged
Avoid reading files from Haste map if not needed#6667mjesun merged 2 commits intojestjs:masterfrom mjesun:haste-map-avoid-reading-files
mjesun merged 2 commits intojestjs:masterfrom
mjesun:haste-map-avoid-reading-files
Conversation
Member
|
Changelog 😀 |
thymikee
approved these changes
Jul 10, 2018
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 was referenced Jul 10, 2018
calebeby
referenced
this pull request
in Pigmice2733/scouting-frontend
Jul 11, 2018
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 was referenced Jul 11, 2018
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 totrueso 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.