CLI
tenon upgrade
Move a project to the latest version.
tenon upgrade installs the latest version of tenoncms in your project. Run it in the folder with your package.json.
Usage
npx tenon upgrade
- The CLI compares the installed
tenoncmswith the latest version on npm. If they are the same, it says so and stops. - It shows both versions and a link to the release notes.
- It shows the install command and asks before it runs it.
- It installs the new version with your package manager.
The CLI picks the package manager from the lockfile: pnpm-lock.yaml, yarn.lock, bun.lock or package-lock.json. Without a lockfile, it uses the one that runs the CLI.
- It upgrades
tenoncmsonly, independenciesordevDependencies, where it is now. - It needs access to the npm registry.
- It warns when
package.jsonstill lists@tenoncms/cli. Remove that package.
Before an upgrade
Below 1.0, a new minor version MAY break your project, for example 0.27 to 0.28. The CLI warns you when that is the case.
- Read the release notes of every version in between.
- Back up the database:
npx tenon backup - Run
tenon upgrade, then start the project. The new version updates its tables on the first start.
An upgrade can add database migrations, and migrations only go forward. To go back to the old version, keep the backup. See Upgrades and schema changes.
Related resources
- Upgrades and schema changes: what changes in the database, and how to roll back.
- tenon backup: back up first.