Replace fs-extra's re-exported fs methods with node:fs
Recipe ID
org.openrewrite.node.migrate.fs-extra.replace-fs-extra-native-methodsArtifact@openrewrite/recipes-nodejsfs-extra re-exports every fs method, with the async ones returning a promise when no callback is passed. Promise-form calls move to node:fs/promises; callback-form calls, *Sync methods, streams, watchers and constants move to node:fs. fd-based methods keep their promise form on fs-extra, as node:fs/promises has no fd-number equivalents.
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-native-methodsIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-nodejs