Update Klaro! libraries

Created on 18 December 2024, 3 days ago

Problem/Motivation

According to #3491681 we have to update our library klaro_js.

The current dev version loads klaro-no-translations-no-css.js which does not export the klaro object - so Klaro! will fail at all in the moment!

I suggest in future to require a fixed version so we can update and test independently from contrib.

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇩🇪Germany jan kellermann

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

Comments & Activities

  • Issue created by @jan kellermann
  • 🇩🇪Germany jurgenhaas Gottmadingen

    I have updated the 3.0.x branch of the klaro_js library which made the latest version available at https://packagist.org/packages/drupal/klaro_js#3.0.x-dev

    What would be great, if the composer.json of the Klaro module could declare the constraint like this:

            "drupal/klaro_js": "^3.0 || ^3.0.x-dev"
    

    That way, Drupal projects would load the latest 3.0 stable release, but if we add the dev requirement in a Drupal project for development, we could force the usage of the dev version without having to make any changes to the module ever.

  • 🇩🇪Germany jan kellermann

    I changed the composer.json. Now we can install the dev version for testing.

    But I expect the versions to be dependent on each other in the future, so I would prefer to have some control of the requirement and use ~3.0.0.

    Then we could publish the new klaro_js with breaking changes independent from klaro module and use it for testing the dev-version of klaro.

    And in case of security updates we have to update klaro module every time, because an update of klaro_js ist not visible in the Drupal update report.
    And we have to guarantee backwards compatibility, which doesn't work if the systems automatically update the library but not the module.

    So I would prefer ~ requirement

            "drupal/klaro_js": "~3.0.0 || ^3.0.x-dev"
    
  • 🇩🇪Germany jurgenhaas Gottmadingen

    We probably don't even need the || ^3.0.x-dev part. I've tried in a project with the Klaro module dev release and required the dev release of the library in the project, which still works, even though the module requires ^3.0.

    So, it would be sufficient to require ~3.0.0 as you described.

  • 🇩🇪Germany jan kellermann

    I changed to ~3.0.0 in Dev.

  • 🇩🇪Germany jan kellermann

    New version is tagged. Thanks to @jurgenhaas!

Production build 0.71.5 2024