Latest release: https://github.com/jashkenas/underscore/releases/tag/1.7.0

Beta phase evaluation

Credits

git commit -m 'Issue #2393125 by hussainweb, droplet, mitrpaka, tarekdj: Update underscore and backbone library to latest release'

Reference: https://www.drupal.org/core/beta-changes
Issue priority Not critical because it is just a minor upgrade.
Prioritized changes The main goal of this issue is external PHP and asset library updates.
Disruption Not disruptive

Comments

nod_’s picture

Status: Needs review » Needs work
Issue tags: +JavaScript

Can you add the minified version of the file please? We're getting that done while updating libs.

It means there needs to bee a { minified: true } option in the libraries entry, see the ckeditor entry for an example.

Apart from that: CKEditor, contextual, quickedit, toolbar and tour seems to be working still seems the couple of new versions didn't break our stuff. Might want to get Wim and/or Jesse to confirm as they ran into underscore (or backbone) version troubles way back.

nod_’s picture

Title: Update underscore library to latest release » Update underscore and backbone library to latest release

Actually we might want to update underscore and backbone in the same patch.

mitrpaka’s picture

Title: Update underscore and backbone library to latest release » Update underscore library to latest release

Latest stable release for underscore.js is 1.7.0. #2233923: Update Backbone & Underscore included underscore.js version 1.6.0.

In 8.0.x-dev underscore.js was not minified and thus following the same pattern. But let's wait Wim and/or Jesse take on this.

mitrpaka’s picture

Status: Needs work » Needs review
nod_’s picture

Title: Update underscore library to latest release » Update underscore and backbone library to latest release
Status: Needs review » Needs work

We're getting closer to alpha and it's time to ship minified libs, we don't do much debugging anymore #1341792-57: [meta] Ship minified versions of external JavaScript libraries. Also I wanted backbone and underscore updated at the same time because the backbone update looks really harmless and it's the main lib that depend on underscore.

Frontend testing is always a PITA, so testing 2 related libs in 1 issue is faster than testing each 1 time in separate issues.

nod_’s picture

tarekdj’s picture

Status: Needs work » Needs review
StatusFileSize
new140.9 KB

Attached patch updates :
backbone from 1.1.0 to 1.1.2 (minfied)
Underscore from 1.5.2 to 1.7.0 (minfied)

Everything seems to work fine except this error:

GET http://localhost/d8/sites/default/files/js/backbone-min.map; 404 (Not Found)

Which is related to Issue #2235299: Aggregation breaks use of library min.map files from included libraries

Status: Needs review » Needs work

The last submitted patch, 8: update_underscore_and-2393125-8.patch, failed testing.

hussainweb’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new141.76 KB
new885 bytes

I am just fixing the test here.

Status: Needs review » Needs work

The last submitted patch, 10: update_underscore_and-2393125-10.patch, failed testing.

tarekdj’s picture

+++ b/core/modules/system/src/Tests/Common/AttachedAssetsTest.php
@@ -245,7 +245,7 @@ function testVersionQueryString() {
+    $this->assertTrue(strpos($js, 'core/assets/vendor/backbone/backbone.js?v=1.1.2') > 0 && strpos($js, 'core/assets/vendor/domready/ready.min.js?v=1.0.7') > 0 , 'JavaScript version identifiers correctly appended to URLs');

This must be backbone-min.js

hussainweb’s picture

Status: Needs work » Needs review
StatusFileSize
new141.77 KB
new889 bytes

Ah, you're right. Attaching patch.

nod_’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs manual testing

Great, thanks.

Toolbar, quickedit, tabledrag, views ui still work.

Please credit droplet as well for his work on the backbone update issue referenced:

git commit -m 'Issue #2393125 by hussainweb, droplet, mitrpaka, tarekdj: Update underscore and backbone library to latest release'

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.0.x, thanks!

  • catch committed 7961842 on 8.0.x
    Issue #2393125 by hussainweb, droplet, mitrpaka, tarekdj: Update...
bleen’s picture

To be clear, should this commit resolve the GET http://localhost/d8/sites/default/files/js/backbone-min.map; 404 (Not Found) message mentioned in #8? I ask because I just did a fresh install with HEAD and I still see that message (on node/add/article ... havent checked anywhere else).

droplet’s picture

Source map won't affect general users. You could switch off Source Map supports in Chrome & Firefox's..etc.

(Or may be a follow up issue to remove them all from Core.)

Status: Fixed » Closed (fixed)

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

alexpott’s picture