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(devDeps): bump metro and react-native #9280

Merged
merged 202 commits into from
Jul 22, 2024
Merged

chore(devDeps): bump metro and react-native #9280

merged 202 commits into from
Jul 22, 2024

Conversation

legobeat
Copy link
Contributor

@legobeat legobeat commented Apr 17, 2024

Description

Update react-native and metro to receive patches.

  • Update metro from 0.73 to 0.76
  • Migrate from metro-config to @react-native/metro-config
  • Update react-native from 0.71.15 to 0.72.14
    • Port patch
    • Remove hermes patch
  • Bump and unpin @react-native-community/ packages
  • Update @react-native-community/netinfo from 6.0.0 to ^9.5.0
  • Update @react-native-masked-view/masked-view
  • Upgrade to Gradle version 8.0.1 and Android SDK 33

React Native Upgrade
Android SDK Update

Related issues

Manual testing steps

Node environment must be 18.18.2
Supports Java version 17.0.10

  1. Check out branch
  2. Run yarn setup
  3. Run yarn watch
  4. Run yarn start:ios - wait for app to build on iOS simulator
  5. Run yarn start:android - wait for app to build Android emulator

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.

This comment was marked as off-topic.

Copy link

socket-security bot commented Apr 17, 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/@babel/[email protected], npm/@react-native-community/[email protected], npm/@react-native/[email protected], npm/[email protected], npm/[email protected]

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/[email protected] or ignore all packages with @SocketSecurity ignore-all

@legobeat legobeat changed the title chore(devDeps): bump metro from 0.73 to 0.76 chore(devDeps): bump metro and react-native Apr 17, 2024
@legobeat legobeat force-pushed the devdeps-metro branch 3 times, most recently from 72f0638 to fb8ade6 Compare April 17, 2024 09:46
@legobeat legobeat added the dependencies Pull requests that update a dependency file label Apr 17, 2024
@legobeat legobeat requested a review from leotm April 17, 2024 09:52
@legobeat legobeat added the DO-NOT-MERGE Pull requests that should not be merged label Apr 17, 2024
@legobeat legobeat force-pushed the devdeps-metro branch 4 times, most recently from f1927da to d1afb3b Compare April 19, 2024 20:23
@leotm leotm added needs-qa Any New Features that needs a full manual QA prior to being added to a release. needs-smoke-e2e labels Apr 22, 2024
package.json Outdated Show resolved Hide resolved
Copy link
Member

@leotm leotm left a comment

Choose a reason for hiding this comment

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

i did a brief check of reactnative.dev/docs/0.71/environment-setup vs reactnative.dev/docs/0.72/environment-setup

couldn't spot anything we need to update in our docs, but may have missed something cc @MetaMask/mobile-platform

nb: JDK 17 is required in RN v0.73+
nb: Android 14 (UpsideDownCake) SDK required in RN v0.73+

nb: Node 18+ required in RN v0.73+ (we're ahead on Node 20)

nb: babel.config.js: metro-react-native-babel-preset -> @react-native/babel-preset in RN v0.73+

nb: RN new experimental debugger preview RN v0.73+ to replace Flipper

@legobeat legobeat force-pushed the devdeps-metro branch 4 times, most recently from 68ec0bf to 11f423a Compare April 24, 2024 20:15
@legobeat legobeat mentioned this pull request Apr 24, 2024
7 tasks
package.json Outdated Show resolved Hide resolved
Copy link
Member

@leotm leotm left a comment

Choose a reason for hiding this comment

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

lgtm ^ thanks for reviewing with me @tommasini

@tommasini tommasini added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jul 22, 2024

This comment was marked as outdated.

@metamaskbot

This comment was marked as outdated.

@legobeat legobeat added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jul 22, 2024

This comment was marked as outdated.

@metamaskbot

This comment was marked as outdated.

@metamaskbot

This comment was marked as outdated.

Copy link

sonarcloud bot commented Jul 22, 2024

@tommasini tommasini added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jul 22, 2024
Copy link
Contributor

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: 067ba31
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/4ba40a2d-19b9-4a2b-befd-3727477dd38d

Note

  • This comment will auto-update when build completes
  • 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

@metamaskbot
Copy link
Collaborator

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 067ba31
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/4ba40a2d-19b9-4a2b-befd-3727477dd38d

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

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.

LGTM

@Cal-L
Copy link
Contributor

Cal-L commented Jul 22, 2024

Disabled CLA since Dan is OOO

@tommasini tommasini merged commit 4c8bce7 into main Jul 22, 2024
36 of 38 checks passed
@tommasini tommasini deleted the devdeps-metro branch July 22, 2024 21:40
@github-actions github-actions bot locked and limited conversation to collaborators Jul 22, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jul 22, 2024
@metamaskbot metamaskbot added the release-7.29.0 Issue or pull request that will be included in release 7.29.0 label Jul 22, 2024
android {
- compileSdkVersion 26
- buildToolsVersion "26.0.1"
+ compileSdkVersion 33
Copy link
Contributor Author

Choose a reason for hiding this comment

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

new file mode 100644
index 0000000..e717caf
--- /dev/null
+++ b/node_modules/react-native-aes-crypto-forked/android/build.gradle.orig
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This android/build.gradle.orig and below android/build.gradle.rej seem to be leftover from unsuccessful previous patch attempt. Addressed in #9540.

diff --git a/node_modules/@metamask/react-native-payments/android/build.gradle b/node_modules/@metamask/react-native-payments/android/build.gradle
index 0d066bd..02caf64 100644
--- a/node_modules/@metamask/react-native-payments/android/build.gradle
+++ b/node_modules/@metamask/react-native-payments/android/build.gradle
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will there be a corresponding update in https://github.com/MetaMask/react-native-payments to obviate the need to keep patching this package?

+ */
+ /*
if (this.stack) {
serialized.stack = this.stack;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Issue in @metamask/rpc-errors: MetaMask/rpc-errors#131

It does seem like a general issue to pass a potentially cyclic stack as "serialized" and that it would make sense for @metamask/rpc-errors to do some form of cycle-safe serialization of the stack - stop after recursing N levels for example?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file needs-smoke-e2e release-7.29.0 Issue or pull request that will be included in release 7.29.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform team-security
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.