Search

Tip: type a command such as theme build. Press Esc to close.

mageforge:dependencies:update

Update the Node.js dependencies of themes

Since v0.28.0Dependenciesalias: dependencies:update

Run it

bin/magento mageforge:dependencies:update <theme-code> [<theme-code> ...]
bin/magento mageforge:dependencies:update Vendor/theme
bin/magento mageforge:dependencies:update Vendor/theme --dry-run
bin/magento mageforge:dependencies:update Vendor/theme --latest

Updates the Node.js dependencies (npm packages) of one or more themes. Works with all themes that ship their own package.json, e.g. Hyvä and TailwindCSS themes (web/tailwind/package.json). For standard Magento themes (e.g. Magento/luma) the Node.js setup in the Magento root is updated instead, since that is what builds their assets.

Arguments:

  • themeCodes — One or more theme codes in format Vendor/theme. Accepts wildcards like Vendor/*. If omitted, an interactive prompt lets you select themes.

Options:

  • --dry-run — Only show the outdated packages without changing anything.
  • -l, --latest — Update packages beyond their semver ranges to the latest available versions. This rewrites package.json and may pull in breaking changes.

Behavior:

  • Shows a table of all outdated packages (current, wanted, latest version and dependency type) per theme.
  • By default runs a safe npm update: packages are only updated within the semver ranges defined in package.json (package.json itself stays untouched).
  • With --latest, outdated packages are updated to their latest released versions, grouped by dependency type (dependencies, devDependencies, ...).
  • Installs node_modules first if missing, so the report is meaningful.
  • Themes installed in vendor/ (managed by Composer) are skipped with an explanation.
  • Standard Magento themes (Luma-based, no own package.json) fall back to the package.json in the Magento root (copied from package.json.sample), which powers their Grunt build. The root setup is shared, so it is updated at most once per run; if the Magento root has no package.json, the theme is skipped with a setup hint. Note that with --latest this major-bumps Grunt tooling used by all standard themes.
  • Other themes without their own package.json are skipped.
  • After a successful update, a hint reminds you to rebuild the affected themes with mageforge:theme:build.

Version history

  • v0.28.0 – Add auto dependency updater (+1 more)