-
Notifications
You must be signed in to change notification settings - Fork 27.4k
feat(jQuery): upgrade to jQuery to 2.0 [WIP] #4271
Conversation
jQuery 2.0 removes `jQuery.cache` which prevents the angular-mocks logic to clean up after each test (to remove element data). There are two tests that fail because of this change. One way to fix this might be monkey-patching `jQuery#data` with a proxy which would keep track of all elements and data that need to be cleaned.
FYI @jankuca you have nice hair. |
@jankuca Why not just use |
Incidentally won't moving to jQuery 2.x remove support for ie8. Reading the 1.3 bog @IgorMinar says ie8 fixes and testing will be stopping, but that existing ie8 code will remain. |
I'd like to take care of that. Since we're dropping IE8 in 1.3, it'd be strange to keep targetting jQuery 1.x. @tbertenshaw jQuery 2.x & 1.x branches are API-compatible so the switch shouldn't matter a lot. In fact, I'm using Angular 1.2 with jQuery 2.1 and it seems to work fine. Note that 1.3 won't work correctly in IE8 anyway unless someone steps up to maintain a branch (we haven't seen volunteers so far, though). If the a browser is not tested, the code naturally starts breaking in it in more & more ways. |
@mzgol (should mention that I'm all for creating a version which doesn't have ie8's legacy, as long as there is still a version with this support as often the choice is out of our hands) I thought Angular v1.3 was containing existing ie8 workarounds but not spending any time on fixing any new ie8 issues. But I thought jQuery v2.0 didn't work on ie8?. http://blog.angularjs.org/2013/12/angularjs-13-new-release-approaches.html Just trying to ensure i know what i can/not use and where. |
@tbertenshaw, jQuery has been pretty good about keeping up a consistent API, so generally you should be able to use an older version if you need to, or none at all. |
Yes, that's what I meant. :) But jQuery 2.x should be our first focus here On Thursday, February 13, 2014, tbertenshaw [email protected]
Michał Gołębiowski |
@mzgol can you take ownership of this PR please?
|
I'd like to get this in beta-3 or beta-4 if possible. let me know if you think that's doable. |
@IgorMinar I'll look into it once I get back from the short vacation, probably around Monday. |
@mzgol sounds good! |
Working on it. First, I need to have #7288 merged and then the patch from this PR is not needed. |
Two test failures on jQuery 2 have nothing to do with not being able to clean up data on gc'd elements but with the I'll try to figure out how to refactor the compile |
I'm making Angular jQuery 2-compatible in #7311; please review. |
Trying to parse all of the threads. Is 1.3.x jQuery 2.x compliant? |
Not yet, @kevinSuttle |
@caitp Thanks. Any idea of timeline, or where that support will be posted when it's announced? |
Short answer: when I find time for it. :) Should be soon & certainly before 1.3.0 is released to provide time for testing. |
Closed in favor of #7311 |
jQuery 2.0 removes
jQuery.cache
which prevents the angular-mocks logic to clean up after each test (to remove element data). There are two tests that fail because of this change. One way to fix this might be monkey-patchingjQuery#data
with a proxy which would keep track of all elements and data that need to be cleaned.