Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@jumpn/react-native-jetifier
Advanced tools
A Java, Kotlin, or XML file with references to any Support class, now migrated to AndroidX.
All the jetificables under a dependency (npm package).
Rewrite Support classes to AndroidX equivalents.
The process of jetify a jetificable.
By the end of 2018, Android released Jetpack that comprises a full rewrite of the Support Library now called AndroidX.
To support this, they ask you to set the following properties with true
in your gradle.properties file:
android.useAndroidX=true
android.enableJetifier=true
In addition to this, you also need to require artifacts and import classes with their new names.
So you might be thinking, I've already done this on my App, so I still don't understand *"Why this package exists?", so let me answer this with another question:
What about your dependencies?
When we move to the world of React Native, all your dependencies instead of being libraries (JAR, AAR, and ZIP files
) as they are in a normal Android App, they are npm packages and live under the node_modules folder, so this means that unless all the React Native packages (including React Native itself) you are using have already migrated to AndroidX, you will have to manually rewrite all the Support classes usages and point them to their respective AndroidX equivalent as the Jetifier tool Android provides won't help you do this because it only handles Android libraries.
You can track the progress of React Native migration to AndroidX in this issue and I also recommend you to open an issue (if not already opened) and even better, submit a PR, to all your dependencies that haven't migrated yet.
This process should be fast (under 10 sec) on the first run (no index available) and super extremely fast (aprox 2 sec) on the following executions (index available).
$ npm install --save @jumpn/react-native-jetifier
$ yarn add @jumpn/react-native-jetifier
After having installed this package you will have an executable file called react-native-jetifier
available under your node_modules/.bin
folder.
Follow the following steps that will ensude your dependencies (npm packages) will be jetified even if you decide to remove or add some:
Execute react-native-jetifier
to jetify your dependencies (npm packages) and create the index (jetificableGroups.json
).
$ npx react-native-jetifier
$ yarn react-native-jetifier
Add it under the npm postinstall script in your package.json to keep your dependencies jetified when you remove or add some.
{
"scripts": {
"postinstall": "npx react-native-jetifier"
}
}
{
"scripts": {
"postinstall": "yarn react-native-jetifier"
}
}
jetificableGroups.json
) to your repositorySince all the jetificable paths are read from the index file (jetificableGroups.json
) to improve perfomance, it's highly recommended to commit it to your repository so on a clean clone react-native-jetifier
will use it instead of creating a new one.
I have been thinking for a while about the reasons you might want to do this and I found none, but well, if you want to unjetify your dependencies (npm packages) do the following:
$ npm install --force
$ yarn install --force
MIT :copyright: Jumpn Limited
FAQs
React Native Jetifier
The npm package @jumpn/react-native-jetifier receives a total of 408 weekly downloads. As such, @jumpn/react-native-jetifier popularity was classified as not popular.
We found that @jumpn/react-native-jetifier demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.