From 88431b7564d6757898744597a67fcdc178413128 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 6 Jan 2025 12:16:16 -0500 Subject: [PATCH] fix(@schematics/angular): application migration should migrate ng-packagr builder package The `use-application-builder` update migration will now attempt to migrate the `ng-packagr` builder to use the `@angular/build` package if no other `@angular-devkit/build-angular` usage is present. --- .../angular/migrations/use-application-builder/migration.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/schematics/angular/migrations/use-application-builder/migration.ts b/packages/schematics/angular/migrations/use-application-builder/migration.ts index aed15549fbbe..40f2740e9463 100644 --- a/packages/schematics/angular/migrations/use-application-builder/migration.ts +++ b/packages/schematics/angular/migrations/use-application-builder/migration.ts @@ -215,6 +215,7 @@ function updateProjects(tree: Tree, context: SchematicContext) { case Builders.Application: case Builders.DevServer: case Builders.ExtractI18n: + case Builders.NgPackagr: // Ignore application, dev server, and i18n extraction for devkit usage check. // Both will be replaced if no other usage is found. continue; @@ -239,6 +240,9 @@ function updateProjects(tree: Tree, context: SchematicContext) { case Builders.ExtractI18n: target.builder = '@angular/build:extract-i18n'; break; + case Builders.NgPackagr: + target.builder = '@angular/build:ng-packagr'; + break; } }