All Projects → lucasbento → rn-update-deprecated-modules

lucasbento / rn-update-deprecated-modules

Licence: other
Codemod to update import declarations as per react-native > 0.59.x deprecations.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to rn-update-deprecated-modules

moment-dayjs-codemod
A Codemod to migrate from moment.js to day.js
Stars: ✭ 20 (-72.6%)
Mutual labels:  codemod
jscodeshift-typescript-example
jscodeshift typescript codemod example
Stars: ✭ 27 (-63.01%)
Mutual labels:  codemod
babel-codemod-example
An example of how to use babel as a codemod
Stars: ✭ 24 (-67.12%)
Mutual labels:  codemod
preact-codemod
🍧 Shave some bytes by using Preact.
Stars: ✭ 39 (-46.58%)
Mutual labels:  codemod
es5-function-to-class-codemod
📦 Transform ES5 Functions to ES6 Classes
Stars: ✭ 30 (-58.9%)
Mutual labels:  codemod
tscodeshift
tscodeshift is a toolkit for running codemods over multiple TS files
Stars: ✭ 49 (-32.88%)
Mutual labels:  codemod
async-await-codemod
Codemod script for migrating promise-based functions to use async/await syntax
Stars: ✭ 22 (-69.86%)
Mutual labels:  codemod
django-codemod
A tool to automatically fix Django deprecations.
Stars: ✭ 145 (+98.63%)
Mutual labels:  codemod
graphql2ts
Transform .graphql to graphql-js typescript
Stars: ✭ 41 (-43.84%)
Mutual labels:  codemod
taro2-to-3
让 Taro2 项目自动升级到 Taro3 项目⚒️。
Stars: ✭ 31 (-57.53%)
Mutual labels:  codemod
ember-angle-brackets-codemod
Codemod to convert curly braces syntax to angle brackets syntax
Stars: ✭ 58 (-20.55%)
Mutual labels:  codemod
babel-plugin-hyperscript-to-jsx
This plugin transforms react-hyperscript into JSX. Intended to be used as codemod.
Stars: ✭ 20 (-72.6%)
Mutual labels:  codemod
tiny-treeshaker
🌳🥤 A tiny codemod for tree shaking (experimental) 🌳🥤
Stars: ✭ 92 (+26.03%)
Mutual labels:  codemod
ember-data-codemod
A codemod to upgrade to new ember-data packages
Stars: ✭ 13 (-82.19%)
Mutual labels:  codemod
Ts Migrate
A tool to help migrate JavaScript code quickly and conveniently to TypeScript
Stars: ✭ 4,246 (+5716.44%)
Mutual labels:  codemod
codemod-v4
codemod cli for antd v4 upgrade
Stars: ✭ 84 (+15.07%)
Mutual labels:  codemod
font-awesome-codemod
⚙️ Font Awesome codemod script
Stars: ✭ 46 (-36.99%)
Mutual labels:  codemod
awesome-codemods
Awesome list of codemods for various languages, libraries and frameworks
Stars: ✭ 98 (+34.25%)
Mutual labels:  codemod

Update Deprecated Modules for React Native

This project is intended to be used from version 0.59.x which started the Lean Core Hub initiative that removes modules from the core of react-native into community-maintained projects.

Installation

Install jscodeshift:

yarn global add jscodeshift

This guide assumes that you have npx installed, if you wish to use this through a global installation just install it with yarn global add rn-update-deprecated-modules and remove npx from the example commands.

Usage

All arguments specified in jscodeshift are accepted.

npx rn-update-deprecated-modules myFile.js
npx rn-update-deprecated-modules myFile.js mySecondFile.js myThirdFile.js
npx rn-update-deprecated-modules app/**/*.js
npx rn-update-deprecated-modules app/**/*.tsx --parser=tsx

Example output

~/Documents/Projects/myNiceProject
❯ npx rn-update-deprecated-modules ./app/**/*.js
Processing 50 files...
Spawning 1 worker...
Sending 50 files to free worker...
All done.
Results:
0 errors
588 unmodified
0 skipped
1 ok
Time elapsed: 1.208seconds

 Import statements updated, run:
    yarn add @react-native-community/async-storage
-import { AsyncStorage, Image } from 'react-native';
+import { Image } from 'react-native';
+import AsyncStorage from '@react-native-community/async-storage';

License

MIT © Lucas Bento

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].