rn-compatibility-checker
v1.0.3
Published
CLI tool to check platform compatibility of React Native libraries
Maintainers
Readme
React Native Compatibility Checker
This NPM package is a command-line tool for checking platform compatibility of dependencies in React Native projects.
Features
- Automatically detects React Native dependencies from the project's package.json file
- Checks compatibility for iOS, Android, Web, Windows, Expo Go, and the New Architecture
- Provides detailed and summary reports
- Supports table and CSV output formats
- Identifies unmaintained packages
Installation
npm install -g rn-compatibility-checkerUsage
rn-compatibility-checker <path-to-package.json> [options]Options
-p, --platforms <platforms>: Platforms to check (comma-separated): ios,android,web,windows,expoGo,newArchitecture (default: "ios,android,web,windows")-d, --detailed: Show detailed output (default: false)-f, --format <format>: Output format: table,csv (default: "table")-v, --version: Show version information-h, --help: Show help information
Examples
Basic usage:
rn-compatibility-checker ./package.jsonChecking specific platforms:
rn-compatibility-checker ./package.json -p ios,android,web,windows,expoGoGetting a detailed report:
rn-compatibility-checker ./package.json -dGetting CSV formatted output:
rn-compatibility-checker ./package.json -f csvChecking compatibility for the Windows platform:
rn-compatibility-checker ./package.json -p windowsOutput Formats
Table Format (Default)
The table format displays results in an easy-to-read table in the console:
React Native Libraries Compatibility Report
==================================================
╔═════════════════════════════════╤══════════╤═════════╤═════╤═════════╤═════════╤═════╗
║ Package │ Version │ Found │ ios │ android │ windows │ web ║
╟─────────────────────────────────┼──────────┼─────────┼─────┼─────────┼─────────┼─────╢
║ react-native │ 0.72.6 │ ✓ │ ✓ │ ✓ │ ✓ │ ✓ ║
╟─────────────────────────────────┼──────────┼─────────┼─────┼─────────┼─────────┼─────╢
║ react-native-gesture-handler │ ^2.12.0 │ ✓ │ ✓ │ ✓ │ ✗ │ ✓ ║
╚═════════════════════════════════╧══════════╧═════════╧═════╧═════════╧═════════╧═════╝CSV Format
The CSV format displays results as comma-separated values that can be saved to a CSV file:
Package,Version,Found,ios,android,windows,web
react-native,0.72.6,Yes,Yes,Yes,Yes,Yes
react-native-gesture-handler,^2.12.0,Yes,Yes,Yes,No,YesThe CSV report is saved to compatibility-report.csv in the working directory.
How It Works
This tool uses data from the React Native Directory project to check platform compatibility of dependencies listed in your project's package.json file.
- Reads the project's package.json file
- Detects React Native-related dependencies
- Checks platform compatibility for each dependency
- Displays the results in the selected format
License
MIT
