Skip to content

A collection of JSCodeshift codemod scripts for migrating code that uses deprecated Node.js APIs

Notifications You must be signed in to change notification settings

joyeecheung/node-dep-codemod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Codemods for deprecated Node.js APIs

This repository contains a collection of JSCodeshift codemod scripts for migrating code that uses deprecated Node.js APIs.

Setup & Run

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.

Transforms

Buffers

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

TODO

A binary target that runs codemods by subsystems/DEPIDs

About

A collection of JSCodeshift codemod scripts for migrating code that uses deprecated Node.js APIs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages