Replace exports folder mappings with subpath patterns
ProprietaryNode.js 17 removed folder mappings (DEP0148): subpath keys that end in / in the exports and imports fields of package.json. Rewrites each one as the equivalent subpath pattern, so "./features/": "./src/features/" becomes "./features/*": "./src/features/*", including targets nested under conditions or in fallback arrays. Where the package already declares the pattern next to the folder mapping, the folder mapping is removed.
org. openrewrite. node. migrate. replace-exports-folder-mappingsmod run . --recipe= org. openrewrite. node. migrate. replace-exports-folder-mappingsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.