Skip to content

feat(learn/userland-migrations): add intro #7764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

JakobJingleheimer
Copy link
Member

Description

Validation

Related Issues

Resolves #7267

Check List

  • I don't use pnpm

@Copilot Copilot AI review requested due to automatic review settings May 20, 2025 20:51
@JakobJingleheimer JakobJingleheimer added the content Issues/pr concerning content label May 20, 2025
@JakobJingleheimer JakobJingleheimer requested a review from a team as a code owner May 20, 2025 20:51
Copy link

vercel bot commented May 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview May 22, 2025 8:06am

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new introductory documentation page for Node.js userland migrations.

  • Introduces a new markdown page with an overview of userland migrations.
  • Provides code examples demonstrating how to run a migration and the resulting source modifications.

@codecov-commenter
Copy link

codecov-commenter commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.40%. Comparing base (232e7f1) to head (3655407).
Report is 4 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7764      +/-   ##
==========================================
+ Coverage   75.10%   75.40%   +0.29%     
==========================================
  Files          98       96       -2     
  Lines        7914     7867      -47     
  Branches      196      192       -4     
==========================================
- Hits         5944     5932      -12     
+ Misses       1969     1934      -35     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

JakobJingleheimer and others added 2 commits May 20, 2025 23:02

# Userland Migrations

Node.js provides migrations for "userland" code to facilitate adoption of new features and upgrading source-code affected by breaking changes. These are done in collaboration with [`codemod`](https://www.codemod.com), who also work with other major projects like Next.js, React, and Tailwind. Node.js's migrations live in the [`github://nodejs/userland-migrations`](https://github.com/nodejs/userland-migrations) repository and are overseen by the [`@userland-migrations`](https://github.com/orgs/nodejs/teams/userland-migrations) team.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "userland" code?

(I mean, I know what it is, but does the user?)


Node.js provides migrations for "userland" code to facilitate adoption of new features and upgrading source-code affected by breaking changes. These are done in collaboration with [`codemod`](https://www.codemod.com), who also work with other major projects like Next.js, React, and Tailwind. Node.js's migrations live in the [`github://nodejs/userland-migrations`](https://github.com/nodejs/userland-migrations) repository and are overseen by the [`@userland-migrations`](https://github.com/orgs/nodejs/teams/userland-migrations) team.

Official migrations are published under the `@nodejs` namespace within the [codemod registry](https://codemod.com/registry?framework=node.js). These have been reviewed and/or authored by Node.js collaborators. There are also unofficial migrations available which have not been reviewed by Node.js.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Official migrations are published under the `@nodejs` namespace within the [codemod registry](https://codemod.com/registry?framework=node.js). These have been reviewed and/or authored by Node.js collaborators. There are also unofficial migrations available which have not been reviewed by Node.js.
Official migrations are published under the [`@nodejs` namespace within the codemod registry](https://codemod.com/registry?framework=node.js&author=nodejs). These migrations have been reviewed and/or authored by Node.js collaborators. There are also unofficial migrations available which have not been reviewed by members of the Node.js Foundation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The author query param is a…bug. They're supposed to be "authored" by the actual github username; there's supposed to be a different param for "official". Codemod are working on it. So I think for now, better to not put anything and update it with the correct params when they're ready?

Re "node.js foundation": there is no such thing as "node.js foundation". There's the node.js project and there's the OpenJS Foundation. Perhaps "members of the Node.js project"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re "node.js foundation": there is no such thing as "node.js foundation". There's the node.js project and there's the OpenJS Foundation. Perhaps "members of the Node.js project"?

That's what I meant, sorry

So I think for now, better to not put anything and update it with the correct params when they're ready?

Got it!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Np. I'll update that wording tomorrow 🙂

@avivkeller avivkeller added the learn Issues/pr concerning the learn section label May 20, 2025
Co-authored-by: Aviv Keller <[email protected]>
Signed-off-by: Jacob Smith <[email protected]>
@AugustinMauroy
Copy link
Member

@JakobJingleheimer put this part of learn sestion under user land team in the codeowner


# Userland Migrations

Node.js provides migrations for "userland" (what you write vs node's own) source-code to facilitate adoption of new features and upgrading source-code affected by breaking changes. These are done in collaboration with [`codemod`](https://www.codemod.com), who also work with other major projects like Next.js, React, and Tailwind. Node.js's migrations live in the [`nodejs/userland-migrations`](https://github.com/nodejs/userland-migrations) repository and are overseen by the [`@nodejs/userland-migrations`](https://github.com/orgs/nodejs/teams/userland-migrations) team.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user land team is private it's will be a 404 if not in node gh org

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like all teams within the nodejs org are private. Maybe it's not terribly important that it 404s for non-members? At least for members it can still have utility.

Co-authored-by: Augustin Mauroy <[email protected]>
Signed-off-by: Jacob Smith <[email protected]>
@JakobJingleheimer
Copy link
Member Author

@JakobJingleheimer put this part of learn sestion under user land team in the codeowner

There does not appear to be a section in codeowners for that. Are you asking me to add one there?

https://github.com/nodejs/nodejs.org/blob/main/CODEOWNERS

@AugustinMauroy
Copy link
Member

@JakobJingleheimer put this part of learn sestion under user land team in the codeowner

There does not appear to be a section in codeowners for that. Are you asking me to add one there?

https://github.com/nodejs/nodejs.org/blob/main/CODEOWNERS

yeah I mean ad the end of code owners we should add user land migration

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT ! cc @bmuenzenmeyer for code owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Issues/pr concerning content learn Issues/pr concerning the learn section
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New area for userland migrations
4 participants