Replace fs-extra writeJson with fs.writeFile

Proprietary

Replaces fs-extra's writeJson/writeJSON and their sync forms with writeFile/writeFileSync from node:fs/promises and node:fs, serializing with JSON.stringify(obj, replacer, spaces) + '\n' exactly as fs-extra does. Calls with a callback, non-literal options, or a non-default EOL are left in place.

org.openrewrite.node.migrate.fs-extra.replace-fs-extra-write-json
mod run . --recipe=org.openrewrite.node.migrate.fs-extra.replace-fs-extra-write-json

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.