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

[feature] Add package to create cache key functions #10587

Merged
merged 1 commit into from Oct 5, 2020

Conversation

cpojer
Copy link
Member

@cpojer cpojer commented Oct 5, 2020

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.

@@ -0,0 +1 @@
[]
Copy link
Member Author

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 :)

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing changelog entry 🙀

packages/jest-create-cache-key-function/src/index.ts Outdated Show resolved Hide resolved
packages/jest-create-cache-key-function/src/index.ts Outdated Show resolved Hide resolved
@cpojer
Copy link
Member Author

cpojer commented Oct 5, 2020

Updated with all the review comments addressed 👍

@jtbandes
Copy link

Hi, is there any documentation on how to use this package? The docs mention that it's recommended, but the package has no README.

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

4 participants