get-react-native-diff
Generate a detailed React Native version upgrade diff, including dependency updates, iOS/Android config changes, native code modifications, and troubleshooting steps for smooth migration.
Instructions
Gets the React Native diff between the current version and the user provided version. This diff will show all changes needed to upgrade React Native, including:
Package.json dependencies and their versions
iOS configuration changes (Podfile, xcodeproj settings)
Android configuration (build.gradle, settings.gradle)
Project structure changes
Binary files that need to be updated
Template files modifications
Native code changes
Troubleshooting steps if any
If no fromVersion is provided, the current version from package.json will be used. The diff follows standard git diff format and should be carefully analyzed to:
Update all dependencies to compatible versions
Apply configuration changes while preserving custom settings and user defined code
Handle binary file updates appropriately
Maintain existing customizations in native code and ts/js files
Update build tools versions (Gradle, CocoaPods, etc) with the correct version from the diff using specific cmds
Preserve any local modifications to template files
Please add the end of the process give instruction on the troubleshooting steps if any(Please detect user's package manager and run the correct cmd):
DELETE Pod and Podfile.lock file in iOS folder
Run pod install to prevent errors in iOS folder
Run this cmd to update android binary ./gradlew wrapper --gradle-version {{CURRENT_GRADLE_VERSION_FROM_DIFF}} —distribution-type {{DISTRIBUTION_TYPE_FROM_DIFF}} in android folder
Run {{CURRENT_PACKAGE_MANAGER}} install to install the correct version of the dependencies
YOU MUST call get-react-native-stable-version tool to get the stable version of React Native before calling this tool.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
fromVersion | No | The version of React Native to get the diff from | |
toVersion | Yes | The version of React Native to get the diff to |