Migrate PrimeNG imports

MSAL

Moves the TypeScript imports of PrimeNG symbols that a major renamed or moved to another entry point, with the references that resolve to them, and moves the imports of a package PrimeNG replaced, such as @primeng/themes by @primeuix/themes in PrimeNG 20. Marks the import of a symbol a major removed without a replacement, or whose use needs a decision, such as providePrimeNG for the license PrimeNG 22 asks for, and lists it in the PrimeNgMigrationWork data table.

org.openrewrite.javascript.migrate.primeng.MigratePrimeNgImports

Required

The PrimeNG major version to upgrade to, from 19 to 22. The recipe applies the changes of every major after the one the project declares, up to this one.

Optional

Change the code of a project only once its primeng dependency is at the target version, having been below it when the run began. The UpgradeToPrimeNG recipes set this, so that a project whose dependency upgrade the package manager refuses keeps the code written for the version it stays on. The changes then come in the recipe cycle after the one that upgrades the dependency, which the recipe listing both has to ask for.

Apply only the changes the target major made, not those of the majors before it. The UpgradeToPrimeNG recipes set this, since each of them composes the upgrade to the major before.

mod run . --recipe=org.openrewrite.javascript.migrate.primeng.MigratePrimeNgImports \ -P targetVersion=22

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