diff --git a/packages/core/schematics/ng-generate/signal-input-migration/README.md b/packages/core/schematics/ng-generate/signal-input-migration/README.md index 859b93ed45c..1d513d6dc47 100644 --- a/packages/core/schematics/ng-generate/signal-input-migration/README.md +++ b/packages/core/schematics/ng-generate/signal-input-migration/README.md @@ -3,9 +3,6 @@ The Angular team provides an automated migration for converting `@Input` declarations to signal inputs. -Aside from the `@Input()` declarations, the migration will also take care of all -references to updated inputs. - ## How to run this migration? The migration can be run using the following command: @@ -49,7 +46,7 @@ import {Component, input} from '@angular/core'; template: `Name: {{name() ?? ''}}` }) export class MyComponent { - name = input(); + readonly name = input(); someMethod(): number { const name = this.name(); @@ -72,8 +69,22 @@ You can limit the migration to a specific sub-directory using this option. ### `--best-effort-mode` -Whenever the migration detects that it **cannot** safely migrated an input, it will -be skipped by default. You can change this by using this command line option. +By default, the migration skips inputs that cannot be safely migrated. +The migration tries to refactor code as safely as possible. + +When the `--best-effort-mode` flag is enabled, the migration eagerly +tries to migrate as much as possible, even if it could break your build. + +## `--insert-todos` + +When enabled, the migration will add TODOs to inputs that couldn't be migrated. +The TODOs will include reasoning on why inputs were skipped. E.g. + +```ts +// TODO: Skipped for migration because: +// Your application code writes to the input. This prevents migration. +@Input() myInput = false; +``` ### `--analysis-dir` diff --git a/packages/core/schematics/ng-generate/signal-queries-migration/README.md b/packages/core/schematics/ng-generate/signal-queries-migration/README.md index 24485a69a48..ffb1a196c1f 100644 --- a/packages/core/schematics/ng-generate/signal-queries-migration/README.md +++ b/packages/core/schematics/ng-generate/signal-queries-migration/README.md @@ -3,9 +3,6 @@ The Angular team provides an automated migration for converting decorator queries to signal queries. E.g. `@ViewChild` will be converted to `viewChild()`. -Aside from the query declarations, the migration will also take care of all -references to updated queries. - ## How to run this migration? The migration can be run using the following command: @@ -69,6 +66,25 @@ The migration supports a few options to fine-tune the migration for your specifi By default, the migration will update your whole Angular CLI workspace. You can limit the migration to a specific sub-directory using this option. +### `--best-effort-mode` + +By default, the migration skips queries that cannot be safely migrated. +The migration tries to refactor code as safely as possible. + +When the `--best-effort-mode` flag is enabled, the migration eagerly +tries to migrate as much as possible, even if it could break your build. + +## `--insert-todos` + +When enabled, the migration will add TODOs to queries that couldn't be migrated. +The TODOs will include reasoning on why queries were skipped. E.g. + +```ts +// TODO: Skipped for migration because: +// Your application code writes to the query. This prevents migration. +@ViewChild('ref') ref?: ElementRef; +``` + ### `--analysis-dir` Optional flag that can be used in large code projects.