Replace deprecated new crypto.Hash() and new crypto.Hmac() with factory methods

Proprietary

Replace deprecated new crypto.Hash(algorithm) constructor calls with crypto.createHash(algorithm) and new crypto.Hmac(algorithm, key) with crypto.createHmac(algorithm, key) factory methods.

org.openrewrite.node.migrate.crypto.replace-hash-constructor
mod run . --recipe=org.openrewrite.node.migrate.crypto.replace-hash-constructor

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.