Skip to content

Commit b847d44

Browse files
committed
fix(@angular/cli): recommend optional application update migration during v19 update
The optional application builder migration will now default to enabled and recommended during the update process (`ng update`) for v19. The migration is still optional and can be unselected if preferred when updating. (cherry picked from commit 7c6cb95)
1 parent 834c8d7 commit b847d44

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

packages/angular/cli/src/commands/update/cli.ts

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ interface MigrationSchematicDescription
6868
extends SchematicDescription<FileSystemCollectionDescription, FileSystemSchematicDescription> {
6969
version?: string;
7070
optional?: boolean;
71+
recommended?: boolean;
7172
documentation?: string;
7273
}
7374

@@ -1138,6 +1139,7 @@ export default class UpdateCommandModule extends CommandModule<UpdateCommandArgs
11381139
return {
11391140
name: `[${colors.white(migration.name)}] ${title}${documentation ? ` (${documentation})` : ''}`,
11401141
value: migration.name,
1142+
checked: migration.recommended,
11411143
};
11421144
}),
11431145
null,

packages/angular/cli/src/utilities/prompt.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export async function askQuestion(
5454

5555
export async function askChoices(
5656
message: string,
57-
choices: { name: string; value: string }[],
57+
choices: { name: string; value: string; checked?: boolean }[],
5858
noTTYResponse: string[] | null,
5959
): Promise<string[] | null> {
6060
if (!isTTY()) {

packages/schematics/angular/migrations/migration-collection.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"factory": "./use-application-builder/migration",
66
"description": "Migrate application projects to the new build system. Application projects that are using the '@angular-devkit/build-angular' package's 'browser' and/or 'browser-esbuild' builders will be migrated to use the new 'application' builder. You can read more about this, including known issues and limitations, here: https://angular.dev/tools/cli/build-system-migration",
77
"optional": true,
8+
"recommended": true,
89
"documentation": "tools/cli/build-system-migration"
910
},
1011
"update-workspace-config": {

0 commit comments

Comments
 (0)