angular/packages/core/schematics
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
..
migrations docs: set syntax highlighting of code examples MD code blocks (#59026) 2024-12-04 17:30:28 +01:00
ng-generate feat(migrations): add schematic to clean up unused imports (#59353) 2025-01-06 16:21:26 +00:00
test feat(migrations): add schematic to clean up unused imports (#59353) 2025-01-06 16:21:26 +00:00
utils refactor(migrations): allow compiler options to be customized in tsurge (#59353) 2025-01-06 16:21:26 +00:00
BUILD.bazel feat(migrations): add schematic to clean up unused imports (#59353) 2025-01-06 16:21:26 +00:00
collection.json feat(migrations): add schematic to clean up unused imports (#59353) 2025-01-06 16:21:26 +00:00
migrations.json refactor(migrations): use import manager in provide-initializer (#58456) 2024-11-04 18:15:00 +01:00
package.json refactor(migrations): ensure CommonJS migrations can be accessed (#43657) 2021-10-04 16:24:48 -07:00
rollup.config.js build(migrations): skip source map generation (#58299) 2024-10-22 07:41:41 -07:00
tsconfig.json refactor(migrations): avoid relative imports in schematic code (#57214) 2024-08-29 07:50:41 -07:00