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: the source .gitlab-ci.yml has no job that runs it, and no package.json in the repository carries a drupal-libraries block for it to read. It is 112 lines of dead code that reads as live wiring.
A separate note for the maintainer, not fixed here and deserving its own issue: .gitlab-ci-local/expanded-gitlab-ci.yml still names the script, but that file is stale generated output. It carries 9 jobs against the 8 in .gitlab-ci.yml — the extra one being a whole 🧩 (Drupal CMS) Install Educare site template pre-test job the source no longer has. It was committed once (commit b0ac6ad) and never regenerated. It should be regenerated or gitignored; hand-editing generated output is worse than leaving it alone.
Steps to reproduce
- Check out the
1.0.xbranch. - Grep the repository for the script:
git grep -n drupal-libraries-sync 1.0.x. The only hit is the script file itself. - Read
.gitlab-ci.yml: no job copies, references or runs it. - Grep every
package.jsonin the repository for adrupal-librariesblock: 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 educare-3620349
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
Comment #3
rajab natshahComment #5
rajab natshah✅ Released educare-1.0.0-alpha3
Comment #6
rajab natshahComment #7
rajab natshah