Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nod_’s picture

Issue tags: +Novice, +JavaScript

When updating include the minified file, the original source and the source map file.

Wim Leers’s picture

Title: Update jquery to 2.1.4 » Update jQuery to 2.1.4
iMiksu’s picture

Assigned: Unassigned » iMiksu
iMiksu’s picture

Assigned: iMiksu » Unassigned
Status: Active » Needs review
FileSize
415 KB
evilfurryone’s picture

Status: Needs review » Reviewed & tested by the community

Applied #4, verified that jquery v2.1.4 is being used. Clicked around the site and encountered no issues.

Wim Leers’s picture

Patch looks good; manually tested in #5.

willzyx’s picture

Status: Reviewed & tested by the community » Needs review

This release does not contain the sourcemap comment in the minified file. I think we need to add the appropriate sourcemap comment at the end of the minified file

ram4nd’s picture

Assigned: Unassigned » ram4nd
ram4nd’s picture

Just added the "//# sourceMappingURL=jquery.min.map" to the js file.

ram4nd’s picture

Assigned: ram4nd » Unassigned
ram4nd’s picture

FileSize
414.99 KB

Something went wrong with the previous patch, I re-rolled it.

evilfurryone’s picture

Status: Needs review » Reviewed & tested by the community

Can confirm " //# sourceMappingURL=jquery.min.map " in end of the minified jquery file.

aspilicious’s picture

Status: Reviewed & tested by the community » Needs work

DIdn't you forget to update the original source file?

ram4nd’s picture

Status: Needs work » Needs review

I am not sure that I understand what you are trying to say.

aspilicious’s picture

When updating include the minified file, the original source and the source map file.

I see an updated
- Minified file
- A source map

I don't see an updated original source file.
If it doesn't exist yet we have to add it.

willzyx’s picture

FileSize
665.98 KB

Added source file

aspilicious’s picture

@nod_ should verify if everything is ok now.

nod_’s picture

Status: Needs review » Reviewed & tested by the community

This is good to go. When debugging we see the actual unminfied source, all good.

The version bump for jQuery is related to a safari bug and the use of $.each with weird objects (2.1.3..2.1.4). Since we don't do any of that in core, we're not impacted.

alexpott’s picture

Status: Reviewed & tested by the community » Needs review

The min.map file does not appear to match http://code.jquery.com/jquery-2.1.4.min.map - am I wrong? The uncompressed js is exactly the same as http://code.jquery.com/jquery-2.1.4.js and the minified file has the expected difference of the source map comment.

nod_’s picture

Status: Needs review » Reviewed & tested by the community

The changes to the map file are required. This is the exact changes between what jquery ships and the patch:

Original:"file":"jquery-2.1.4.min.js","sources":["jquery-2.1.4.js"]

Ours:"file":"jquery.min.js","sources":["jquery.js"]

We either rename the jquery files or the map file. I'd rather rename the map file.

alexpott’s picture

Status: Reviewed & tested by the community » Needs review

@nod_ yes we need to change our map file. We I mean is that the patch has a different map file from http://code.jquery.com/jquery-2.1.4.min.map - which surprises me.

nod_’s picture

Umm not sure what's going on. We're working under the assumptions that we want to keep "jquery.min.js" as the filename for the script, which is why we need to rename all the files (removing the version from the filename) and change 2 strings inside the map file.

As for the map file, beside the changes in #20 there is no other change to that file, it's the same as what's linked in #21.

willzyx’s picture

Status: Needs review » Reviewed & tested by the community

@alexpott
the patch looks good and the jquery.min.map is the same as http://code.jquery.com/jquery-2.1.4.min.map. The only changes are

Original:
"file":"jquery-2.1.4.min.js","sources":["jquery-2.1.4.js"]

Ours:
"file":"jquery.min.js","sources":["jquery.js"]

I think the problem is the way in which you run the diff. Using diff on a long one line file is problematic.. Use phpstorm files compare or try something like (stolen from here)

tr -s ',' '\n' < jquery.min.map > from-patch.txt
tr -s ',' '\n' < jquery-2.1.4.min.map > from-jquery.com.txt

diff from-patch.txt from-jquery.com.txt
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Sorry for getting that wrong and thanks for explaining it. Committed 8c7d0f4 and pushed to 8.0.x. Thanks!

  • alexpott committed 8c7d0f4 on 8.0.x
    Issue #2485575 by ram4nd, willzyx, iMiksu, nod_: Update jQuery to 2.1.4
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.