@mbdayo/react-native-upgrade
v1.0.0
Published
CLI tool to help upgrade React Native applications
Maintainers
Readme
@mbdayo/react-native-upgrade
A CLI tool to help React Native developers upgrade their apps with ease.
Features
- 🔍 Automatically detects your current React Native version
- 📋 Shows latest available versions
- 🔗 Provides direct links to upgrade-helper with your specific version diff
- 📝 Step-by-step upgrade instructions
- 📦 Optional automatic package.json update
Usage
No installation needed! Just run:
npx @mbdayo/react-native-upgradeOr use the shorter alias:
npx @mbdayo/react-native-upgrade rn-upgradeOr if you want to install it globally:
npm install -g @mbdayo/react-native-upgrade
react-native-upgrade
# or
rn-upgradeHow it works
- Reads your current
react-nativeversion frompackage.json - Fetches available React Native versions from npm
- Prompts you to select a target version
- Generates upgrade instructions with links to the upgrade helper
- Optionally updates your
package.json
Example
$ npx @mbdayo/react-native-upgrade
🚀 React Native Upgrade Tool
✅ Current version: 0.72.0
📦 Fetching available React Native versions...
📋 Latest available versions:
1. 0.76.1
2. 0.76.0
3. 0.75.4
4. 0.75.3
5. 0.75.2
🎯 Enter target version (or press Enter for latest): 0.76.1
📈 Upgrading from 0.72.0 to 0.76.1...
📝 Upgrade steps:
1. 🔗 View detailed changes:
https://react-native-community.github.io/upgrade-helper/?from=0.72.0&to=0.76.1
2. 📦 Update package.json dependencies:
npm install [email protected]
3. 📱 Update iOS dependencies:
cd ios && pod install && cd ..
4. 🤖 Clean Android build:
cd android && ./gradlew clean && cd ..
5. 🧹 Clean caches:
npx react-native start --reset-cacheProject Structure
@mbdayo/react-native-upgrade/
├── src/
│ └── index.ts # Main CLI logic
├── dist/ # Compiled output (generated)
├── package.json
├── tsconfig.json
└── README.mdDevelopment
Clone the repository
Install dependencies:
npm installBuild the project:
npm run buildTest locally:
npm link cd /path/to/your/react-native-project react-native-upgrade
Roadmap
- [ ] Automatic code transformation for common patterns
- [ ] Support for applying diffs automatically
- [ ] Breaking changes detection
- [ ] Third-party dependency compatibility checks
- [ ] Backup/rollback functionality
- [ ] Support for Expo managed workflow
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
Credits
This tool leverages the amazing work of:
