Replace fs-extra pathExists with fs.access/fs.existsSync
Recipe ID
org.openrewrite.node.migrate.fs-extra.replace-fs-extra-path-existsArtifact@openrewrite/recipes-nodejsReplaces fs-extra's pathExistsSync(path) with existsSync(path) from node:fs, which is what fs-extra exports under that name, and the promise form of pathExists(path) with access(path).then(() => true, () => false) from node:fs/promises, matching fs-extra's implementation. The callback form is left in place.
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-path-existsIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-nodejs