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

make retainAllFiles configurable #2554

Closed
wants to merge 2 commits into from
Closed

make retainAllFiles configurable #2554

wants to merge 2 commits into from

Conversation

sidoshi
Copy link

@sidoshi sidoshi commented Jan 10, 2017

Summary
makes retainAllFiles configurable so that it helps solve this issue in create-react-app

@facebook-github-bot
Copy link
Contributor

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.

@facebook-github-bot
Copy link
Contributor

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,
Copy link
Collaborator

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

Copy link
Author

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?

@codecov-io
Copy link

Current coverage is 64.83% (diff: 100%)

Merging #2554 into master will not change coverage

@@             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          

Powered by Codecov. Last update fa39ef8...a585612

@cpojer
Copy link
Member

cpojer commented Jan 14, 2017

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. :(

@sidoshi
Copy link
Author

sidoshi commented Jan 16, 2017

I was under impression that there won't be significant change in speed as we set testPathIgnorePatterns. But Whitelisting certain folders seems like a better approach if it slowdowns Jest.

@cpojer
Copy link
Member

cpojer commented Feb 27, 2017

See #2796.

@cpojer cpojer closed this Feb 27, 2017
@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 13, 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

5 participants