← All recipes
Moderne licensed

Replace dirent.path with dirent.parentPath

Recipe IDorg.openrewrite.node.migrate.fs.replace-dirent-pathArtifact@openrewrite/recipes-nodejs

Replaces deprecated dirent.path property access with dirent.parentPath on fs.Dirent instances to address DEP0178 deprecation.

Single recipeDEP0178Proprietary

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.replace-dirent-path

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

mod config recipes npm install @openrewrite/recipes-nodejs