Concrete
ReferenceCLI

concrete upgrade

The `concrete upgrade` command — its flags, exit codes and constraints.

Move the workspace to a newer @homepages/concrete and run its codemods.

Synopsis

concrete upgrade [--dry-run] [--to <version>]

Flags

FlagTypeDefaultWhat it does
--dry-runbooleanfalsePrint the plan and change nothing
--to <version>string—Move to this exact version instead of the published latest

Exit codes

CodeWhen
0the workspace was moved and every codemod ran, it was already on the target, or it says why nothing could be changed (no lockfile, nothing installed, an unreachable registry)
1the install fails, a codemod fails, --to names a version the registry does not carry, or it runs outside a workspace

Constraints

  • Installs the target first, then runs every codemod the installed release lists above the version the workspace was on, oldest release first.
  • Prints each codemod as it runs, with every file it rewrote and every file it could not rewrite and why.
  • A file no codemod could rewrite, and a step no codemod could take, is printed for you to do by hand; the upgrade still exits 0.
  • A codemod that fails stops the chain: the ones after it do not run.
  • Codemods run forward only. Moving to an older version moves the package and runs none.
  • --dry-run reads the target's codemods out of its published tarball without installing anything.
  • Reads the registry fresh, never the currency preamble's cache.
  • A release version is stamped as a caret; a prerelease is pinned exactly.
  • Needs no terminal — it runs the same in CI, down a pipe, and in a container.
  • A failed install puts package.json back the way it was, and no codemod runs.

See also