-
Notifications
You must be signed in to change notification settings - Fork 27k
feat(migrations): add migration to convert standalone component route… #56428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(migrations): add migration to convert standalone component route… #56428
Conversation
|
@eneajaho thanks for creating this draft PR 👍 We'll be happy to look at the code (and help land it), once it's ready for review. Thank you. |
4c5e7ca to
ae120e5
Compare
eneajaho
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AndrewKushnir
I think this is ready for an initial round of review 🙌
packages/core/schematics/ng-generate/standalone-routes/to-standalone.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/standalone-routes/index.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/standalone-routes/to-standalone.ts
Outdated
Show resolved
Hide resolved
AndrewKushnir
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eneajaho thanks for creating this PR 👍 I've left some comments.
I think for this migration, it'd be great to collect references to NgModule-based components that the migration was unable to rewrite and output the list at the end, something like:
🎉 Automated migration has finished! 🎉
Number of updated routes: 53
Number of skipped routes: 156
Note: this migration was unable to optimize the following routes, since they use NgModule-based components:
- `/product/:id` path at `src/app/app.routes.ts`
- `/product/:id/details` path at `src/app/product/details.routes.ts`
...
Consider making those components standalone and run this migration again.
We can also include a link to the standalone migration into the message.
What do you think?
packages/core/schematics/ng-generate/standalone-routes/README.md
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/standalone-routes/README.md
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/standalone-routes/README.md
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/standalone-routes/README.md
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/standalone-routes/to-standalone.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/standalone-routes/to-standalone.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/standalone-routes/to-standalone.ts
Outdated
Show resolved
Hide resolved
2c37a9c to
ebf0c31
Compare
packages/core/schematics/ng-generate/route-lazy-loading/to-standalone.ts
Outdated
Show resolved
Hide resolved
AndrewKushnir
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/core/schematics/ng-generate/route-lazy-loading/README.md
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/README.md
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/README.md
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/README.md
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/README.md
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/index.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/index.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/to-standalone.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/util.ts
Outdated
Show resolved
Hide resolved
ebf0c31 to
1d81473
Compare
packages/core/schematics/ng-generate/route-lazy-loading/README.md
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/index.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/index.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/index.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/to-lazy-routes.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/to-lazy-routes.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/to-lazy-routes.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/to-lazy-routes.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/route-lazy-loading/to-lazy-routes.ts
Outdated
Show resolved
Hide resolved
6a46fbe to
c1ddacd
Compare
|
@crisbeto This is ready for another round of review. Solved the type issue and removed the ngtsc program. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay here, it fell off my radar. LGTM, but it needs a rebase.
e74032d to
5167dfa
Compare
5167dfa to
3c21c0f
Compare
|
@eneajaho Looks like this has lint issues. Should be mergeable right after that. |
…s to be lazy loaded This schematic helps developers to convert eagerly loaded component routes to lazy loaded routes
3c21c0f to
f71327b
Compare
Updated. Using |
|
Caretaker note: the failing test is unrelated. Safe to merge. |
|
This PR was merged into the repository by commit 147eee4. The changes were merged into the following branches: main |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…s to be lazy loaded
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information