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 --latestUpdates 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 formatVendor/theme. Accepts wildcards likeVendor/*. 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 rewritespackage.jsonand 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 inpackage.json(package.jsonitself stays untouched). - With
--latest, outdated packages are updated to their latest released versions, grouped by dependency type (dependencies,devDependencies, ...). - Installs
node_modulesfirst 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 thepackage.jsonin the Magento root (copied frompackage.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 nopackage.json, the theme is skipped with a setup hint. Note that with--latestthis major-bumps Grunt tooling used by all standard themes. - Other themes without their own
package.jsonare 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)