Problem/Motivation

We should update all of core's remaining JavaScript dependencies prior to 9.0.0-beta1, including any major version updates that may be available.

Proposed resolution

Here's a table of all core's JS dependencies and what to do with them:

Dependency Proposed resolution and/or issue
package.json (dev) dependencies #3101543: Update core JavaScript dependencies listed in package.json
Backbone #3105231: Update backbone.js to 1.4.0
CKEditor N/A; we are retaining CKEditor 4 for 9.x. 9.0 and 8.9 should use the same version of CKEditor. CKEditor should be updated to 4.13.1, which was released a few days after 8.8.0 shipped with 4.13.0: #3105327: Update CKEditor to version 4.13.1. CKEditor should be updated to 4.14.0, which shipped the day after 8.8.3: #3120022: Update CKEditor to version 4.14.0.
Farbtastic No new stable release since 2010. Repository is a read-only on github.
jquery TBD. jQuery 4 is still under development. If it is available before 9.0.0 we should try to make Drupal compatible. jQuery 4 development progress: https://github.com/jquery/jquery/milestone/7
jquery-form On latest release (4.2.2) of jquery-form as of Nov. 2019. No new releases since 2017.
jquery-joyride Confusing, since 2.0.0 is listed as the "latest release" despite 2.1 existing, but we appear to be on the latest release (2.1.0) of jquery-joyride. No new releases since 2013 (or 2014?)
jquery-once We are on 2.2.0. jquery-once 2.2.3 is available as of Nov. 2019.#3100943: Update jquery-once to 2.2.3
jquery.cookie On the latest jquery.cookie version (1.4.1) as of Nov. 2019. #2550717: [JS] Replace jQuery.cookie with JS-cookie and provide a BC layer
jquery.ui N/A. Project is EOL and forked into core. #3087685: Remove deprecated jQuery UI components and fork remaining source code into core
modernizr Modernizr 3.8.0 is available as of Nov. 2019. We are on 3.3.1. #3100937: Update modernizr to 3.8.0
normalize-css New major versions of Normalize are available (up to 8.0.1). We are on 3.0.3. #2821525: Update normalize.css to the most recent version
picturefill Picturefill 3.0.3 is available as of Nov. 2019. We are on 3.0.1. #3100939: Update picturefill to 3.0.3
popperjs Popper.js 2.0.0 was released on 22nd January. We are on 1.16.0. #3108402: Update to Popper.js to 2.0.0
sortable Sortable 1.10.2 is available as of Dec. 2019. We are on 1.10.1. #3111244: Update SortableJS to 1.10.2
underscore Underscore 1.9.1 is available as of Nov. 2019. We are on 1.8.3. #3101643: Update Underscore. to 1.9.1

Remaining tasks

Create issues for the above where an update is available (or locate existing issues, e.g. for Normalizer). Re-review the versions immediately prior to 9.0.0-beta1.

User interface changes

API changes

Data model changes

Release notes snippet

Comments

xjm created an issue. See original summary.

lauriii’s picture

Should we also update packages in package.json?

xjm’s picture

Issue summary: View changes
xjm’s picture

Issue summary: View changes

Fixing IS markup.

xjm’s picture

Title: [plan] Update core JavaScript dependencies prior to 9.0.0-beta1 » [plan] Update core JavaScript (and CSS) dependencies prior to 9.0.0-beta1
Issue summary: View changes
Issue tags: +9.0.0 release notes, +Needs release note

Adding data on all the versions.

mradcliffe’s picture

Added some related issues. There is probably some additional info. in comments and issue summary related to this in #3042182: Update core JavaScript libraries before 8.9.0/9.0.0.

There is a replacement for jquery-cookie as js-cookie, which is in Need review.

mradcliffe’s picture

Issue summary: View changes

Looking at #3074267: Replace jQuery UI position() with PopperJS, I think popper.js is the minified version of 1.15.0, but that isn't guaranteed. I couldn't find any other mention of updating.

I did confirm the md5 checksum of popper.min.js in core is e21a6649041ef6f5f1bf43f11946621f, which is the same as the one available at https://unpkg.com/popper.js@1.15.0/dist/umd/popper.min.js.

gábor hojtsy’s picture

