This repository contains scripts and tools to automate the migration process from PrimeNG v17 to v18, addressing breaking changes and providing an interactive experience for Angular developers.
PrimeNG v18 introduces several breaking changes:
-
Component Renames
- Calendar → DatePicker
- Dropdown → Select
- InputSwitch → ToggleSwitch
- OverlayPanel → Popover
- Sidebar → Drawer
-
API Changes
- PrimeNGConfig replaced by providePrimeNG()
- Message interface renamed to ToastMessageOptions
- Dialog modal property replaced by closeOnEscape
- Updated transition options syntax
-
CSS Changes
- Removed utility classes (.p-link, .p-highlight, .p-fluid)
- CSS class renames (p-component → p-element, p-inputtext → p-input)
- Theme files moved from primeng/resources
-
Other Changes
- Directive renames (pAnimate → pAnimateOnScroll)
- Removal of pDefer in favor of Angular @defer
- PrimeFlex compatibility updates
This repository provides three different implementations to support various workflows:
- Interactive Node.js command-line tool
node scripts/node/primeng-migration-tool.js
- Best for: Most developers looking for an interactive experience
- Integration with Angular CLI update process
ng generate ./scripts/schematic/primeng-schematics-migration:migrateToV18
- Best for: CI/CD pipelines or Angular CLI integration
- Unix/Linux shell script implementation
bash scripts/bash/primeng-migration-bash.sh
- Best for: Unix/Linux users who prefer bash scripting
- PrimeNG v18 Migration Guide - Comprehensive guide to the migration process
- Using Angular Schematics - Guide to using and extending the Angular schematic
- Schematic Setup Guide - Setup instructions for the Angular schematic
- Backup your project or ensure you have a clean Git state
- Choose the appropriate migration tool for your needs
- Run the selected tool and follow the interactive prompts
- Review the changes and run your application to verify the migration
Contributions are welcome! Please feel free to submit a Pull Request.