← All recipes
Moderne licensed

Remove unused source-map-support dependency

Recipe IDorg.openrewrite.node.migrate.source-map-support.remove-unused-source-map-support-dependencyArtifact@openrewrite/recipes-nodejs

Removes source-map-support and @types/source-map-support from each package.json whose package no longer references it from a JavaScript or TypeScript source, a package.json script or tool configuration, or a .mocharc/mocha.opts file. A webpack banner that injects require("source-map-support") into a bundle counts as a use. Lock files are not regenerated; run the package manager's install afterwards.

Single recipesource-map-supportProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.node.migrate.source-map-support.remove-unused-source-map-support-dependency

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-nodejs

Options

NameTypeDescription
accountForMigrationStringJudge library usage as it will be once the migration recipes have run, so the dependency is dropped in the same run. Only enable alongside those recipes, as the composite migration does.