ngxtension/ngxtension-platform

convert-di-to-inject schematic reformats code

Closed this issue · 3 comments

There seems to be a significant re-formatting of unimpacted parts of the code when using the convert-di-to-inject schematic. How do you prevent this from happening?

One of the worst reformats is this:

@Output() public change = new EventEmitter<TaskState<DocumentationTask>>();

Becomes:

@Output() public change = new EventEmitter<
    TaskState<DocumentationTask>
>();

Which then fails if you use the output schematic to covert to the new output format because it does not recgonize the multiple line EventEmitter, resulting in:

public change = output();

The code link for inject() Migration leads to a 404.

I can't reproduce this in tests 😅

Hello @jinder
In this release https://github.com/angular/angular/releases/tag/18.2.0-next.2 Angular added official support for inject migration. I'd recommend to try to run that migration too in your project and if there are issues, please open them in the Angular repo.

I will be closing the issues regarding migrations in ngxtension which are now directly supported in the fwk.