Replace jquery/fancytree in the composer with npm-asset/jquery.fancytree:~2

Created on 25 August 2024, 3 months ago
Updated 9 September 2024, 2 months ago

Problem/Motivation

Taxonomy Manager 2.0.13 was release on: 12 Aug 2024 by: VladimirAus
https://www.drupal.org/project/taxonomy_manager/releases/2.0.13

Thank you, Vladimir

in the release they had
📌 Install jquery.fancytree via Composer instead of CDN Fixed

Which brings issues when Updating and a new install of Varbase
🐛 2.0.13 won't update Active

Reported the composer regression at
Change require custom libraries to suggestions as a better method with more options Needs work

OPTION #2 is my preferred method

The jquery.fancytree library is in https://www.npmjs.com
Which allows us to get npm-asset/jquery.fancytree using the composer

OPTION #2:

Define npm-asset repository in the composer.json file, to allow downloading the jquery.fancytree library to the correct folder:

1. Configure with composer commands by following steps.

composer config repositories.assets composer https://asset-packagist.org
composer config --unset repositories.0
composer config repositories.drupal composer https://packages.drupal.org/8
composer config --json extra.installer-types '["npm-asset", "bower-asset"]'
composer config --json extra.installer-paths.web\/libraries\/fancytree '["npm-asset/jquery.fancytree"]'
composer config --unset extra.installer-paths.web\/libraries\/\{\$name\}
composer config --json extra.installer-paths.web\/libraries\/\{\$name\} '["type:drupal-library", "type:bower-asset", "type:npm-asset"]'

2. Require the composer installer extender

composer require oomphinc/composer-installers-extender

3. Require the JQuery Fancytree library

composer require npm-asset/jquery.fancytree:~2

Check that you have the library in the libraries folder.

4. Require Taxonomy Manager module

composer require drupal/taxonomy_manager:~2

5. Enable the Taxonomy Manager module with Drush

drush en taxonomy_manager

Proposed resolution

Change composer.json file to have

  "replace": {
    "drupal/statistics": "*",
    "jquery/fancytree": "*"
  },
    "npm-asset/jquery.fancytree": "~2"
      "docroot/libraries/fancytree": ["npm-asset/jquery.fancytree"],
        {"name": "fancytree", "package": "npm-asset/jquery.fancytree"}

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ✅ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-10.0.1

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3470134 : Replace jquery/fancytree in the composer with npm-asset/jquery.fancytree:~2
📌 Task
Status

Fixed

Version

10.0

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

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

Comments & Activities

Production build 0.71.5 2024