Issue summary: View changes
mradcliffe’s picture

Issue summary: View changes

I added not about github repository being read-only for farbtastic.

tedbow’s picture

Issue summary: View changes
tedbow’s picture

lauriii’s picture

Opened #3101543: Update core JavaScript dependencies listed in package.json for dependencies listed in package.json.

bnjmnm’s picture

Issue summary: View changes

Added normalize.css issue

bnjmnm’s picture

Issue summary: View changes

Updated IS with underscore issue.

bnjmnm’s picture

Issue summary: View changes

Added Popperjs issue to IS

bnjmnm’s picture

Issue summary: View changes

Added SortableJS issue to IS.

xjm’s picture

Issue summary: View changes

I just checked the progress on jQuery 4 development. It is 50% complete (up from 46% a month ago): https://github.com/jquery/jquery/milestone/7

Seems like an alpha is still a ways off, but I added the above link to the summary for easier tracking.

xjm’s picture

Issue summary: View changes
xjm’s picture

Issue summary: View changes
bnjmnm’s picture

Issue summary: View changes

Added backbonejs issue

lauriii’s picture

Issue summary: View changes
wim leers’s picture

Issue summary: View changes

D8/D9 are on CKEditor 4.13.0. Shortly after 8.8.0 shipped, 4.13.1 was released. See #3105327: Update CKEditor to version 4.13.1.

andypost’s picture

New release https://github.com/jashkenas/underscore/releases/tag/1.9.2 but changes only in docs and tests

lauriii’s picture

Opened new issue for updating stylelint to 13.0.0: #3107926: Update stylelint to ^13.0.0.

lauriii’s picture

Issue summary: View changes

Popper.js 2 has been released #3108402: Update to Popper.js to 2.0.0.

kingdutch’s picture

Gabor asked for feedback on Twitter, so here we are :D

It may not fit entirely in this issue but has there been any discussion on moving front-end dependencies to composer using asset-packagist? I realise this is different from what the rest of the front-end world does but it does fit better with what some contrib projects (Open Social in our case) are doing. It also makes these sorts of decisions easier/moot in the future because proper conflicts can be detected by composer if Drupal updates something that doesn't work with a module or theme.

If that route isn't chosen, by all means, please update everything that's possible, it's probably the only opportunity in a while. Most dependencies in the list can either be overwritten by themes (normalize et al) or scoped to certain code (jQuery et al).

lauriii’s picture

Opened new issue to prepare for the release of Yarn 2: #3109556: Update from Yarn 1 to Yarn 4.

lauriii’s picture

@Kingdutch Thank you for the review! The discussion about moving frontend dependencies to Composer using asset-packagist is happening in #2873160: Implement core management of 3rd-party FE libraries. If you have some more time to help us out, we could also use some help reviewing the child issues updating specific libraries 😇

kingdutch’s picture

I will check out the issue, thanks! We're currently hard at work on the Open Social 8.0 release. If there's updates left after this I'll be sure to take a look :)

damienmckenna’s picture

Issue tags: +Drupal 9.0-beta1 requirement

Tagging as a requirement for Drupal 9.0-beta1.

damienmckenna’s picture

Issue tags: -Drupal 9.0-beta1 requirement +Drupal 9.0.0-beta1 requirement
sasanikolic’s picture

New version of SortableJS is available. Created a followup with a patch for it #3111244: Update SortableJS to 1.10.2.

bnjmnm’s picture

Issue summary: View changes
catch’s picture

js-cookie just released beta4 four days ago, so we should keep an eye on that (probably after beta).

https://github.com/js-cookie/js-cookie/releases/tag/v3.0.0-beta.4

wim leers’s picture

wim leers’s picture

Issue summary: View changes
xjm’s picture

Status: Active » Fixed

We should probably mark this fixed now, and if we do additional updates they can be added as separate related criticals.

Thanks to everyone who helped get our JavaScript in shape for D9!

briancoffelt’s picture

Is this issue in the queue for a Drupal 8 fix. Modernizr 3.3.1 has a security vulnerability: https://snyk.io/test/npm/modernizr/3.3.1 and needs to be bumped up to at least 3.4.0.

Status: Fixed » Closed (fixed)

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

tim.plunkett’s picture

Issue tags: -Needs release note