-
Notifications
You must be signed in to change notification settings - Fork 340
Fix loader for decorator and component #284
Conversation
I guess you could load your local copy as unpacked extension and test it, but there should be automatic tests in place. I remember there was a discussion some time ago about setting up unit-/integration-testing against actual apps, but I'm not sure if this ever moved forward. |
There seem to be some tests, but the build fails. |
One problem with this change is that it might behave strangely if the used version of angular does not support I am not sure it is worth fixing it though... |
I tried this and it throws an error because |
Now, |
This is getting kind of out of control. There must be a better way, than defining a custom loader in Batarang that is mostly/only copy-paste. @btford or anyone else, any idea why Batarang needs its own |
For compat in 1.2 and 1.3: 6a0ae94 and the mentioned issues I've tried to recreate the original error to see if a different change is possible, but I haven't been able to reproduce it. |
I have tested with various configurations, and the easiest way to provoke the original error that the loader is supposed to fix is to run angular with version 1.2.29, but use the the angular-loader file from >=1.3.0 So do npm install angular-loader
Then the app should fail with a provider not found error. Regarding |
After reading angular/angular-hint#39, I'm still not sure why Batarang needs a custom loader. If people use matching versions of loader and angular, shouldn't things just work fine ? |
Now that we have refactored the loader in AngularJS 1.5.0 - we need to change this PR accordingly. See angular/angular.js#13692 |
I've updated the PR. |
LGTM |
It's been a while since travis was last happy with batarang. Is it because of the old Chrome version ? |
Fantastic, thanks so much! @gkalpak not sure, we have an issue open but I haven't looked into it much, just ran the tests manually. |
The changes seem very straightforward, since the custom loader is mainly copy / paste.
I've additionally included a change for better error messages.
Question is, how do I test if this works? Can I run a version of the plugin locally?