[INTERNAL] Improve jQuery deprecation message#8399
Conversation
simonihmig
commented
Feb 3, 2019
- As discussed with @rwjblue, this makes the existing deprecation message more specific, stating explicitly that the jQuery integration per se is deprecated and will be removed from Ember itself
- added tests
Making it more specific that the jQuery integration has been deprecated and will be removed.
| app = new EmberApp({ | ||
| project, | ||
| }); | ||
|
|
There was a problem hiding this comment.
This change was required as app would be undefined otherwise. It accidentally worked before, as app was initialized and leaking from another test before.
| return; | ||
| } | ||
| this.project.ui.writeDeprecateLine('Ember will stop including jQuery by default in an upcoming version. If you wish keep using jQuery in your application explicitly add `@ember/jquery` to your package.json'); | ||
| this.project.ui.writeDeprecateLine( |
There was a problem hiding this comment.
Forgive me for being out of the loop, but is it not possible to put this in the ember-source addon itself?
There was a problem hiding this comment.
I think you are right, and given that it's ember-source which is actually deprecating things (i.e. causing breaking changes in the future), it would make more sense to put it there. Especially that ember-source and ember-cli might not be used in lock step.
On the other hand, IIRC this was already added a while ago when we started to not include jQuery anymore (which historically ember-cli did, not ember-source!) when @ember/jquery is detected. So when we want to move that message to ember-source, we would probably have to check the ember-source version here, to not issue a deprecation message twice!?
A bit of shenanigans involved, but I can do it if we agree it's worth it!?
There was a problem hiding this comment.
It is possible to print out where jquery is being included? We have a project with tons of dependencies and it would be a huge task to sift through all of those and figure out which one is using it.