Problem/Motivation
Per discussion in #3238507: Drupal 10 JavaScript dependency plan, the js-cookie library is unused in core after refactoring elsewhere. It is however used in multiple contrib modules.
We should deprecate it in 10.1.0 for removal in 11.0.0 to have one less external JavaScript dependency. Not sure if this also needs us to create a contrib module for it, but probably.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
The js-cookie library is unused in core after refactoring. js-cookie has therefore been deprecated as a core dependency and there is no replacement. Contributed modules or custom code relying on this library should declare their own dependency on it.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | interdiff.7-8.txt | 665 bytes | spokje |
| #9 | 3296086-8.patch | 3.21 KB | spokje |
Comments
Comment #2
catchComment #3
catcherr can't deprecate and delete the asset file at the same time...
Comment #5
spokjeLooks good, but (probably?) needs CR and release notes.
Comment #6
spokjeAdded CR and added that to the deprecation message.
Comment #7
smustgrave commentedAs we discussed in slack
https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/tests/Drupal...
https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/tests/Drupal...
May be good examples of testing deprecated libraries.
Comment #8
spokje@smustgrave said:
I answered:
(Slack thread: https://drupal.slack.com/archives/C04CHUX484T/p1671032144226969)
INSTA-EDIT: shakes fist in anger at the far to nimble typer smustgrave
Comment #9
spokjeAnother angry fist shake at PHPCS
Comment #10
spokjeComment #11
spokjeComment #12
smustgrave commentedTests look good.
Thanks!
Comment #14
spokjeRandom Chrome-Broke-Down JS test failure, back to RTBC and ordered a retest to make sure.
Comment #15
xjmAdded a proper release note. It still handwaves a bit how contrib should add JS dependencies, but good enough for now.
Comment #17
xjmCommitted the deprecation to 10.1.x. Thanks! I also published the CR after adding a few words.
Comment #19
dave reidI have added a new module https://www.drupal.org/project/js_cookie for this library dependency. I will work on updating the change record as appropriately with before/after instructions.
Comment #20
darvanenIt looks to me like we've missed removing core/js-cookie from 11.x so far... what are the steps to get that to happen, or is it too late?