Definition
Recipes12
- Increase Node.js engine version
- Increase Node.js version in GitHub Actions
- 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()
Usage
Run this recipe
In order to run JavaScript recipes, you will need to use the Moderne CLI. For JavaScript specific configuration instructions, please see our configuring JavaScript guide.
Once the CLI is installed, you can install this JavaScript recipe package by running the following command:
Install the recipe package
mod config recipes npm install @openrewrite/recipes-nodejs
Then, you can run the recipe via:
Run the recipe
mod run . --recipe org.openrewrite.node.migrate.upgrade-node-24