← All recipes
Moderne licensed

Migrate PrimeNGConfig to PrimeNG

Recipe IDorg.openrewrite.primeng.MigratePrimeNgConfigToPrimeNGArtifact@openrewrite/recipes-angular

Renames the PrimeNGConfig import from primeng/api to PrimeNG from primeng/config, renames all identifier usages, and flags injection sites that should be migrated to providePrimeNG() in application providers.

Composite recipeProprietary

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.primeng.MigratePrimeNgConfigToPrimeNG

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

mod config recipes npm install @openrewrite/recipes-angular

Definition

This recipe runs the following recipes in order.

  • Rename PrimeNGConfig identifiers to PrimeNGorg.openrewrite.primeng.MigratePrimeNgConfigToPrimeNG.identifiers
  • Change importorg.openrewrite.javascript.change-import
  • Find PrimeNGConfig / PrimeNG service injectionorg.openrewrite.primeng.MigratePrimeNgConfigToPrimeNG.find-injection