Skip to content

Recipe for migrating to a new Node.js major version #180

@trivikr

Description

@trivikr

Is your feature request related to a problem? Please describe.

Thank you for building codemods to help with userland migrations!
They help with migrating individual deprecated APIs to the alternatives.

However, most of the users will use these codemods when migrating to a new Node.js major version.
They would prefer one recipe to do all migrations for changing between the two major versions.

Can we have a recipe or recipes?

Describe the solution you'd like

As a user who like to migrate from Node.js 18.x to 20.x, I would like to have codemod recipe which performs all migrations for APIs which have runtime deprecations. We can consider including doc deprecations too.

$ npx codemod @nodejs/18-to-20

If there can be recipe of recipe of recipes, we'll only need to create recipes for migration between major versions.

  • 18-to-20 can have:
    • 18-to-19
    • 19-to-20
  • 18-to-22 can have:
    • 18-to-20
    • 20-to-22
  • 18-to-24 can have:
    • 18-to-20
    • 20-to-22
    • 22-to-24

Additional context

I'd authored aws-sdk-js-codemod and vitest-codemod in the past.
They're not part of codemod registry, but attempted bulk edits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    metaNot code related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions