nodejs / nodejs/userland-migrations

CJS → ESM

Open
#341 6 comments 0 reactions 1 assignee View on GitHub

@AugustinMauroy is already working on this.

Since Jan 22, 2026.

Dominant language
TypeScript
Stars
85
Forks
55
Avg merge
3d 11h
Merged PRs (30d)
9

Description

Technical Design

Create a wrapper migration to orchestrate individual sub-migrations (eg inline require()s → await import() or import.sync() depending on parent context being sync or async).

This wrapper should handle:

  1. Running individual API migrations
  2. Update files using CJS-specific extension (.cjs.mjs, etc).
  3. Update package.json ("type": "commonjs""type": "module", etc).

I think we can release a 0.1.0 version with a subset:


[!IMPORTANT]
Each sub-task should have its own PR

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.