@neo4j-ndl/codemod
v1.0.1
Published
This package provides a set of codemods for transforming codebases using @neo4j-ndl packages. Codemods are scripts used to automate code refactoring and migrations.
Downloads
382
Keywords
Readme
Codemod Package
This package provides a set of codemods for transforming codebases using @neo4j-ndl packages. Codemods are scripts used to automate code refactoring and migrations.
Table of Contents
Usage
To run a codemod run the following command and follow the steps in the cli tool:
npx @neo4j-ndl/codemod
Options
--force
: Force the transform to run even if there are uncommitted changes.--dry
: Run the transform in dry mode without making any changes.--print
: Print the transformed files to the console.--jscodeshift
: Additional arguments to pass to jscodeshift.
Transforms
The following transforms are available:
react-v2-to-v3
: Migrate React components from version 2 to version 3.
Developing
To contribute to this project, follow these steps:
Install dependencies:
pnpm install
Run the tests to ensure everything is working:
npm test
package.json Scripts
The following scripts are available in the package.json
:
build
: Compile the TypeScript code to JavaScript.pnpm run build
test
: Run the test suite.pnpm test