A guide on configuring an Angular library to support the `ng update` command. The basic setup requires adding an `ng-update` entry to `package.json` and creating a `migrations.json` file. Optionally, automatic code migrations can be added using Angular schematics, allowing library maintainers to programmatically modify user code during upgrades. The post also covers how to test migrations using utilities from `angular-devkit/schematics/testing`, with a practical example of removing a deprecated `ngrx-store-freeze` dependency.
Table of contents
Create the migrations.json fileUpdate your package.jsonAdd the migration schematic to the output (dist) folderAdd automatic code migrations (optional)Define the migration rule (optional)How to test the migrationConclusion2 Impressions