← All recipes
Moderne licensed

Replace fs-extra remove with fs.rm

Recipe IDorg.openrewrite.node.migrate.fs-extra.replace-fs-extra-removeArtifact@openrewrite/recipes-nodejs

Replaces 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-remove

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-nodejs