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

chore: Update Jest to v29 #9454

Merged
merged 5 commits into from
May 1, 2024
Merged

chore: Update Jest to v29 #9454

merged 5 commits into from
May 1, 2024

Conversation

legobeat
Copy link
Contributor

@legobeat legobeat commented Apr 30, 2024

This is #7160 rebased on main with changes to snapshots reapplied


Jest has been updated to v29, along with related dependencies. This change comes with a number of new features, such as the new jest.replaceProperty() function.

The only breaking change affecting us is a change to the snapshot format. All snapshots have been updated.

See here for the migration guide: https://jest-archive-august-2023.netlify.app/docs/upgrading-to-jest29/

See here for a full list of changes: https://github.com/jestjs/jest/blob/main/CHANGELOG.md#2900

Description

Related issues

Blocked by

Blocking

Previously

Manual testing steps

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link

socket-security bot commented Apr 30, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/jest@29.5.12 Transitive: environment +4 564 kB types
npm/babel-jest@29.7.0 environment Transitive: eval, filesystem, network, shell, unsafe +37 1.15 MB simenb
npm/expect@29.7.0 Transitive: environment, unsafe +16 903 kB simenb
npm/jest-matcher-utils@29.7.0 None +5 563 kB simenb
npm/jest@29.7.0 Transitive: environment, eval, filesystem, network, shell, unsafe +103 3.65 MB simenb

🚮 Removed packages: npm/@types/jest@28.1.8, npm/babel-jest@28.1.3, npm/jest@28.1.3

View full report↗︎

Copy link

socket-security bot commented Apr 30, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/create-jest@29.7.0

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

@legobeat legobeat force-pushed the update-jest-to-v29-round2 branch from 836d88c to e26bbb5 Compare April 30, 2024 09:27
@legobeat
Copy link
Contributor Author

@SocketSecurity ignore npm/create-jest@29.7.0

new author ok

@legobeat legobeat force-pushed the update-jest-to-v29-round2 branch 4 times, most recently from b9c75c0 to a2f0d8f Compare April 30, 2024 10:10
@legobeat legobeat marked this pull request as ready for review April 30, 2024 10:11
@legobeat legobeat requested review from a team as code owners April 30, 2024 10:11
@legobeat legobeat requested review from Gudahtt and leotm April 30, 2024 10:12
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

package.json Outdated Show resolved Hide resolved
@leotm leotm self-requested a review April 30, 2024 10:35
leotm
leotm previously approved these changes Apr 30, 2024
@legobeat legobeat requested review from leotm and a team April 30, 2024 10:57
leotm
leotm previously approved these changes Apr 30, 2024
app/lib/ppom/ppom.html.js Outdated Show resolved Hide resolved
@legobeat legobeat force-pushed the update-jest-to-v29-round2 branch from d309ed4 to a2a8882 Compare May 1, 2024 19:29
@legobeat legobeat marked this pull request as ready for review May 1, 2024 19:29
Gudahtt
Gudahtt previously approved these changes May 1, 2024
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

Gudahtt and others added 5 commits May 1, 2024 19:44
Jest has been updated to v29, along with related dependencies. This
change comes with a number of new features, such as the new
`jest.replaceProperty()` function.

The only breaking change affecting us is a change to the snapshot
format. All snapshots have been updated.

See here for the migration guide: https://jest-archive-august-2023.netlify.app/docs/upgrading-to-jest29/

See here for a full list of changes: https://github.com/jestjs/jest/blob/main/CHANGELOG.md#2900
@legobeat legobeat force-pushed the update-jest-to-v29-round2 branch from 81d4edf to e34768d Compare May 1, 2024 19:44
@Gudahtt Gudahtt mentioned this pull request May 1, 2024
3 tasks
@legobeat legobeat requested a review from a team May 1, 2024 19:54
Copy link

sonarqubecloud bot commented May 1, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@legobeat legobeat requested a review from Gudahtt May 1, 2024 19:57
@Cal-L Cal-L added the Run Smoke E2E Triggers smoke e2e on Bitrise label May 1, 2024
Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

Code LGTM, let's wait until e2e passes to merge

Copy link
Contributor

github-actions bot commented May 1, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: e34768d
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/81d18c1d-ba85-49c0-a43b-85c1731bede8

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@Gudahtt Gudahtt merged commit c042d2c into main May 1, 2024
33 checks passed
@Gudahtt Gudahtt deleted the update-jest-to-v29-round2 branch May 1, 2024 21:40
@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2024
@metamaskbot metamaskbot added the release-7.23.0 Issue or pull request that will be included in release 7.23.0 label May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.23.0 Issue or pull request that will be included in release 7.23.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants