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
  1. The CLI compares the installed tenoncms with the latest version on npm. If they are the same, it says so and stops.
  2. It shows both versions and a link to the release notes.
  3. It shows the install command and asks before it runs it.
  4. 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 tenoncms only, in dependencies or devDependencies, where it is now.
  • It needs access to the npm registry.
  • It warns when package.json still lists @tenoncms/cli. Remove that package.
Shows the versions and the command, and installs nothing.Installs without asking. Without a terminal, it is required.

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.

  1. Read the release notes of every version in between.
  2. Back up the database:
    npx tenon backup
    
  3. 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.