Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jetifier

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jetifier - npm Package Compare versions

Comparing version 1.6.1 to 1.6.2

5

CHANGELOG.md
# Changelog
## 1.6.2
- fix: check file exists before stat / fixes monorepos (#30) thanks @hampustagerud!
- docs(README): clarify usage task list - thanks @Twitchkidd!
## 1.6.1

@@ -4,0 +9,0 @@

2

package.json
{
"name": "jetifier",
"version": "1.6.1",
"version": "1.6.2",
"description": "jetifier from Android Studio, in npm package format",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,2 +0,1 @@

[![npm version](https://badge.fury.io/js/jetifier.svg)](http://badge.fury.io/js/jetifier)

@@ -11,9 +10,9 @@ [![npm total downloads](https://img.shields.io/npm/dt/jetifier.svg)](https://img.shields.io/npm/dt/jetifier.svg)

* [Why?](#do_you_need_this)
* [Convert to AndroidX](#to-jetify--convert-node_modules-dependencies-to-androidx)
* [Convert to Support Libraries](#to-reverse-jetify--convert-node_modules-dependencies-to-support-libraries)
* [Convert JAR/AAR/ZIP files](#usage-for-jarzipaar-files)
* [Troubleshooting](#troubleshooting)
* [Module Maintainers](#module-maintainers)
* [Contributing](#contributing)
- [Why?](#do_you_need_this)
- [Convert to AndroidX](#to-jetify--convert-node_modules-dependencies-to-androidx)
- [Convert to Support Libraries](#to-reverse-jetify--convert-node_modules-dependencies-to-support-libraries)
- [Convert JAR/AAR/ZIP files](#usage-for-jarzipaar-files)
- [Troubleshooting](#troubleshooting)
- [Module Maintainers](#module-maintainers)
- [Contributing](#contributing)

@@ -40,5 +39,5 @@ ## Do you need this?

So now you need to convert your app to AndroidX, but many of your react-native libraries ship native Java code and have not updated. How can you do it?
So now you need to convert your app to AndroidX, but many of your react-native libraries ship native Java code and have not updated. How is this done?
1. Convert your app to AndroidX via the [standard AndroidX migration](https://developer.android.com/jetpack/androidx/migrate)
1. First, use Android Studio's refactoring tool to convert your app re: the [Android developer docs](https://developer.android.com/jetpack/androidx/migrate)
1. `npm install --save-dev jetifier`

@@ -51,3 +50,3 @@ 1. `npx jetify`

*Inspiration:* this jetify command was based on [an idea](https://gist.github.com/janicduplessis/df9b5e3c2b2e23bbae713255bdb99f3c) from @janicduplessis - thank you Janic!
_Inspiration:_ this jetify command was based on [an idea](https://gist.github.com/janicduplessis/df9b5e3c2b2e23bbae713255bdb99f3c) from @janicduplessis - thank you Janic!

@@ -99,3 +98,3 @@ ### To reverse-jetify / convert node_modules dependencies to Support Libraries

1. Dependency version overrides. In your library, all of your dependencies and your SDK versions should have version overrides. These offer your users flexibility to pin the versions to pre-AndroidX or AndroidX versions. Example: <https://github.com/razorpay/react-native-razorpay/pull/201> and showing ability to be very specific: <https://github.com/react-native-community/react-native-camera/blob/master/android/build.gradle#L78>
1. AppCompat library *name* overrides - this may seem odd, but if you depend on the appcompat library itself, the whole name may need to be overridden to work correctly on RN0.60. Here is an example: <https://github.com/react-native-community/react-native-maps/commit/0c76619e8b4d591265348beb83f315ad05311670>
1. AppCompat library _name_ overrides - this may seem odd, but if you depend on the appcompat library itself, the whole name may need to be overridden to work correctly on RN0.60. Here is an example: <https://github.com/react-native-community/react-native-maps/commit/0c76619e8b4d591265348beb83f315ad05311670>
1. There may be unexpected problems like one of your dependencies is doing something wrong, but it's not really your fault - bottomsheet had that problem <https://github.com/acaziasoftcom/react-native-bottomsheet/pull/23> - keep an open mind about the fixes and there is probably something you can do without giving up on forwards and backwards compatibility during the transition

@@ -102,0 +101,0 @@ 1. Do not use wildcard imports of support library classes, but you don't need to convert to AndroidX to fix them. Just make a patch release with the concrete imports like react-native-navigation - <https://github.com/wix/react-native-navigation/pull/5218/files>

@@ -1,2 +0,2 @@

const { readFileSync, readdirSync, statSync } = require('fs');
const { existsSync, readFileSync, readdirSync, statSync } = require('fs');
const { join } = require('path');

@@ -16,9 +16,13 @@

for (let file of files) {
if (statSync(dir + '/' + file).isDirectory()) {
filesList = readDir(dir + '/' + file, filesList);
}
else {
if (file.endsWith('.java') || file.endsWith('.xml') || file.endsWith('.kt')) {
filesList.push(dir + '/' + file);
const filePath = join(dir, file);
if (existsSync(filePath)) {
if (statSync(filePath).isDirectory()) {
filesList = readDir(filePath, filesList);
}
else {
if (file.endsWith('.java') || file.endsWith('.xml') || file.endsWith('.kt')) {
filesList.push(filePath);
}
}
}

@@ -25,0 +29,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc