Replace deprecated Buffer.slice() with Buffer.subarray()
Recipe ID
org.openrewrite.node.migrate.buffer.replace-deprecated-sliceArtifact@openrewrite/recipes-nodejsReplace deprecated buffer.slice() calls with buffer.subarray() for compatibility with Uint8Array.prototype.slice().
Single recipeDEP0158Proprietary
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.buffer.replace-deprecated-sliceIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-nodejs