Problem/Motivation
Drupal 10 is scheduled to ship sometime in 2022. We should plan what to do with each of our JavaScript dependencies.
CKEditor is not part of this list, it will be handled as part of #3231364: Add CKEditor 5 module to Drupal core
Package |
Description |
Action |
Issue |
@babel/core |
ECMAScript 5 build |
Remove |
|
@babel/preset-env |
ECMAScript 5 build |
Remove |
|
@babel/register |
ECMAScript 5 build |
Remove |
|
@drupal/once |
Drupal Once |
Keep |
|
@popperjs/core |
Library for positioning elements |
Remove |
#3301545: Remove popperjs from Drupal 10 |
babel-plugin-add-header-comment |
ECMAScript 5 build |
Remove |
|
Backbone |
JavaScript framework used by CKEditor 4, QuickEdit, Contextual Links, Tour, and Toolbar. |
Remove |
|
chalk |
Babel and jQuery UI build tools |
Remove |
#3266274: Remove chalk as a dependency |
chokidar |
Babel and PostCSS build tools |
Keep |
|
chromedriver |
Nightwatch testing |
Update |
#3306446: Update Nightwatch to 2.4.1/#3306450: Update Chrome container to use newer version |
cross-env |
Babel and jQuery UI build tools |
Remove |
#3278415: Remove usages of the JavaScript ES6 build step, the build step itself, and associated dev dependencies |
cspell |
Spell check |
Update |
#3306441: Update to the latest cspell version (6.8.1) |
css.escape |
Internet Explorer 11 Polyfill |
Remove |
#3238501: Remove empty and deprecated IE11 polyfill library stub entries in 11.0.0 |
dotenv-safe |
Nightwatch testing |
Keep |
|
es6-promise |
Internet Explorer 11 Polyfill |
Remove |
#3238501: Remove empty and deprecated IE11 polyfill library stub entries in 11.0.0 |
eslint |
JavaScript linting |
Update |
#3265618: Update to eslint 8 |
eslint-config-airbnb |
JavaScript linting |
|
#3239838: Update core eslint configuration to remove unused React and JSX rules |
eslint-config-prettier |
JavaScript linting |
Update |
|
eslint-plugin-import |
JavaScript linting |
Update |
|
eslint-plugin-jquery |
JavaScript linting |
Keep |
|
eslint-plugin-jsx-a11y |
JavaScript linting |
|
#3239838: Update core eslint configuration to remove unused React and JSX rules |
eslint-plugin-prettier |
JavaScript linting |
Update |
|
eslint-plugin-react |
JavaScript linting |
|
#3239838: Update core eslint configuration to remove unused React and JSX rules |
eslint-plugin-react-hooks |
JavaScript linting |
|
#3239838: Update core eslint configuration to remove unused React and JSX rules |
eslint-plugin-yml |
YAML linting |
Keep |
|
farbtastic |
Color picker |
Remove |
|
glob |
Babel, PostCSS and jQuery UI build tools |
Keep |
|
joyride |
Required for BC in Drupal 9 |
Remove from Drupal 10 |
#3268228: Remove Jquery joyride |
jquery |
Remove |
#3052002: [meta] Replace JQuery with vanilla Javascript in core |
|
jquery-form |
Remove |
||
jquery-once |
Required for BC in Drupal 9 |
Remove from Drupal 10 |
|
js-cookie |
Cookie library |
Keep |
|
loadjs |
used for the add_js Ajax command |
Keep |
|
minimist |
Babel, PostCSS and jQuery UI build tools |
Keep |
|
mkdirp |
Nightwatch testing |
Keep |
|
nightwatch |
Nightwatch testing |
Update |
#3306446: Update Nightwatch to 2.4.1 |
normalize.css |
CSS |
Keep |
|
picturefill |
Internet Explorer 11 Polyfill |
Remove |
#3238501: Remove empty and deprecated IE11 polyfill library stub entries in 11.0.0 |
postcss |
CSS build tool |
Update |
|
postcss-calc |
Internet Explorer 11 Polyfill |
Remove |
#3238501: Remove empty and deprecated IE11 polyfill library stub entries in 11.0.0 |
postcss-header |
CSS build tool |
Update |
|
postcss-import |
CSS build tool |
Update |
|
postcss-preset-env |
CSS build tool |
Keep |
|
postcss-pxtorem |
CSS build tool |
Update |
|
postcss-url |
CSS build tool |
Update |
|
prettier |
JavaScript linting |
Update |
|
raw-loader |
CKE5 plugins build dependency |
remove |
#3319917: Remove raw-loader dependency |
shepherd.js |
Tour |
Update |
#3265619: Update Shepherd.js to 9.x |
sortablejs |
Sorting library |
Update |
|
stylelint |
CSS linting |
Keep |
|
stylelint-checkstyle-formatter |
CSS linting |
Keep |
|
stylelint-config-standard |
CSS linting |
Keep |
|
stylelint-order |
CSS linting |
Update |
|
tabbable |
Library for checking tabbable elements |
Keep |
|
terser |
jQuery UI build tools, needs issue for updating to latest |
Update |
#3296481: Update terser and terser-webpack-plugin to the latest versions |
underscore |
This is a dependency of Backbone. Usage outside of that is |
Remove | #3239796: [meta] Remove dependency on Underscore.js outside of Backbone and mark it internal |
Modernizr |
Feature detection for JS behaviors |
Remove |
#3101922: Find replacement for Modernizr touchevent test and deprecate , #3239980: Deprecate Modernizr |
Comments
Comment #2
nod_Comment #3
lauriiiAdded link to Underscore.js issue.
Comment #4
nod_Comment #5
nod_Comment #6
nod_Comment #7
xjmComment #8
xjmThanks, I incorporated the issues from this plan into #3118154: [meta] Deprecate dependencies, libraries, modules, and themes that will be removed from Drupal 10 core by 9.4.0-beta1.
The issues in the list are a mix of the deprecation/decoupling issues for D9 and the actual removals for D10. E.g., are the IE11 polyfills and Modernizr already deprecated, or do we still need to add deprecations for those before we remove them from 10.0.x?
Comment #9
mherchelRelated #3258114: Upgrade Chromedriver.
Comment #10
alexpottIn order to update chalk to the latest version if looks like we have to change quite a bit. If you run yarn upgrade --latest and then the build command you'll get
I'm not sure the extent of the changes necessary but https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c looks quite involved.
Comment #11
xjmComment #12
xjmComment #13
lauriiiComment #14
effulgentsia CreditAttribution: effulgentsia at Acquia commentedFor jquery-form, I wrote in #3189416-9: Remove jQuery Form dependency from misc/ajax.js that we might want to keep it but as internal only, just like the Backbone decision in #3145958: [META] Re-evaluate use of Backbone.js in core.
Perhaps there are other ones in this issue's table we should do that with as well?
Comment #15
xjmUpdating to clarify that Joyride and jQuery Once are required for BC in D9 and that we need issues to remove them from 10.0.x HEAD.
Comment #16
mradcliffeI created a child issue for #3267791: Remove deprecated jquery.cookie shim.
Comment #17
lauriiiComment #18
lauriiiComment #19
lauriiiComment #20
lauriiiComment #21
effulgentsia CreditAttribution: effulgentsia at Acquia commentedThe only "Remove" left in the table without an issue link is jquery-once.
Comment #22
effulgentsia CreditAttribution: effulgentsia at Acquia commentedAlso, I think that at this point, "Remove" is the incorrect action for jquery, at least for D10.
Comment #23
lauriiiOpened issue for removing jquery-once.
Comment #24
lauriiiComment #25
lauriiiShould we remove
js-cookie
as well given that its only usage in core was removed in #3267791: Remove deprecated jquery.cookie shim?Comment #26
nod_I would say yes, the work to get rid of the need for cookies on the frontend bears fruit :)
Comment #27
xjmComment #28
SpokjeComment #29
SpokjeComment #30
catchOpened #3296086: Deprecate/remove js-cookie dependency per #25.
Comment #31
kostyashupenkoOpened #3296481: Update terser and terser-webpack-plugin to the latest versions
Comment #32
SpokjeComment #33
quietone CreditAttribution: quietone at PreviousNext commentedComment #34
SpokjeComment #35
SpokjeComment #36
SpokjeComment #37
nod_Comment #38
nod_Comment #39
effulgentsia CreditAttribution: effulgentsia at Acquia commentedWe're coming up on the one year anniversary of this issue. So much great progress since then! The title of this issue is "Drupal 10 JavaScript dependency plan", but some of the items seem clearly to be Drupal 11 material at this point, such as #3238501: Remove empty and deprecated IE11 polyfill library stub entries in 11.0.0 which is now explicitly Drupal 11 and #3052002: [meta] Replace JQuery with vanilla Javascript in core which perhaps some of the items can still happen in Drupal 10 but the thing in its entirety is impractical for Drupal 10 at this point.
I think it would be helpful at this point to clone this issue into a "Drupal 11 JavaScript dependency plan", and update the summary of each to be appropriate for each respective version. I think that would help clarify which of these items, if any, are still needed before we tag a Drupal 10 beta, or can still happen during the beta.
Comment #40
nod_Comment #41
lauriiiClosing this as Drupal 10 has shipped.