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.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nodejs/userland-migrations/llms.txt
Use this file to discover all available pages before exploring further.
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 inrecipes/<recipe-name>/ with the following structure:
Development Setup
Available Scripts
The project provides several npm scripts for development:| Script | Command | Description |
|---|---|---|
| lint | npm run lint | Check code for linting issues |
| lint:fix | npm run lint:fix | Fix linting issues automatically |
| type-check | npm run type-check | Run TypeScript type checking |
| test | npm test | Run all tests across workspaces |
| pre-commit | npm run pre-commit | Run full check suite before committing |
Shared Utilities
Theutils/ workspace provides helpful utilities for building codemods:
- Import utilities:
getNodeImportStatements(),getNodeImportCalls() - Require utilities:
getNodeRequireCalls() - Binding resolution:
resolveBindingPath(),removeBinding() - Code cleanup:
removeLines()
Useful Resources
- Codemod CLI Reference
- Codemod Workflow Documentation
- Codemod Studio Documentation
- JS ast-grep (jssg) API Reference
- JS ast-grep Testing Utilities
- JS ast-grep Semantic Analysis
- ast-grep Documentation
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