-
-
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
[feature] Add package to create cache key functions #10587
Conversation
@@ -0,0 +1 @@ | |||
[] |
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.
Note that an empty .watchmanconfig
on an FB-laptop will actually not work, and crashes everything. I'm making this update in this diff so that FB engineers can develop Jest in peace :)
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.
Missing changelog entry 🙀
Updated with all the review comments addressed 👍 |
Hi, is there any documentation on how to use this package? The docs mention that it's recommended, but the package has no README. |
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
Currently we use an
fbjs-scripts
package to create a cache-key function that our Jest transformers use. This is useful as it de-duplicates a bunch of work we'd otherwise have to do across repos and makes sure people don't run into stale caches, see https://github.com/facebook/fbjs/blob/master/packages/fbjs-scripts/jest/createCacheKeyFunction.js.However,
fbjs-scripts
is bad because it pulls in a ton of modules and it turns out within the React Native monorepo at FB, we only want this one module that doesn't have any dependencies. This PR adds this file as a standalone package to the Jest package, including tests.Test plan
Added a JavaScript test + types.