-
Notifications
You must be signed in to change notification settings - Fork 12k
feat(@schematics/angular): add lazy module path fixer #14181
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(@schematics/angular): add lazy module path fixer #14181
Conversation
packages/schematics/angular/migrations/update-8/update-lazy-module-paths.ts
Outdated
Show resolved
Hide resolved
packages/schematics/angular/migrations/update-8/update-lazy-module-paths_spec.ts
Outdated
Show resolved
Hide resolved
I will try to look into the test issue that you are having. I am thinking it might be because tslint uses the actual file system. Also I am not entirely use that you can use a TypeScript tslint rule for testing. Maybe this test can help you https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/tasks/tslint-fix/executor_spec.ts |
@phenomnomnominal. I did a couple of changes locally to try to get this running but it seems that the actual rule for some reason is throwing an error
Would you mind if I push the changes to your branch to at least make the lint rule run in the specs? Alternatively, you can take a look at the above link and try to make the test run :) |
Not at all please do! I think I've spotted the bug in the rule - seems like I have an extra |
Okay, I think I'm actually getting closer! I have the rule running in a test I think! |
This comment has been minimized.
This comment has been minimized.
@phenomnomnominal, just pushed. Note for later, kindly squash the commits :) |
This comment has been minimized.
This comment has been minimized.
packages/schematics/angular/migrations/update-8/update-lazy-module-paths.ts
Show resolved
Hide resolved
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.
This LGTM.
@alexeagle PTAL
This migration also needs to add |
@filipesilva sure! Excuse my ignorance, but I guess that means a separate PR? Does the migration also need to modify the |
Heya @phenomnomnominal! Yes that would need a separate PR. Now that I think about it, you raise a good point: the tsconfig also needs to use I think what we really need is a full e2e test to ensure all these things are happening on update. |
Great, I will have a go at a PR 👍 |
Let me know if you need help with the e2e. It will probably be a very similar to update-1.7.ts, that tests updating from this project. The project that you want to update should have a lazy module with the string syntax and an e2e, much like this. Then you update the project, check that |
@phenomnomnominal I had some time today and ended up doing the e2e (#14228) and removing the option overall (#14231). |
@filipesilva oh thank you so much! I had a go with the e2e test and got stuff running but couldn't figure out how to run it against the local version of the CLI... but either way, thanks! And removing the experimental flag seems smart since we're forcing people to use it! |
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. |
Apologies, I messed up my original PR trying to rebase stuff :/
@alexeagle could you please ping the appropriate people for help with the tests?
Sorry again!