This repository contains a collection of JSCodeshift codemod scripts for migrating code that uses deprecated Node.js APIs.
npm install -g jscodeshift
git clone https://github.com/joyeecheung/node-dep-codemod.git
jscodeshift -t transforms/subsystem/codemod-name path/to/file/or/directory
Use the -d
option for a dry-run, -p
to print the output for
comparison. For more options run jscodeshift -h
.
jscodeshift -t transforms/buffer/buffer-constructor-to-buffer-alloc.js path/to/file/or/directory
jscodeshift -t transforms/buffer/buffer-constructor-to-buffer-from.js path/to/file/or/directory
A binary target that runs codemods by subsystems/DEPIDs