Upgrade to Node.js 20
Recipe ID
org.openrewrite.node.migrate.upgrade-node-20Artifact@openrewrite/recipes-nodejsMigrate deprecated APIs for Node.js 20 compatibility. Addresses deprecations that are end-of-life in Node 20.
Composite recipeProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.node.migrate.upgrade-node-20If the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-nodejsDefinition
This recipe runs the following recipes in order.
- Increase Node.js engine version
org.openrewrite.node.migrate.increase-node-engine-version - Increase Node.js version in GitHub Actions
org.openrewrite.node.migrate.increase-node-engine-version-in-github-actions - org.openrewrite.nodejs.migrate.UpgradeNodeVersion
org.openrewrite.nodejs.migrate.UpgradeNodeVersion - Coerce
process.exit()andprocess.exitCodeto integerorg.openrewrite.node.migrate.process.coerce-process-exit-code - Find deprecated
crypto.DEFAULT_ENCODINGusageorg.openrewrite.node.migrate.find-crypto-default-encoding