Replace fs-extra move with a generated helper
ProprietaryReplaces fs-extra's move/moveSync with a call to a helper this recipe writes into the same file. rename alone is not a replacement: it doesn't create the destination's parent directory, it overwrites silently instead of refusing, and it fails across devices with EXDEV. The helper does what fs-extra does — mkdir the parent, refuse an existing destination unless overwrite was asked for, then rename, falling back to cp + rm on EXDEV. A call passing an option other than overwrite (dereference, the legacy clobber) or a callback is left alone, as is one whose options aren't an object literal. One helper is written per file, however many calls it has.
org. openrewrite. node. migrate. fs-extra. replace-fs-extra-movemod run . --recipe= org. openrewrite. node. migrate. fs-extra. replace-fs-extra-moveInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.