Skip to content

chore(deps): install plugin dependencies with one script - #1128

Merged
Genyus merged 1 commit into
developfrom
chore/local-deps-script
Nov 16, 2026
Merged

Genyus merged 1 commit into
developfrom
chore/local-deps-script

Conversation

@Genyus

@Genyus Genyus commented Nov 16, 2026

Copy link
Copy Markdown
Member

Problem

install-ssp and update-ssp walked the plugins with a chain of cd commands, listing each plugin by hand. Only cbf-multisite installed its npm dependencies, through its own hooks, and || true hid any npm failure. The chain also installed each plugin's dev dependencies on the servers, even under the deploy's composer install --no-dev.

Change

  • scripts/local-deps.sh install|update runs composer (with --working-dir) and npm (with --prefix) in every web/app/plugins/cbf-* plugin that has a composer.json or package.json. New plugins are picked up without editing a list.
  • The root post-install-cmd and post-update-cmd call it, through the local-deps:install and local-deps:update scripts.
  • Plugins follow the root's dev mode (COMPOSER_DEV_MODE), so the servers get --no-dev. The only plugin dev dependency is composer/installers, which has no effect on plugins installed in place.
  • npm is skipped under --no-dev (the servers), in CI (assets are built in their own step in deploy-application.yml), and when npm isn't installed.
  • A failing command stops the run; the last > line names the plugin.
  • cbf-multisite's npm install || true and npm update || true hooks are removed, and the deploy-push.yml comment is updated.

Testing

Ran composer run-script post-install-cmd locally:

  • --no-dev: each plugin installed without dev dependencies, no npm
  • CI=1: each plugin installed with dev dependencies, no npm
  • Default: composer and npm install in each plugin with a package.json, lockfiles unchanged

The update path wasn't run, to avoid rewriting the lockfiles; it's the same loop.

Replace the cd chains in install-ssp and update-ssp with
scripts/local-deps.sh, which runs composer and npm in each
web/app/plugins/cbf-* plugin. The semantic glossary plugins now get
their npm dependencies too, and cbf-multisite's own npm hooks go.

Plugins follow root --no-dev, and npm is skipped under --no-dev and in
CI, which builds assets separately. Failures now stop the run instead
of being ignored.
@Genyus
Genyus merged commit 06b64bb into develop Nov 16, 2026
4 checks passed
@Genyus
Genyus deleted the chore/local-deps-script branch November 17, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant