Replace fs-extra remove with fs.rm
Recipe ID
org.openrewrite.node.migrate.fs-extra.replace-fs-extra-removeArtifact@openrewrite/recipes-nodejsReplaces fs-extra's remove(path) and removeSync(path) with rm/rmSync from node:fs/promises and node:fs, passing { recursive: true, force: true } as fs-extra does internally. The callback form maps to the callback rm from node:fs.
Single recipeProprietary
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.fs-extra.replace-fs-extra-removeIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-nodejs