-
-
Notifications
You must be signed in to change notification settings - Fork 87
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: standalone pipes and legacy external modules support in angular 19 #10826
base: master
Are you sure you want to change the base?
Conversation
Tests seem to fail, any idea on that? |
This 100% fixed all the relevant issues in my project. It's an enterprise class frontend app with probably 500k LOC of frontend code, legacy AJS + A19 hybrid. We should merge your PR ASAP. |
any updates on this ? |
Hello, do you find a way to correct the failing tests @KernelFolla ? Thanks for your contribution anyway, hoping it will be merged ASAP regarding of issues linked. |
can I say I don't know how to do it? :) anyway I'll try this weekend, any suggestions and help are welcome. |
Any plans to merge this change ? |
Yes you can! 🤣 I'm not used to work with NgMocks source code and I think @satanTime or maybe an usual contributor could help on it. As I read in your changed code and in the original code, I think there is a missing concept in isStandalone function. There is no way currently for this function to know the using context of an entity (component, directive, pipe). Without this information, how NgMocks could know if an entity is standalone or not? If this function could know if the dependency tree entity to mock is declared by a Module, we could deduce that is not a standalone component. It could be summed up as : if (isEntityDeclaredInModule) { // <--- treatment for component/directive/pipe declared into module, concept currently absent
return false;
} else {
// do your current modified isStandalone treatment
} Maybe i'm wrong but as NgMocks knows the full entity dependency tree, I think you could find this information and add it to the isStandalone function (or call the isStandalone function just in "else" case). Good luck @KernelFolla 😉 |
this PR solves two things:
I've tested the following code in my project without issues but I'm not confident on how to run and fix tests with karma and e2e
I hope this PR somehow contributes towards the definitive solution for supporting Angular 19🙏