Replace fs-extra ensureDir/mkdirp/mkdirs with fs.mkdir
Recipe ID
org.openrewrite.node.migrate.fs-extra.replace-fs-extra-mkdirsArtifact@openrewrite/recipes-nodejsReplaces fs-extra's ensureDir, mkdirp, and mkdirs (and their Sync variants) with mkdir/mkdirSync from node:fs/promises and node:fs, passing { recursive: true } as fs-extra does internally. A numeric mode or an options object's mode carries over; the callback form maps to the callback mkdir from node:fs. Options that can't be read statically are left alone.
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-mkdirsIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-nodejs