Problem/Motivation

Varbase 11 used to get six front-end libraries by running scripts/drupal-libraries-sync.js, a Node script that copied files out of node_modules/ into web/libraries/, driven by a drupal-libraries block plus six npm dependencies and a postinstall hook in package.json. That is replaced by Composer packages on Packagist, each required by the module or the varbase_* recipe that actually loads it: vardot/aos 2.3.4, vardot/jquery.fancytree 2.38.5, vardot/ckeditor5-media-embed-drupal 47.6.2, vardot/ace 1.44.0 and vardot/dropzone 5.9.3 (all type: drupal-library, all on Packagist), plus swagger-api/swagger-ui, which drupal/openapi_ui_swagger already required and which only needed an installer path.

This project still carries scripts/drupal-libraries-sync.js (112 lines). This copy was already dead before the Composer move: .gitlab-ci.yml has no job that runs it, and the repository has no package.json at all, so nothing carries the drupal-libraries block the script reads. It is 112 lines of dead code that reads as live wiring.

Steps to reproduce

  1. Check out the 1.0.x branch.
  2. Grep the repository for the script: git grep -n drupal-libraries-sync 1.0.x. The only hit is the script file itself.
  3. Read .gitlab-ci.yml: no job copies, references or runs it.
  4. Grep every package.json in the repository for a drupal-libraries block: there is none.

Proposed resolution

Delete scripts/drupal-libraries-sync.js. Nothing in the repository reads it, so this removes dead code and no behaviour.

Verified on a freshly installed Varbase 11.4.5 site in DDEV with the packages resolved from Packagist and no VCS repositories: 14/14 declared library files present, 10/10 assets HTTP 200, 7/7 Drupal libraries discovered with every asset resolving, status report green, and yarn install succeeds with none of the six npm library packages present.

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ❌ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes
  • ❌ Release

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Removed the unused scripts/drupal-libraries-sync.js. The front-end libraries come from Composer packages required by the modules and recipes that load them.

Issue fork rightup-3620354

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

  • rajab natshah committed 98969a0c on 1.0.x
    task: #3620354 Remove the dead drupal-libraries-sync.js script
    
rajab natshah’s picture

Status: Active » Needs review
rajab natshah’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajab natshah’s picture

Issue tags: +rightup-1.0.0-alpha1

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.