Skip to content

nodejs/userland-migrations

Node.js Userland Migrations

This repository contains codemods (automated migrations) for "userland" code. These are intended to facilitate adopting new features and upgrading source-code affected by breaking changes.

Usage

Caution

These scripts change source code. Commit any unsaved changes before running them. Failing to do so may ruin your day.

To run the transform scripts use codemod command below:

From registry

With the codemod CLI you can run a workflow from the Codemod Registry. Replace <recipe> with the name of the recipe you want to run:

npx codemod @nodejs/<recipe>

From source

With the codemod CLI you can run a workflow from a local file. First, clone this repository, then run the command below from your project directory:

git clone https://github.com/nodejs/userland-migrations.git
cd /path/to/your-project
npx codemod workflow run -w /path/to/folder/userland-migrations/recipes/<recipe>/workflow.yaml

See the codemod CLI doc for a full list of available commands.

Available codemods

You can find official Node.js codemods in the Codemod Registry.

Acknowledgments

We would like to extend our gratitude to the team at Codemod for providing their excellent tools and for their direct assistance with the Node.js project. Their support has been invaluable in making these migrations possible.

About

Handle breaking changes gracefully for a modern ecosystem.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors 12