From 81e080ed98bc6699f6ede2f1173c7aabdb623fa9 Mon Sep 17 00:00:00 2001 From: Jessica Janiuk Date: Thu, 16 Nov 2023 13:09:53 -0500 Subject: [PATCH] refactor(migrations): Switch control flow migration reformat default to true (#52971) This switches the default behavior of the control flow migration template reformatting from opt-in to opt-out. PR Close #52971 --- .../schematics/ng-generate/control-flow-migration/migration.ts | 2 +- .../schematics/ng-generate/control-flow-migration/schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/schematics/ng-generate/control-flow-migration/migration.ts b/packages/core/schematics/ng-generate/control-flow-migration/migration.ts index 5c4d47a926dab..cd4653f9dc47c 100644 --- a/packages/core/schematics/ng-generate/control-flow-migration/migration.ts +++ b/packages/core/schematics/ng-generate/control-flow-migration/migration.ts @@ -19,7 +19,7 @@ import {canRemoveCommonModule, formatTemplate, processNgTemplates, removeImports */ export function migrateTemplate( template: string, templateType: string, node: ts.Node, file: AnalyzedFile, - format: boolean = false): {migrated: string, errors: MigrateError[]} { + format: boolean = true): {migrated: string, errors: MigrateError[]} { let errors: MigrateError[] = []; let migrated = template; if (templateType === 'template') { diff --git a/packages/core/schematics/ng-generate/control-flow-migration/schema.json b/packages/core/schematics/ng-generate/control-flow-migration/schema.json index af7d5eb2ac173..e8a49dbd48507 100644 --- a/packages/core/schematics/ng-generate/control-flow-migration/schema.json +++ b/packages/core/schematics/ng-generate/control-flow-migration/schema.json @@ -14,7 +14,7 @@ "type": "boolean", "description": "Enables reformatting of your templates", "x-prompt": "Should the migration reformat your templates?", - "default": "false" + "default": "true" } } }