File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
migrations/signal-migration/src
ng-generate/signal-input-migration Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ export class SignalInputMigration extends TsurgeComplexMigration<
180180 return result . replacements ;
181181 }
182182
183- override async stats ( globalMetadata : CompilationUnitData ) : Promise < MigrationStats > {
183+ override async stats ( globalMetadata : CompilationUnitData ) {
184184 let fullCompilationInputs = 0 ;
185185 let sourceInputs = 0 ;
186186 let incompatibleInputs = 0 ;
Original file line number Diff line number Diff line change @@ -104,8 +104,18 @@ export function migrate(options: Options): Rule {
104104 tree . commitUpdate ( recorder ) ;
105105 }
106106
107+ const { counters} = await migration . stats ( merged ) ;
108+ const migratedInputs = counters . sourceInputs - counters . incompatibleInputs ;
109+
107110 context . logger . info ( '' ) ;
108111 context . logger . info ( `Successfully migrated to signal inputs 🎉` ) ;
112+ context . logger . info ( ` -> Migrated ${ migratedInputs } /${ counters . sourceInputs } inputs.` ) ;
113+
114+ if ( counters . incompatibleInputs > 0 && ! options . insertTodos ) {
115+ context . logger . warn ( `To see why ${ counters . incompatibleInputs } inputs couldn't be migrated` ) ;
116+ context . logger . warn ( `consider re-running with "--insert-todos" or "--best-effort-mode".` ) ;
117+ }
118+
109119 if ( options . bestEffortMode ) {
110120 context . logger . warn (
111121 `You ran with best effort mode. Manually verify all code ` +
You can’t perform that action at this time.
0 commit comments