Replace source-map-support/register with --enable-source-maps in package.json
ProprietaryReplaces -r source-map-support/register with Node's --enable-source-maps flag in package.json scripts that run node or mocha, including through nyc, c8 or cross-env. Mocha's require list (in package.json or .mocharc.json) gets "enable-source-maps": true, which mocha forwards to Node, and ava's require list nodeArguments: ["--enable-source-maps"]. Jest setupFiles entries are dropped, since Jest maps stack traces itself. Scripts running other tools are left alone.
org. openrewrite. node. migrate. source-map-support. replace-source-map-support-register-in-package-jsonmod run . --recipe= org. openrewrite. node. migrate. source-map-support. replace-source-map-support-register-in-package-jsonInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.