99.10.0 • Published 4 years ago
@temporg/ui-codemods v99.10.0
category: packages
ui-codemods
The ui-codemods should make it easier to deal with API changes when upgrading RDS libraries.
Installation
The codemod scripts can be installed via the following command:
yarn add @temporg/ui-codemods
The configuration files are located in the config-rds package. This can be installed via the following command:
yarn add @temporg/config-rds
Executing Codemods Using rds-cli
All available codemods can also be executed using the rds-cli rds codemod
command. See rds-cli for more detailed documentation.
Updating Deprecated Props
This codemod helps you update your project by renaming props
that have had names changed (e.g., onReady
=> onOpen
).
jscodeshift -t node_modules/@temporg/ui-codemods/lib/updatePropNames.js <path> --config=node_modules/@temporg/config-rds/codemod-configs/v<version number ex. 5 or 6>/propNames.config.json
Updating Package Imports
This codemod helps you update your project by renaming imports
that have changed (e.g., rock-design-system
=> @temporg/<package name>
).
jscodeshift -t node_modules/@temporg/ui-codemods/lib/updateImports.js <path> --config=node_modules/@temporg/config-rds/codemod-configs/v<version number ex. 5 or 6>/imports.config.json