rn-chk-new-arch
v1.1.2
Published
Check if libraries in a React Native project support the new architecture
Maintainers
Readme
Check New Architecture Support
This package checks if the libraries used in a React Native project support the new architecture.
It leverages the React Native Directory API to verify compatibility and, if not listed, analyzes the GitHub repository for any native dependencies.
Features
- Checks each library in
package.jsonto see if it supports the new architecture. - Uses React Native Directory API to fetch compatibility data.
- If the library isn't found, it attempts to locate the GitHub repository and analyze if the library is a full JavaScript implementation (indicating new architecture support).
Usage
Run the package in the root directory of your React Native project to check each library's compatibility with the new architecture:
npx rn-chk-new-arch3 libraries found
Checking libraries...
Library: react-navigation, supports new architecture: true
Library: axios, supports new architecture: false
Library: my-custom-lib, not found
...
--- Statistics ---
Total: 3 | Supported: 1 | Not Supported: 1 | Not Found: 1
```bash
Options
npx rn-chk-new-arch [options]
options:
--path
Path to the React Native project package.json file.
-group
Group libraries by their support (Supported, Not supported, Not found).
-s, --supported
Supported libraries
-ns, --not-supported
Not supported libraries
-nf, --not-found
Not found librariespath
Specify the path to the React Native project directory:
npx rn-chk-new-arch --path=/path/to/your/project/package.jsongroup
Group libraries by their support (Supported, Not supported, Not found)
npx rn-chk-new-arch --groupResult example
Supported Libraries:
@notifee/react-native
axios
react-navigation
Not Supported Libraries:
react-native-version-check
Not Found Libraries:
react-native-loggly-jslogger
@react-native/normalize-colorStatus filter
Filter libraries by their support (Supported, Not supported, Not found) You can combine filter
supported : -s or --supported
npx rn-chk-new-arch -snpx rn-chk-new-arch --supportedResult example
Library: axios, supports new architecture: true
Library: @notifee/react-native, supports new architecture: true
Library: react-navigation, supports new architecture: truenot supported : -ns or --not-supported
npx rn-chk-new-arch -nsnpx rn-chk-new-arch --not-supportedResult example
Library: react-native-version-check, supports new architecture: falsenot found : -nf or --not-found
npx rn-chk-new-arch -nfnpx rn-chk-new-arch --not-foundResult example
Library: react-native-loggly-jslogger, not found
Library: @react-native/normalize-color, not foundcombine group & filter
npx rn-chk-new-arch --group -s -nsResult example
Supported Libraries:
@notifee/react-native
axios
react-navigation
Not Supported Libraries:
react-native-version-check
Contributing
Contributions are welcome! If you'd like to improve the package or add new features, please fork the repository and create a pull request.
Test the library
npm run testDevelopment
To download and modify the code:
- Clone the repository:
git clone https://github.com/arochedy/react-native-check-new-archi.git- Install dependencies
npm run build- Compile the TypeScript code:
npm run build- Run the compiled code:
npm run startLicense
This project is licensed under the MIT License.
