The core/js-cookie asset library is deprecated in Drupal 10.1.0 and will be removed in Drupal 11.0.0

Created on 10 August 2023, over 1 year ago

Problem/Motivation

Per https://www.drupal.org/node/3322720 , there is no replacement for this js library. We have at this time (Aug 2023) ample time to adjust the code to remove the need for the library.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

heddn Nicaragua

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @heddn
  • 🇳🇴Norway svenryen

    We probably should avoid using that library in 2.x and leave 8.x-1.x at status quo.

  • patch to use js_cookie/js-cookie instead of core/js-cookie

  • revised version of this patch

  • Status changed to Needs review about 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇬🇧United Kingdom schillerm

    Hi, I tried to apply patch #4 to version 2.0.x-dev and got the error, "Could not apply patch!".
    Took a look at the patch and saw that it seems to be trying to remove/update the line..

    "drupal/core": "^8.9 || ^9 || ^10"

    in the file /composer.json.

    In version 2.0.x-dev this line does not have the ^8.9 || bit in it.
    I guess this is why the patch does not apply? or am I patching against the wrong version?

  • Status changed to Needs work about 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    That is correct: The composer.json file contains the following lines.

      "require": {
        "drupal/core": "^9 || ^10",
        "drupal/coloris": "^1"
      },
    

    The patch does not apply to the 2.0.x branch, which is the one to change.

  • First commit to issue fork.
  • Pipeline finished with Success
    about 1 year ago
    Total: 43s
    #54643
  • Pipeline finished with Success
    about 1 year ago
    Total: 43s
    #54649
  • Status changed to Needs review about 1 year ago
  • 🇮🇳India ankithashetty Karnataka, India

    Raised an MR !131 against 2.0.x branch and is ready for review now. Thanks!

  • Status changed to Needs work about 1 year ago
  • heddn Nicaragua

    A bit more work needed here. See MR comments.

  • This is a version of the patch from the MR for the current stable version.

  • Pipeline finished with Success
    12 months ago
    Total: 134s
    #89292
  • Status changed to Needs review 12 months ago
  • 🇮🇳India ankithashetty Karnataka, India

    Thanks @lucashedding, addressed #11 MR comments.
    Please review.

  • Status changed to RTBC 12 months ago
  • heddn Nicaragua

    This looks ready.

  • Pipeline finished with Success
    12 months ago
    Total: 47s
    #89733
  • 🇳🇴Norway svenryen

    @heddn, @ankithashetty, thanks for the contribution to v2.0.x!

    This should be possible to merge (although v2 essentially does nothing at this point and can't be used), and the plan is to rewrite the code and abolish the need of js_cookie:js_cookie in version 2.0.x, or should I close it, leaving a mention that it's obsolete?

    Should we leave this issue open and conclude something so that it doesn't get merged later on?

  • Status changed to Needs work 6 months ago
  • heddn Nicaragua

    I am using this patch on the 1.x branch, not 2.x. It is only assigned to 2.x because typically develop happens on the latest branch and is backported to earlier. If that isn't the case here, we can easily just move it to 1.x, commit things and leave 2.x for a later point.

  • Status changed to Needs review 6 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Pipeline finished with Success
    6 months ago
    Total: 47s
    #233311
  • Status changed to Needs work 6 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    (I apologize: The status change was wrong.)

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The merge request is 119 commits behind the upstream repository.

  • heddn Nicaragua

    It looks like for the 1.x version of this module, js_cookie was entirely removed. That needs to be forward-ported.

Production build 0.71.5 2024