Find deprecated crypto.DEFAULT_ENCODING usage
Recipe ID
org.openrewrite.node.migrate.find-crypto-default-encodingArtifact@openrewrite/recipes-nodejsThe crypto.DEFAULT_ENCODING property was deprecated in Node.js 10 (DEP0091) and removed in Node.js 20. Each API that accepted an encoding (hash, hmac, cipher, etc.) now requires the encoding to be passed explicitly. Occurrences must be reviewed and fixed by hand.
Single recipeDEP0091Proprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.node.migrate.find-crypto-default-encodingIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-nodejs