-
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
fix: update to @jest/create-cache-key-function@27 #30637
Conversation
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.
👍🏼
Unfortunate this hasn't made it in 6 months after I opened the PR... Anyways, 27 is released as |
Is there anyone we could ping to get a review of this PR? |
Just pinged some folks, let's hope they can prioritize this. In the meantime, @SimenB would you mind resolving the conflict? |
9a5bf2d
to
ed4eee6
Compare
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.
LGTM
@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: CircleCI's Windows executor currently ships with a pre-LTS release of Node v12, breaking our Windows jobs ([example](https://app.circleci.com/pipelines/github/facebook/react-native/9280/workflows/21e6e59c-d853-47a1-af62-1368c8ce10ce/jobs/203983)) following facebook#30637, ultimately due to jestjs/jest#10685 dropping support for non-LTS versions in the Node v12 release line. Luckily, the Windows executor [does ship with nvm](circleci/circleci-docs#3733) so we can use that to install a desired Node version. Rather than just pinning a later v12 release that is LTS, we align the Windows config with the one for non-Windows jobs (in the `nodelts` executor) by running against the latest available Node v14 release. Changelog: [Internal] Differential Revision: D28896581 fbshipit-source-id: bd9dd3eb1921f7ab28f05088db23a54cf1a6478d
Summary: Pull Request resolved: facebook#31656 CircleCI's Windows executor currently ships with a pre-LTS release of Node v12, breaking our Windows jobs ([example](https://app.circleci.com/pipelines/github/facebook/react-native/9280/workflows/21e6e59c-d853-47a1-af62-1368c8ce10ce/jobs/203983)) following facebook#30637, ultimately due to jestjs/jest#10685 dropping support for non-LTS versions in the Node v12 release line. Luckily, the Windows executor [does ship with nvm](circleci/circleci-docs#3733) so we can use that to install a desired Node version. Rather than just pinning a later v12 release that is LTS, we align the Windows config with the one for non-Windows jobs (in the `nodelts` executor) by running against the latest available Node v14 release. Changelog: [Internal] Differential Revision: D28896581 fbshipit-source-id: ed490bcdae80e736338c387e255191d8be1888cb
Summary: Pull Request resolved: facebook#31656 CircleCI's Windows executor currently ships with a pre-LTS release of Node v12, breaking our Windows jobs ([example](https://app.circleci.com/pipelines/github/facebook/react-native/9280/workflows/21e6e59c-d853-47a1-af62-1368c8ce10ce/jobs/203983)) following facebook#30637, ultimately due to jestjs/jest#10685 dropping support for non-LTS versions in the Node v12 release line. Luckily, the Windows executor [does ship with nvm](circleci/circleci-docs#3733) so we can use that to install a desired Node version. Rather than just pinning a later v12 release that is LTS, we align the Windows config with the one for non-Windows jobs (in the `nodelts` executor) by running against the latest available Node v14 release. Changelog: [Internal] Differential Revision: D28896581 fbshipit-source-id: cdcf9341e265e3bf28457d3e91c26d76a1dbb82a
Summary: Pull Request resolved: facebook#31656 CircleCI's Windows executor currently ships with a pre-LTS release of Node v12, breaking our Windows jobs ([example](https://app.circleci.com/pipelines/github/facebook/react-native/9280/workflows/21e6e59c-d853-47a1-af62-1368c8ce10ce/jobs/203983)) following facebook#30637, ultimately due to jestjs/jest#10685 dropping support for non-LTS versions in the Node v12 release line. Luckily, the Windows executor [does ship with nvm](circleci/circleci-docs#3733) so we can use that to install a desired Node version. Rather than just pinning a later v12 release that is LTS, we pin a v14 release that is currently the most recent LTS version. NOTE: The nvm on CircleCI is https://github.com/coreybutler/nvm-windows, not https://github.com/nvm-sh/nvm, and the two aren't interchangeable. [nvm-windows has no functionality to install the latest version of a release line](coreybutler/nvm-windows#156) so we're forced to specify an exact version, which will need to be bumped manually in the future. This isn't great, but IMO it's no worse than the current situation, where we use whichever stale version of Node happens to be bundled with the Windows CircleCI executor. Changelog: [Internal] Differential Revision: D28896581 fbshipit-source-id: abf3b56a256f89374add1c01ae6b99a8ba234112
Summary: Pull Request resolved: #31656 CircleCI's Windows executor currently ships with a pre-LTS release of Node v12, breaking our Windows jobs ([example](https://app.circleci.com/pipelines/github/facebook/react-native/9280/workflows/21e6e59c-d853-47a1-af62-1368c8ce10ce/jobs/203983)) following #30637, ultimately due to jestjs/jest#10685 dropping support for non-LTS versions in the Node v12 release line. Luckily, the Windows executor [does ship with nvm](circleci/circleci-docs#3733) so we can use that to install a desired Node version. Rather than just pinning a later v12 release that is LTS, we pin a v14 release that is currently the most recent LTS version. NOTE: The nvm on CircleCI is https://github.com/coreybutler/nvm-windows, not https://github.com/nvm-sh/nvm, and the two aren't interchangeable. [nvm-windows has no functionality to install the latest version of a release line](coreybutler/nvm-windows#156) so we're forced to specify an exact version, which will need to be bumped manually in the future. This isn't great, but IMO it's no worse than the current situation, where we use whichever stale version of Node happens to be bundled with the Windows CircleCI executor. Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D28896581 fbshipit-source-id: a412376cf36054de49efa49866fe60dd964567c5
Summary: API of Jest transformers is changing in Jest 27. The new version of `jest/create-cache-key-function` handles both current versions of the API and the upcoming 27 API. Ref: jestjs/jest#10834 <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Internal] [Changed] - Use version of `jest/create-cache-key-function` compatible with upcoming Jest v27 release Pull Request resolved: facebook#30637 Test Plan: I've tested locally that it works with both a `jest@latest` and `jest@next` release. Reviewed By: yungsters Differential Revision: D28807361 Pulled By: hramos fbshipit-source-id: 9d9ccb4d7f91b30bcbf3d28202bb74ce7499a91b
Summary: API of Jest transformers is changing in Jest 27. The new version of `jest/create-cache-key-function` handles both current versions of the API and the upcoming 27 API. Ref: jestjs/jest#10834 <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Internal] [Changed] - Use version of `jest/create-cache-key-function` compatible with upcoming Jest v27 release Pull Request resolved: #30637 Test Plan: I've tested locally that it works with both a `jest@latest` and `jest@next` release. Reviewed By: yungsters Differential Revision: D28807361 Pulled By: hramos fbshipit-source-id: 9d9ccb4d7f91b30bcbf3d28202bb74ce7499a91b
Related with facebook/react-native#30637
* ⬆️ Bump jest from 26.6.3 to 27.0.4 Bumps [jest](https://github.com/facebook/jest) from 26.6.3 to 27.0.4. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](jestjs/jest@v26.6.3...v27.0.4) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Fix Jest cache error Related with facebook/react-native#30637 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Carlos Cuesta <carloscuesta@me.com>
Summary: Pull Request resolved: facebook#31656 CircleCI's Windows executor currently ships with a pre-LTS release of Node v12, breaking our Windows jobs ([example](https://app.circleci.com/pipelines/github/facebook/react-native/9280/workflows/21e6e59c-d853-47a1-af62-1368c8ce10ce/jobs/203983)) following facebook#30637, ultimately due to jestjs/jest#10685 dropping support for non-LTS versions in the Node v12 release line. Luckily, the Windows executor [does ship with nvm](circleci/circleci-docs#3733) so we can use that to install a desired Node version. Rather than just pinning a later v12 release that is LTS, we pin a v14 release that is currently the most recent LTS version. NOTE: The nvm on CircleCI is https://github.com/coreybutler/nvm-windows, not https://github.com/nvm-sh/nvm, and the two aren't interchangeable. [nvm-windows has no functionality to install the latest version of a release line](coreybutler/nvm-windows#156) so we're forced to specify an exact version, which will need to be bumped manually in the future. This isn't great, but IMO it's no worse than the current situation, where we use whichever stale version of Node happens to be bundled with the Windows CircleCI executor. Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D28896581 fbshipit-source-id: a412376cf36054de49efa49866fe60dd964567c5
Facing same error with: Error occurs if the file has "Image" component which does "require" a local asset. |
Summary
API of Jest transformers is changing in Jest 27. The new version of
@jest/create-cache-key-function
handles both current versions of the API and the upcoming 27 API.Ref: jestjs/jest#10834
Changelog
[Internal] [Changed] - Use version of
@jest/create-cache-key-function
compatible with upcoming Jest v27 releaseTest Plan
I've tested locally that it works with both a
jest@latest
andjest@next
release.