task: #3620353 Install the front-end libraries with Composer, not drupal-libraries-sync
Issue: https://www.drupal.org/project/horizonaid/issues/3620353
What and why
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.
Horizon Aid is the only one of the site templates whose wiring for this script was still live, so this is the one that actually changes CI behaviour.
- Removes
scripts/drupal-libraries-sync.jsandscripts/assets/drupal-libraries.package.json(which existed only to feed that sync). - Rewires the Drupal CMS pre-test job in
.gitlab-ci.yml: it no longer writes apackage.json, no longer copies the script in, and no longer runs yarn at all. - Requires
mnsami/composer-custom-directory-installerand wires the two installer paths a genericweb/libraries/{$name}rule cannot place:web/libraries/swagger-uiforswagger-api/swagger-ui(which istype: library, notdrupal-library), and the nestedweb/libraries/ckeditor5/plugins/media-embedthatdrupal/ckeditor_media_embedloads from. - Asserts the library files the
.libraries.ymlentries load are on disk, instead of counting entries in apackage.jsonblock. A count could pass while an installer path was wrong or an upstream layout had changed.
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.
AI-Generated: Yes
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release