Problem
- Various libraries in core are not the latest stable release of the library and have to be updated prior to 8.0.
Proposed solution
Ensure that all external libraries shipped with core are (1) copies of a stable release and (2) the latest stable release.
When libraries are following semantic versioning, the following should explain the priority of upgrades:
Version upgrade Priority
Major (1.* to 2.*) Critical
Minor (1.1.* to 1.2.*) Critical
Patch (1.1.2 to 1.1.3) Normal (unless it contains a major/critical fix that affects core)
When libraries don't follow semantic versioning, the priority will need to be handled case by case.
For each library update, open a separate child issue of this one, with the appropriate priority.
How to help
- Add an entry for each external library from core.libraries.yml to the table below
- Check if there is an existing issue in the queue, and add it as a child of this issue if it isn't already
- Figure out if it's an external library
- Make a note of the version on core.libraries.yml
- Check the website for the library and look for the latest stable release
- If the versions match, update the issue summary here to note this, along with the date checked
- If the versions do not match, open a new issue to update the library version, setting this issue as the parent
- Optionally provide a patch updating the library on that issue - this should replace the copy in core with the stable, minified version if one is available, and update the version number in core.libraries.yml
- If there is no stable version of the library at all, open a new critical issue to document this
- Additional things to help with include manual testing of (or writing up test plans for) open, child issues that have patches
Libraries
| Library name |
Release in core |
Latest release |
Issue |
Date checked |
| core/domready |
1.0.8 |
1.0.8 |
#2485573: Update JS library domready to version 1.0.8 |
September 11, 2015 |
| core/jquery |
2.1.4 |
2.1.4 |
#2485575: Update jQuery to 2.1.4 |
September 11, 2015 |
| core/picturefill |
2.3.1 |
2.3.1 |
#2485579: Update JS library picturefill to 2.3.1 |
September 11, 2015 |
| core/jquery.once |
2.1.1 |
2.1.1 |
#2505649: Update jquery.once to 2.1.1 |
September 11, 2015 |
| core/jquery.farbtastic |
1.2 (customized) |
2.0.0-alpha.1 and 1.3u |
- |
September 11, 2015 |
| core/backbone |
1.2.3 |
1.2.3 |
#2559299: Update JS lib: backbone to 1.2.3 |
September 11, 2015 |
| core/ckeditor |
4.5.3 |
4.5.3 |
#2521820: Update CKEditor library to 4.5.3 |
September 11, 2015 |
| core/classList |
2014-12-13 |
2014-12-13 |
#2329599: Update classList.js |
September 11, 2015 |
| core/underscore |
1.8.3 |
1.8.3 |
#2462259: Update underscore to 1.8.3 |
September 11, 2015 |
| core/matchmedia |
0.2.0 |
0.2.0 |
#2207629: Update matchMedia library to latest release |
September 11, 2015 |
| core/jquery.form |
3.51 |
3.51 |
#2393713: Update JS lib: jquery.form to 3.5.1 |
September 11, 2015 |
| core/jquery.cookie |
1.4.1 |
1.4.1 |
#2393699: Update JS lib: jquery.cookie to 1.4.1 |
September 11, 2015 |
| core/modernizr |
2.8.3 |
2.8.3 |
#2396301: Update JS lib: Modernizr to 2.8.3 |
September 11, 2015 |
| core/html5shiv |
3.7.2 |
3.7.3 |
#2559231: Update JS lib: html5shiv to 3.7.3 |
September 11, 2015 |
| core/normalize |
3.0.3 |
3.0.3 |
#2494069: Update normalize.css to v3.0.3 |
September 11, 2015 |
| core/jquery.joyride |
2.1.0 |
2.1.0 |
#2027623: De-fork jQuery Joyride and update to latest stable release |
September 11, 2015 |
| core/jquery.ui |
1.11.4 |
1.11.4 |
#2427649: Update to jQuery UI 1.11.4 |
September 11, 2015 |
| core/jquery.ui.touch-punch |
0.2.3 |
0.2.3 |
#2409121: Update jQuery Touch Punch library to 0.2.3 |
September 11, 2015 |
Note:
- This list is based on a manual remote/upstream/version verification performed by @sun on December 22, 2013. It only includes obvious todos.
- It does not include possibly outdated libraries. Given the new
'remote' information, it should be possible to write a script that retrieves the latest tagged release of each library via GitHub API + compares that with the declared version in core (via PHP version_compare()).
classList:
remote: https://github.com/eligrey/classList.js
# @todo Stable release required for Drupal 8.0.
version: master
ckeditor:
remote: https://github.com/ckeditor/ckeditor-dev
# @todo Stable release required for Drupal 8.0.
version: 4.2-dev
commit: 887d81ac1824008b690e439a1b29eb4f13b51212
domready:
remote: https://github.com/ded/domready
# @todo Stable release required for Drupal 8.0.
version: master
jquery.cookie:
# @todo jquery.cookie.js was never supposed to be distributed with jQuery UI.
# @see https://drupal.org/node/2161217
remote: https://github.com/carhartl/jquery-cookie
version: v1.0
jquery.farbtastic:
remote: https://github.com/mattfarina/farbtastic
# @todo Ping @robloach or @mattfarina to retroactively create this release.
version: 1.2
matchmedia:
remote: https://github.com/paulirish/matchMedia.js
# @todo Contribute upstream and replace with upstream version.
# @see http://drupal.org/node/1815602
version: VERSION
...
picturefill:
remote: https://github.com/scottjehl/picturefill
# @todo Contribute upstream and/or replace with upstream version.
# @see https://drupal.org/node/1775530
version: VERSION
Comments
Comment #1
sunFor example, jQuery Joyride is outdated — 2.1 contains quite a range of fixes + ARIA support.
Comment #2
wim leersI can speak to CKEditor: we're working with the CKEditor developers to upgrade to the CKEditor 4.3 stable over at #2039163: Update CKEditor library to 4.4.
Also: is this really a beta blocker?
Comment #3
catchDefinitely not a beta blocker, but should be a release blocker (and try to upgrade some things around the first beta so it's less of a jump later if possible).
Comment #4
sunComment #5
catchjQuery 2.1.0 is out.
http://blog.jquery.com/2014/01/24/jquery-1-11-and-2-1-released/
Comment #6
sunIs anyone eager to write the script I mentioned in the issue summary?
Something along the lines of this should work:
— see #11 —
Comment #7
nod_That or getting #1663622: Change directory structure for JavaScript files going (it's about using bower for doing this).
Comment #8
sunWhile that is certainly related, there's not really a reason to hold up library updates on that — i.e., the two objectives are not really substitutes of each other.
Comment #9
sunJust stumbled over two issues that are debating the fate of picturefill and matchmedia.
Comment #10
sunAlright, did it myself:
"-" means FORK in the "Current" column.
"-" means no tagged releases AT ALL in the "Latest" column.
Comment #11
sunApparently I forgot to attach the script.
Note that the GitHub API asks you to identify yourself in some way (e.g., github username) in the User-Agent header — I've replaced my name in this copy.
Comment #12
andypostis there any issue|policy about to ship core with full or min version of library?
Comment #13
catch#1341792: [meta] Ship minified versions of external JavaScript libraries
Comment #14
sunNot really a child, so just adding that as related.
Comment #15
johnalbinComment #16
rainbowarrayComment #17
tarekdj commentedUpdated script + latest results.
Comment #18
dawehnerAdapting title to not mix it up again.
Comment #19
wim leers:)
Comment #20
xjmIn a similar vein: #2234277: Composer update (includes security fixes)
Comment #21
xjmNot only a theme system issue.
Comment #22
gwolf commentedAs the maintainer of Drupal 7 in Debian, I find tarekdj's comment (#17) most useful: We have to track where do all of the sources in our packages come from, and we do not consider minified Javascript files to be a valid substitute for sources.
I'll just go a little step further, and add a wishlist request:
It is in our view very important to have the project source (in this case, the Drupal code, or at least the Git repository) distributed with full sources to all of its components. Think, for example, on cases where an upstream project (that is, an included library) dies and its website disappears. Drupal could be left with only its minified version.
We would mostly appreciate if, besides shipping the minified libraries, the source from which they were minified would also be part of the Drupal source tree or, at least, of its Git tree. Or, at least, ship with a list of URLs where to download the actual sources used. Do you think that would be possible?
Comment #23
andypost@gwolf sounds useful, otoh most of sources could be found at google and others cdn. also for debug there's https://github.com/mozilla/source-map/ in Firefox 23+ and webkit
Comment #24
gwolf commentedandypost: Right. Sources can be found, and what I'm describing is somewhat a theoretical situation — One that has happened, however, in several other projects. And, you might know, Debian is quite a specialist in nitpicking ;-) That's why I'm asking "just" the Drupal community to help us do this.
This is important, among other things, so we can keep track of issues in the included versions of said libraries. If a bug is found in libjs-foo 1.2.3, it's very important for us to know that Drupal includes 1.2.0 (and is vulnerable), or that Drupal includes 1.2.5 (and is OK). It will also allow us to decrease code duplication, as we will be able to use systemwide libraries instead of the ones included (as it might be the case with frameworks, such as Symfony).
Again, this is something I'll end up doing if Drupal does not, but I will deeply appreciate (and of course, am willing to step in and help) if it is accepted!
Comment #25
catch@gwolf you can get this information for assets from https://api.drupal.org/api/drupal/core!core.libraries.yml/8 and PHP libraries from composer.json - does that help?
Comment #26
gwolf commentedcatch: Excellent! It will really help me. Of course, I still have to do some manual work, but *lots* less than what I was expecting to.
Thanks!
Comment #27
catchComment #28
mile23On a related note: #2375997: Avoid tying Drupal 8's composer.json to specific package commits.
Also, many bower/npm packages can be managed through Composer: https://packagist.org/packages/fxp/composer-asset-plugin
Included is a patch which requires jQuery 2.1.1 through npm.
Comment #29
droplet commentedManual Upgrade is easier than you thought. Just nobody would review & commit patches in right time and then endless reload.
npm would include a lot of more files.
Comment #30
mile23@droplet: That's the point. It doesn't use npm or bower itself, just reads in their packages and installs them.
Comment #31
xjmComment #32
dawehner@Mile23
Does that mean we could more easily automate our update process for those libraries?
Reading https://github.com/francoispluchino/composer-asset-plugin/blob/master/Re... this seems to be the case.
I really like that, though I don't know why we can't rely on bower as well.
Comment #33
mile23Bower would have extra requirements, such as installing node. Bower is actually an npm package. :-)
I experimented with this a little more and it's a little bit hit-or-miss in terms of what specific files you can count on being where. For instance, the bit above where I demo requiring jQuery gives you the whole jQuery repo, and maybe not just the bits you care about.
Worth experimentation.
Comment #34
nod_Bower doesn't work, lots of library exclude minified files (I think that's even the recommendation) so we can't count on bower giving optimized production files and we're not in the business of minifying vendor scripts.
#2276785: Evaluate Bower for managing third party scripts
#1663622: Change directory structure for JavaScript files
Comment #35
catchComment #36
catchUpdated the change notice with some steps to get this resolved.
While we might run into issues from particular updates, checking the version number, opening issues and the patch to update the library itself could all be done by contributors new to core, so tagging novice.
The composer/bower discussion here is interesting and could be useful, but feels like a new, major issue to discuss trying to use something like that.
Comment #37
catchComment #38
catchComment #39
catchComment #40
wim leersComment #41
wim leersOops :)
Comment #42
wim leersThere, did a bunch.
Comment #43
droplet commentedShould we do #1341792: [meta] Ship minified versions of external JavaScript libraries at same time ?
Comment #44
catch@droplet yes when upgrading we should use the minified version of the file, then we can close that issue too.
Comment #45
catchPostponed #1341792: [meta] Ship minified versions of external JavaScript libraries on this since we can do them all in one go.
Tagging blocker - although we may just be able to mark that issue duplicate or downgrade to major once this is fixed here.
Comment #46
droplet commentedComment #47
droplet commentedComment #48
mitrpaka commentedComment #49
nod_Put backbone and underscore in same issue.
Comment #50
droplet commentedComment #51
droplet commentedComment #52
wim leers#51: wow, neat!
Comment #53
droplet commentedComment #54
droplet commentedCool. Updated Summary and sent my very last patch this year :)
Comment #55
daffie commentedAdded the update of #2387027: Upgrade PHPUnit to the latest stable release to the list. PHPUnit is not yet part of the core.libraries.yml file. The current version in HEAD is 4.1 and the latest stable version is 4.4. On PHPUnit is to be downloaded from https://github.com/sebastianbergmann/phpunit.
Comment #56
nod_What we mean by assets is Javascript really. Everything that you'd find in
core/assets/vendor, notcore/vendor. PHPUnit is out of scope (also look at the issue component: "javascript").Comment #57
daffie commented@nod_: I have chatted with webchick about this on IRC. And she said that I should add PHPUnit to this meta-issue. If you have a better solution, please let me know.
Comment #58
catch@daffie we've been individually opening critical issues for vendor library updates. I've just opened #2400407: [meta] Ensure vendor (PHP) libraries are on latest stable release as a meta issue to track those and added the PHPUnit issue as a child there. i think it's worth keeping JavaScript vs. PHP updates separate, but not having a meta to track the PHP updates seems like an omission.
Comment #59
daffie commentedRemoved #2387027: Upgrade PHPUnit to the latest stable release from this list. Thanks catch for creating a new issue for the PHP-libraries.
Comment #60
catchComment #61
hass commentedI have seen many libraries have been switched to minified versions within last 14 days. Please see #2400287: Remove all occurences of sourceMappingURL and sourceURL when JS files are aggregated for an issue we need to fix before release or we will see many 404 errors.
Comment #62
hass commentedPlease join #2400675: Missing .map files causing 404 file not found errors to decide if we remove
sourceMappingURLfrom minified JS files in asset folder or if we add the missing .MAP files to core.Comment #63
oriol_e9gComment #64
oriol_e9gComment #65
oriol_e9gComment #66
oriol_e9gComment #67
hampercm commentedComment #68
droplet commentedComment #69
hampercm commentedComment #70
stefan.r commentedComment #71
stefan.r commentedComment #72
stefan.r commentedComment #73
stefan.r commentedComment #74
webchickNote to the folks filing sub-issues:
I talked this issue over with the other branch maintainers the other day. Normally, we would indeed make any issues that are hard blockers to solving critical issues critical as well. However, in the case of meta issues like this where every child issue is essentially a copy/paste of the other ones, it's actually polluting the list of criticals quite a bit, which has a number of down sides: it makes it hard to tell how we're progressing against release; the volume "drowns out" other issues that are actually critical blockers; it also makes it impossible to determine whether an issue involves just routine library updates or if upgrading a library actually is critical (for example, if it solves a security issue).
So please go ahead and just file these children as "normal" unless there's something about the library upgrade that would meet the standard issue priority definitions. Rest assured, we're all constantly looking at the RTBC queue for these library update issues because a) we know they help resolve this critical issue and b) they are normally pretty easy to sign-off on and commit. (If for some reason one of them sits at RTBC for longer than a couple of days feel free to ping one of us about it in #drupal-contribute.)
Comment #75
wim leersCKEditor 4.4.7 is out. Issue to update it: #2415111: Update CKEditor library to 4.4.7.
Comment #76
droplet commentedStable version is : 1.3u ( https://github.com/mattfarina/farbtastic/tree/1.3u )
Comment #77
sidharrell commentedComment #78
sidharrell commentedComment #79
sidharrell commentedThe underscore.js version number was in the backbone.js row.
Comment #80
sidharrell commentedjquery.ui 1.11.3 released Feb 12th.
Comment #81
steamx commentedOutdated* as of 3/20/2015
underscore 1.8.2 (current: 1.7.0)
picturefill 2.3.0-beta (current 2.2.0)
jquery.once 2.0.0 (current 2.0.0-beta3)
jquery.ui 1.11.4 (current: 1.11.2)
*as seen on the table in the initial post
Comment #82
nicrodgersUpdated underscore, picturefill, jquery-once, jquery-ui versions.
Comment #83
nicrodgersUpdated the 'last checked' date to today for every library.
Comment #84
nicrodgersUpdated the instructions as per https://www.drupal.org/node/2203431#comment-9526163 so that newly created issues aren't marked as Critical
Comment #85
kevin morse commentedUpdated underscore version 1.8.2 => 1.8.3 and Date checked for all libraries
Comment #86
stefan.r commentedJust a little summary of open JS updates:
#2462259: Update underscore to 1.8.3
Needs review, testing
#2427649: Update to jQuery UI 1.11.4
Needs patch, review, testing
#2393713: Update JS lib: jquery.form to 3.5.1
Has been tested but needs further review after using different minify method
#2462261: Update picturefill to 2.3.0
RTBC
Comment #87
sidharrell commentedhttps://www.drupal.org/node/2427649
Has patch. Needs review, manual testing.
Comment #88
rainbowarrayPicturefill now updated to 2.3.0.
Comment #89
droplet commentedComment #90
webchickAll external libraries currently in core have been updated to minified versions: #1341792: [meta] Ship minified versions of external JavaScript libraries
We now need to make sure that any additional external library updates we do retain the minified versions. Updating title accordingly.
Comment #91
stefan.r commented...and make sure they all have source maps :)
Comment #92
wim leers+1 to #91: we must not forget to ensure sourcemaps are present and kept in sync!
Comment #93
rainbowarrayCan we put something in the issue summary that links to how to provide a source map? I'm not familiar with how to do that.
Comment #94
martin107 commentedsource maps are cool ...
http://blog.teamtreehouse.com/introduction-source-maps
Comment #95
webchickWe need "how to" instructions for source maps so folks making patches do the right thing.
Comment #96
webchickIssue referenced in #45 is now fixed, removing the blocker tag.
Comment #97
webchickThis is now captured as part of #2485119: [meta] The Drupal 8.0.0-rc1 Release Checklist. Downgrading.
Comment #98
oriol_e9gComment #99
mustanggb commentedUpdates are available for domready, jquery, picturefill, jquery.once and jquery.farbtastic
Comment #100
wim leers@MustangGB: Thank you! :)
Comment #101
mustanggb commentedGave jquery.once a new issue instead of re-using the existing one.
Comment #102
tohesi commentedMaking manual checks for each library.
Comment #103
droplet commentedThanks @tohesi, you can use this script to check the updates :)
Comment #104
tohesi commentedThanks @droplet! Created new issues for Backbone and normalize and updated the table with current core and latest releases. Wasn't sure about farbtastic 1.3u with the u(nofficial) suffix sounding all so suspicious.
Comment #105
tohesi commentedUpdating / adding tasks for updated assets. Also fixed a minor hiccup on the version check script.
Comment #106
tohesi commentedUpdated/added issues for backbone and jquery.once. Updated summary.
Comment #107
tohesi commentedForgot to update the table with the new jquery.once issue reference.
Comment #108
stefan.r commentedComment #109
TJacksonVA commentedUpdated CKEditor, Backbone.js and html5shiv current versions.
Comment #110
anna_j commentedUpdated the table.
Note: jquery.ui.touch-punch states the version number 0.2.3 inside the js file only (https://github.com/furf/jquery-ui-touch-punch/blob/master/jquery.ui.touc...)
Comment #111
anna_j commentedIsn't the ckeditor-dev development repository supposed to be replaced with a production release https://github.com/ckeditor/ckeditor-releases in addition to latest version number?
Comment #112
imiksuComment #113
imiksuComment #114
imiksuComment #115
andypostComment #116
TJacksonVA commentedComment #117
webchickDigging into #2400407: [meta] Ensure vendor (PHP) libraries are on latest stable release uncovered all manner of things that still need doing, so I can only assume this one will too. Escalating to critical, since it blocks RC1, and tagging as an actionable critical.
Comment #118
nod_nah we were diligent and updating regularly. The messy updates are in the past.
Comment #119
chx commentedComment #120
tarekdj commentedComment #121
effulgentsia commentedUpdated the proposed resolution to include information about priority of child issues, copied from #2400407: [meta] Ensure vendor (PHP) libraries are on latest stable release.
Comment #122
webchickComment #123
catchDoes anyone know what the timeline of jQuery 3.0.0 looks like? That alpha has been out since mid-July: http://blog.jquery.com/2015/07/13/jquery-3-0-and-jquery-compat-3-0-alpha...
Conversely does anyone know the support cycle for the 2.x branch once 3.0.0 is out?
My gut is that we should try to get onto the 3.0.x branch for RC if we can to avoid trying to do a major version upgrade in a minor, but releasing with on an alpha version would not be great either. If we opened an issue for that, we could see if there's any problems.
Same questions for picturefill.
ckeditor and its blocker were already bumped to critical.
farbtastic is abandoned, and #2268955: Deprecate farbtastic library is open. It'd be nice to be able to mark a js library as @internal.
Comment #124
attiks commentedhttps://github.com/scottjehl/picturefill/issues/492 for picturefill, which can done later as well, no need to rush.
Comment #125
webchickI believe we are done here. Setting to RTBC.
Comment #126
webchickOops. Silly me, there is still #2521820: Update CKEditor library to 4.5.3. However, that is independently critical.
Comment #127
webchick#2521820: Update CKEditor library to 4.5.3 is in, this one is toast. :) GREAT work, all!!!
Comment #128
mustanggb commented#2505649: Update jquery.once to 2.1.1, #2559299: Update JS lib: backbone to 1.2.3 and #2521820: Update CKEditor library to 4.5.3 have all landed, IS updated.
Comment #130
alexpotthttps://github.com/scottjehl/picturefill is now on 3.0.1 :(
Comment #131
alexpotthttps://github.com/modernizr/modernizr is on 3.1.0
Comment #132
mustanggb commentedThere is an issue for #2568387: Update JS lib: Modernizr to 3.1
Comment #133
wim leersCKEditor has a patch release: #2581291: Update CKEditor library to 4.5.4.
Comment #134
droplet commented#130,
#2577895: Update JS library picturefill to 3.0.1
Comment #135
droplet commented#2614682: Update JS lib: Modernizr to 3.3.1
#2321583: Update CKEditor library to 4.5.5