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

fix(jest-expo): update @jest/create-cache-key-function to match upstream #17240

Merged
merged 1 commit into from Apr 28, 2022

Conversation

SimenB
Copy link
Contributor

@SimenB SimenB commented Apr 28, 2022

Why

Matches upstream: https://github.com/facebook/react-native/blob/0c4c6ca319fa9dfb23d047e0c7d2a81281d1d8a3/package.json#L96

See facebook/react-native#30637

semi-related, thoughts on updating babel-jest to v27 (or even the fresh v28)?

How

GH Editor

Test Plan

CI?

Checklist

  • Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md).
  • This diff will work correctly for expo build (eg: updated @expo/xdl).
  • This diff will work correctly for expo prebuild & EAS Build (eg: updated a module plugin).

@SimenB SimenB requested a review from brentvatne as a code owner April 28, 2022 06:52
@SimenB SimenB changed the title fix(jest-expo): update @jest/create-cache-key-function to match upstream fix(jest-expo): update @jest/create-cache-key-function to match upstream Apr 28, 2022
@expo-bot expo-bot added the bot: passed checks ExpoBot has nothing to complain about label Apr 28, 2022
@Simek
Copy link
Collaborator

Simek commented Apr 28, 2022

I think that all Jest related dependencies should be updated at the same time, so we can avoid any issues and compatibility problems. In case of package you want to update, I think that will need to update at least babel-jest and jest to version 27, so the bump of this cache-key-function package have a sense. This package came from the Jest repository directly and its version is tied to other Jest packages.

However, updating jest-expo package dependencies to 27 could also mean that you need to update some other workspace parts, since we are using Jest package in few other places:

@SimenB
Copy link
Contributor Author

SimenB commented Apr 28, 2022

This PR is orthogonal to babel-jest (and other jest packages) bump - it works with both v26 and v27 (unlike v26 which only works with jest@<=26), and is the same version react-native uses (installing expo 45 beta pulls in both 26 and 27)

Copy link
Collaborator

@Simek Simek left a comment

Choose a reason for hiding this comment

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

I see, thank for the clarification! 👍

If updated package also support 26 by design, this should be safe to ship.

@Simek Simek merged commit 046171d into expo:main Apr 28, 2022
@SimenB SimenB deleted the patch-3 branch April 28, 2022 08:29
@SimenB
Copy link
Contributor Author

SimenB commented Apr 28, 2022

If updated package also support 26 by design, this should be safe to ship.

Yep 🙂

https://github.com/facebook/jest/blob/e2a452fdb808fae796222ce5e895b539c3a71a9b/packages/jest-create-cache-key-function/src/index.ts#L60-L62

@Simek Simek mentioned this pull request Apr 28, 2022
3 tasks
@chrisbobbe
Copy link
Contributor

chrisbobbe commented Apr 28, 2022

Thanks so much, both of you!! I'm always very happy to see jest-expo support newer Jest versions. 🙂

@SimenB
Copy link
Contributor Author

SimenB commented May 6, 2022

this was not included in v45, any particular reason? 🙂

@brentvatne
Copy link
Member

@SimenB - this was merged before the branch cutoff and it looks like we just missed cherrypicking it to our sdk-45 branch. i'll do this and republish today

@brentvatne
Copy link
Member

released jest-expo@45.0.1

@SimenB
Copy link
Contributor Author

SimenB commented May 7, 2022

Thanks!

@shamilovtim
Copy link

Updating a project to SDK 45. Just wanted to call out that it seems the transitive dependency stayed on babel-jest v26 despite the callouts here.

@brentvatne
Copy link
Member

@shamilovtim - using jest-expo@45.0.1?

@SimenB
Copy link
Contributor Author

SimenB commented Jun 10, 2022

Babel-jest is separate:

"babel-jest": "^26.6.3",

(Should probably be a peer dep like jest)


FWIW we use yarn resolutions at work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants