Migrate .p-fluid to <p-fluid> wrapper
Recipe ID
org.openrewrite.primeng.MigratePFluidToWrapperArtifact@openrewrite/recipes-angularRewrites <div class="…p-fluid…">…</div> to <p-fluid class="…">…</p-fluid> and adds a FluidModule import from primeng/fluid to the corresponding component file. PrimeNG 18 removed the .p-fluid CSS class; the <p-fluid> wrapper component is its replacement.
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.MigratePFluidToWrapperIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-angularDefinition
This recipe runs the following recipes in order.
- Rewrite
.p-fluiddivs to<p-fluid>wrappersorg.openrewrite.primeng.MigratePFluidToWrapper.html - Add
FluidModuleimport to components using<p-fluid>org.openrewrite.primeng.MigratePFluidToWrapper.add-imports