-
-
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
make retainAllFiles configurable #2554
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
@@ -213,7 +213,7 @@ class Runtime { | |||
platforms: config.haste.platforms || ['ios', 'android'], | |||
providesModuleNodeModules: config.haste.providesModuleNodeModules, | |||
resetCache: options && options.resetCache, | |||
retainAllFiles: false, | |||
retainAllFiles: config.haste.retainAllFiles, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to define retainAllFiles
as a optional member of HasteConfig
in types/Config
and fallback to false:
retainAllFiles: config.haste.retainAllFiles || false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made the changes. What do I need to do now?
Current coverage is 64.83% (diff: 100%)@@ master #2554 diff @@
==========================================
Files 125 125
Lines 4871 4871
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 3158 3158
Misses 1713 1713
Partials 0 0
|
It doesn't seem like this was added in all places. You need to add the type here: https://github.com/cpojer/jest/blob/master/types/Config.js#L15 and then let flow tell you how to flow (hah!) it through your code. Honestly, I'm still going back and forth on this. If we set this to true it can have significant slowdowns in Jest. I'd much rather have a way to whitelist certain node modules folders we know aren't going to be huge. :( |
I was under impression that there won't be significant change in speed as we set |
See #2796. |
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
makes retainAllFiles configurable so that it helps solve this issue in create-react-app