Upgrade to Node.js 24
ProprietaryMigrate deprecated APIs for Node.js 24 compatibility. Includes all migrations from Node.js 22, plus Node 23 and Node 24 deprecations.
org. openrewrite. node. migrate. upgrade-node-24mod run . --recipe= org. openrewrite. node. migrate. upgrade-node-24Install 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
- Upgrade to Node.js 22
- Replace deprecated
util.log()withconsole.log() - Replace deprecated
zlib.bytesReadwithzlib.bytesWritten - Find deprecated
process.assert()usage - Replace
OutgoingMessage._headersand._headerNameswith public methods - Replace
fs.truncate()with file descriptor tofs.ftruncate() - Replace
dirent.pathwithdirent.parentPath - Find deprecated
tls.SecurePairandtls.createSecurePair()usage - Find deprecated
timers.active()andtimers._unrefActive()usage - Replace deprecated
crypto.fipswithcrypto.getFips()andcrypto.setFips()