Enable native source maps at launch and drop source-map-support

Proprietary

Where source-map-support is installed too late for process.setSourceMapsEnabled(true) to stand in for it — in an ES module, every import is evaluated before any statement runs, so the call would only map what loads after it — this puts --enable-source-maps on whatever launches the process instead, which Node applies before the first module loads. The flag goes into the package's bin shebang (as #!/usr/bin/env -S node --enable-source-maps) and into any package.json script that runs node or mocha directly. The install() call and register import are then redundant and are removed, rather than replaced by a call that would map less. A package with no launcher this recipe can reach is left alone and reported by FindSourceMapSupportManualMigrations.

org.openrewrite.node.migrate.source-map-support.enable-source-maps-at-launch
mod run . --recipe=org.openrewrite.node.migrate.source-map-support.enable-source-maps-at-launch

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