Fix contrib using VERSION in library definitions

Created on 26 July 2024, 5 months ago
Updated 5 August 2024, 5 months ago

Problem/Motivation

See 🐛 libraries.yml version properties depend upon drupal core Needs work and #2205027: VERSION in library declarations does not work for contributed/custom modules

Basically a lot of contrib is using VERSION as the version in their info files. This is wrong, since this is the Drupal core version, and means that files might not get cache busted when they change, if Drupal core's version doesn't change.

Steps to reproduce

Proposed resolution

While we wait for core to fix the problem, or contrib to remove the VERSION from library definitions we could alter the libraries for contrib projects to fix them up.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom steven jones

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

Merge Requests

Comments & Activities

  • Issue created by @steven jones
  • Status changed to Needs review 5 months ago
  • 🇬🇧United Kingdom steven jones

    This needs a review.

    By default, it's going to try to add the module/theme version to the core version where VERSION is being used, but it can also add the deployment identifier and hash the whole lot, in case we want that.

  • 🇬🇧United Kingdom james.williams

    I've reviewed the code and I think I'm happy, though I couldn't actually reproduce the issue locally, with this fixing it, in the first place. What conditions & steps would demonstrate it? I tried with CSS/JS aggregation on & off; with & without a deployment_identifier (and changing it); with & without caching enabled in devtools' network tab.

Production build 0.71.5 2024