Replace deprecated SlowBuffer with Buffer.allocUnsafeSlow()
Recipe ID
org.openrewrite.node.migrate.buffer.replace-slow-bufferArtifact@openrewrite/recipes-nodejsReplace deprecated new SlowBuffer(size) calls with Buffer.allocUnsafeSlow(size). SlowBuffer was used to create un-pooled Buffer instances, but has been removed in favor of the explicit Buffer.allocUnsafeSlow() method.
Single recipeDEP0030Proprietary
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-slow-bufferIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-nodejs