Upgrade to Node.js 18
ProprietaryMigrate deprecated APIs for Node.js 18 compatibility. Addresses deprecations that are end-of-life in Node 17 and 18, Node 18 runtime deprecations, and runtime deprecations from earlier versions.
org. openrewrite. node. migrate. upgrade-node-18mod run . --recipe= org. openrewrite. node. migrate. upgrade-node-18Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Increase Node.js engine version
- Increase Node.js version in GitHub Actions
- org.openrewrite.nodejs.migrate.UpgradeNodeVersion
- Replace
exportsfolder mappings with subpath patterns - Find deprecated
tls.parseCertString()usage - Find
dns.lookup()options of the wrong type, and fix numeric strings - Find
asyncstream implementation methods - Find removed
ERR_INVALID_CALLBACKerror code usage - Find
process.on('multipleResolves')listeners - Replace deprecated
Buffer()constructor withBuffer.alloc()andBuffer.from()