Upgrade to Node.js 24

Proprietary

Migrate 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-24
mod run . --recipe=org.openrewrite.node.migrate.upgrade-node-24

Install 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.

  1. Increase Node.js engine version
  2. Increase Node.js version in GitHub Actions
  3. org.openrewrite.nodejs.migrate.UpgradeNodeVersion
  4. Upgrade to Node.js 22
  5. Replace deprecated util.log() with console.log()
  6. Replace deprecated zlib.bytesRead with zlib.bytesWritten
  7. Find deprecated process.assert() usage
  8. Replace OutgoingMessage._headers and ._headerNames with public methods
  9. Replace fs.truncate() with file descriptor to fs.ftruncate()
  10. Replace dirent.path with dirent.parentPath
  11. Find deprecated tls.SecurePair and tls.createSecurePair() usage
  12. Find deprecated timers.active() and timers._unrefActive() usage
  13. Replace deprecated crypto.fips with crypto.getFips() and crypto.setFips()