Skip to main content
Thank you for your interest in contributing to Node.js Userland Migrations! We value contributions from the community and want to make the process as smooth as possible.

Prerequisites

Before you begin, ensure you have current versions of:
  • Node.js
  • npm

Project Structure

Our codebase is organized as a monorepo using npm workspaces:

Recipe Structure

Each recipe resides in recipes/<recipe-name>/ with the following structure:

Development Setup

1

Clone the repository

2

Install dependencies

3

Run tests

Verify your setup by running the test suite:

Available Scripts

The project provides several npm scripts for development:

Shared Utilities

The utils/ workspace provides helpful utilities for building codemods:
  • Import utilities: getNodeImportStatements(), getNodeImportCalls()
  • Require utilities: getNodeRequireCalls()
  • Binding resolution: resolveBindingPath(), removeBinding()
  • Code cleanup: removeLines()
These utilities simplify common transformation patterns and handle edge cases.

Useful Resources

Next Steps

Creating Recipes

Learn how to create new migration recipes

Testing

Understand testing requirements and best practices

Development Workflow

Follow our development and PR process