Definition
Recipes12
- Increase Node.js engine version
- Increase Node.js version in GitHub Actions
- Replace deprecated
util.types.isWebAssemblyCompiledModule() - Find deprecated
punycodemodule usage - Find deprecated
crypto.createCipher()andcrypto.createDecipher()usage - Replace deprecated
util.isX()methods with native JavaScript - Replace deprecated
util._extend()withObject.assign() - Replace deprecated
new crypto.Hash()andnew crypto.Hmac()with factory methods - Coerce
process.exit()andprocess.exitCodeto integer - Replace deprecated
Buffer.slice()withBuffer.subarray() - Remove usage of deprecated
process.features.tls_*properties - Remove unnecessary
util.promisify()on Promise-returning functions
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-22