Upgrade the framework
A framework upgrade is two steps: install the new package versions, then let the upgrade generator update the files the framework manages.
Install the new version
Set @empire-builder-kit/nx and @empire-builder-kit/runtime to the new version in the root package.json, and @empire-builder-kit/runtime in each Slice, then run pnpm install. Use the same version for both packages.
Report, then apply
pnpm nx g @empire-builder-kit/nx:upgrade workspace
pnpm nx g @empire-builder-kit/nx:upgrade workspace --applyWithout --apply the generator reports its plan and writes nothing. Read the report, then run it again with --apply.
Upgrade the workspace root first, then the Foundation, then the root site if you have one, then each Slice:
pnpm nx g @empire-builder-kit/nx:upgrade foundation --apply
pnpm nx g @empire-builder-kit/nx:upgrade site --apply
pnpm nx g @empire-builder-kit/nx:upgrade billing --applyWhat is kept
- Seeded files you edited, such as pages, handlers and records.
- Files you added.
- Every
package.jsonkey the framework does not manage, including your dependencies and scripts. - Your
pnpm-workspace.yaml, including overrides.
Finish with pnpm verify and review the diff before you commit. Ownership and upgrades explains the model.
Dependency updates are separate
Updating next, react, vitest or an AWS SDK client is not a framework upgrade. Change the version in the package.json that declares it and run pnpm install. No generator is involved.
Continue building