-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
feat(jest): bump jest to 29 in the template #34972
Conversation
Base commit: a63a4fa |
@@ -17,9 +17,9 @@ | |||
"@babel/core": "^7.12.9", | |||
"@babel/runtime": "^7.12.5", | |||
"@react-native-community/eslint-config": "^3.0.0", | |||
"babel-jest": "^26.6.3", | |||
"babel-jest": "^29.0.3", |
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 just released 29.2.0 fwiw. But I guess these versions mirror some internal version and should remain in sync with that?
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.
yeah I want to keep the versioning consistent across the entire repo
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.
makes sense 👍
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.
Keeping them consistent makes sense, but I would like to bump all of them to at least 29.1.0 before 0.71, because jest.now()
is important for properly mocking (legacy) fake timer animations.
I'll pull this in and then have a go at bumping internally across the monorepo. Should be smooth, right? 🤞
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.
hopefully! 😀
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.
it will :) just need a few mins to push a change in the other PR then they should be good to go 👍
@robhogan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
d2575e3
to
442ad98
Compare
Base commit: a63a4fa |
@robhogan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…34971) Summary: This PR is the follow up to the conversation started here by SimenB: react-native-community/discussions-and-proposals#509 Basically, we want to move RN to use its own custom environment so that we can tweak it going forward - this PR in fact only sets up the groundwork for that; robhogan mentioned that with this in place, Meta engineers can > iterate on it (with jest-environment-node as a starting point) against our internal product tests This is also connected to Rob's work to bring Jest 29 into the codebase #34724 and my "mirror" PR to bring template in main up to the same version (#34972) ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [General] [Changed] - move Jest config to use a custom react-native Jest env Pull Request resolved: #34971 Test Plan: Tested that `yarn test` in main works fine after the changes; CI and Meta's internal CI will also serve the purpose of verifying that it works (but there's no reason not to since it's still pretty much just relying on `node`). Reviewed By: huntie Differential Revision: D40379760 Pulled By: robhogan fbshipit-source-id: 2c6d0bc86d337fda9befce0799bda2f56cc4466c
This pull request was successfully merged by @kelset in 8f33753. When will my fix make it into a release? | Upcoming Releases |
🎉 |
I'm just a touch nervous about this because I'm seeing internal test breakages on 29.2.0 that were working on 29.0.3, which I think is down to jestjs/jest#13398. Still working to confirm, but @SimenB, let us know if we can help in any way with that. I'd be keen to bump the minimum template version to a release past that bug before the 0.71 cut (or alternatively, go to |
Yeah, currently reverting 👍 and adding regression tests |
@robhogan would you be able to apply jestjs/jest#13472 internally? |
Actually I'll release it (need a Node 19 fix). If it still doesn't work, a reproduction would be great 😀 |
Yes - works for us! |
lmk if there's anything I need to do on my end :) |
All good - just need to pull in #35014 before the 71 cut. |
Summary: X-link: facebook/react-native#35014 Pull Request resolved: #881 Following on from facebook/react-native#34724 and facebook/react-native#34972, this updates Jest to the latest version 29.2.1 across projects and in the OSS React Native new app template. Importantly this version includes the [new `jest.now()` API](jestjs/jest#13245), which will be useful for exposing internally consistent fake timer mocks of `requestAnimationFrame`, etc., in the new React Native Jest environment. Changelog: [General] [Changed] - Upgrade Jest in React Native template to ^29.2.1 Reviewed By: jacdebug Differential Revision: D40386349 fbshipit-source-id: 43f5a69cf546df09e2f02542ebf50130d65f0436
Summary: Pull Request resolved: #35014 X-link: facebook/metro#881 Following on from #34724 and #34972, this updates Jest to the latest version 29.2.1 across projects and in the OSS React Native new app template. Importantly this version includes the [new `jest.now()` API](jestjs/jest#13245), which will be useful for exposing internally consistent fake timer mocks of `requestAnimationFrame`, etc., in the new React Native Jest environment. Changelog: [General] [Changed] - Upgrade Jest in React Native template to ^29.2.1 Reviewed By: jacdebug Differential Revision: D40386349 fbshipit-source-id: 43f5a69cf546df09e2f02542ebf50130d65f0436
…acebook#34971) Summary: This PR is the follow up to the conversation started here by SimenB: react-native-community/discussions-and-proposals#509 Basically, we want to move RN to use its own custom environment so that we can tweak it going forward - this PR in fact only sets up the groundwork for that; robhogan mentioned that with this in place, Meta engineers can > iterate on it (with jest-environment-node as a starting point) against our internal product tests This is also connected to Rob's work to bring Jest 29 into the codebase facebook#34724 and my "mirror" PR to bring template in main up to the same version (facebook#34972) ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [General] [Changed] - move Jest config to use a custom react-native Jest env Pull Request resolved: facebook#34971 Test Plan: Tested that `yarn test` in main works fine after the changes; CI and Meta's internal CI will also serve the purpose of verifying that it works (but there's no reason not to since it's still pretty much just relying on `node`). Reviewed By: huntie Differential Revision: D40379760 Pulled By: robhogan fbshipit-source-id: 2c6d0bc86d337fda9befce0799bda2f56cc4466c
Summary: This PR is the follow up of facebook#34724 for the template; this way, we'll have version alignment and RN71 will use this. This wants to be merged along facebook#34971 ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [General] [Changed] - upgrade Jest in template to 29 Pull Request resolved: facebook#34972 Test Plan: Generated a test project via `yarn test-e2e-local -t RNTestProject` and then run `yarn test` in that project to verify that there's no regression. ✅ Reviewed By: huntie Differential Revision: D40379963 Pulled By: robhogan fbshipit-source-id: 618207ed6bf7921d13f0b6a9220dc52c9cf78b14
Summary: Pull Request resolved: facebook#35014 X-link: facebook/metro#881 Following on from facebook#34724 and facebook#34972, this updates Jest to the latest version 29.2.1 across projects and in the OSS React Native new app template. Importantly this version includes the [new `jest.now()` API](jestjs/jest#13245), which will be useful for exposing internally consistent fake timer mocks of `requestAnimationFrame`, etc., in the new React Native Jest environment. Changelog: [General] [Changed] - Upgrade Jest in React Native template to ^29.2.1 Reviewed By: jacdebug Differential Revision: D40386349 fbshipit-source-id: 43f5a69cf546df09e2f02542ebf50130d65f0436
Summary
This PR is the follow up of #34724 for the template; this way, we'll have version alignment and RN71 will use this.
This wants to be merged along #34971
Changelog
[General] [Changed] - upgrade Jest in template to 29
Test Plan
Generated a test project via
yarn test-e2e-local -t RNTestProject
and then runyarn test
in that project to verify that there's no regression. ✅