How to upgrade a distribution-based project#
Use this guide in projects based on a frontend distribution where frontend/Makefile provides an upgrade target.
Prerequisites#
repository.tomlcontains[frontend.package]with:base_packagepath
The add-on package at
pathdeclares the distribution package inpackage.json.frontend/scripts/upgrade-distribution.jsexists in the project.frontend/Makefilehas anupgradetarget that runs:
upgrade:
node scripts/upgrade-distribution.js
pnpm exec prettier --log-level silent --write volto.config.js
For setup details, see How to configure a project based on a distribution to ensure versions are consistent with the distribution.
Upgrade steps#
First, update and pin the frontend distribution version in your project dependencies, as described in How to upgrade a distribution version.
To upgrade the frontend distribution to the latest version, run:
uvx repoplone deps upgrade frontend
Or pin a specific version:
uvx repoplone deps upgrade frontend <version>
From the project root, run:
make -C frontend upgrade
or
cd frontend make upgrade
Install and sync dependencies:
make frontend-installReview generated changes in:
frontend/volto.config.jsfrontend/mrs.developer.json
Run tests:
make test
What make upgrade updates#
Rewrites
frontend/volto.config.jsdistribution block with:distribution
namedistribution
versionresolved
volto_versiondistribution
dependencies
Preserves existing
addonsandthemeinvolto.config.js.Updates
frontend/mrs.developer.jsonwith the resolvedcore.tag(volto_version).The effective dependency sync happens when you run
make frontend-installafter runningmake upgrade.During install,
frontend/scripts/.pnpmfile.cjsenforces the versions listed indistribution.dependenciesfromvolto.config.js.