angular/packages/core/schematics/test
Kristiyan Kostadinov d298d25426 feat(migrations): add schematic to clean up unused imports (#59353)
In v19 we added a warning about unused standalone imports, however we didn't do anything about existing code which means that users have to clean it up manually. These changes add the `ng g @angular/core:cleanup-unused-imports` schematic which will remove the unused dependencies automatically.

There isn't any new detection code since all the manipulations are based on the produced diagnostics, but there's a bit of code to remove the import declarations from the file as well.

Fixes #58849.

PR Close #59353
2025-01-06 16:21:26 +00:00
..
google3 refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
all-migrations.spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
BUILD.bazel feat(migrations): add schematic to clean up unused imports (#59353) 2025-01-06 16:21:26 +00:00
cleanup_unused_imports_migration_spec.ts feat(migrations): add schematic to clean up unused imports (#59353) 2025-01-06 16:21:26 +00:00
control_flow_migration_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
explicit_standalone_flag_spec.ts refactor(migrations): Make the explicit standalone migration idempotent (#58418) 2024-10-30 11:55:11 -07:00
helpers.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
inject_migration_spec.ts fix(migrations): inject migration dropping code if everything except super is removed (#58959) 2024-12-02 08:56:21 +01:00
output_migration_spec.ts feat(migrations): expose output as function migration (#58299) 2024-10-22 07:41:41 -07:00
pending_tasks_spec.ts feat(core): migrate ExperimentalPendingTasks to PendingTasks (#57533) 2024-09-20 18:26:48 +02:00
project_tsconfig_paths_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
provide_initializer_spec.ts fix(migrations): fix provide-initializer migration when using useFactory (#58518) 2024-11-21 20:59:35 +00:00
queries_migration_spec.ts feat(migrations): add schematic to migrate to signal queries (#58032) 2024-10-02 11:25:39 +00:00
signals_migration_spec.ts fix(migrations): add outputs migration to combined shorthand (#58318) 2024-10-23 08:02:50 -07:00
standalone_migration_spec.ts fix(migrations): replace removed NgModules in tests with their exports (#58627) 2024-11-13 18:04:31 +00:00
standalone_routes_spec.ts fix(core): correctly perform lazy routes migration for components with additional decorators (#58796) 2024-11-21 16:43:30 +00:00