Update a deployed PDS
Cirrus is published as @getcirrus/pds on npm. Updating means installing a newer release, making any project changes that release requires, and redeploying. upgrade-pds does the first part and writes down the second.
Run the updater
Section titled “Run the updater”From the project directory:
npx upgrade-pds@latestThe updater:
- resolves the
latestnpm release of every@getcirrus/*package the project depends on directly - shows the versions it will change and asks for confirmation
- updates
package.json, keeping each caret, tilde, or exact version style, and runs the project’s package manager - writes a work order to
.cirrus/UPGRADE.md
It does not edit wrangler.jsonc or your worker source, set secrets, or deploy.
To see what would change without touching the project:
npx upgrade-pds@latest --dry-runOther options:
| Option | Effect |
|---|---|
--to <tag> | Install another npm dist-tag, such as next |
--yes | Apply without the confirmation prompt |
--json | Print the plan as JSON without changing files |
--cwd | Run against a project in another directory |
--from <version> | Cover releases after an earlier @getcirrus/pds version |
--to takes a dist-tag, not a version. Dependencies must already be installed, so the updater can read the versions in node_modules.
Follow the work order
Section titled “Follow the work order”.cirrus/UPGRADE.md contains:
- the package versions that changed, including
@getcirrus/oauth-providerand@getcirrus/spaces, which are installed through@getcirrus/pds - every release entry between the old and new versions, in full
- a link to the project template for the new release, to compare your
wrangler.jsoncand worker entry against - the build, deploy, and verification commands for your package manager
Hand the file to a coding agent, or work through it yourself. Most entries need no action. An entry that requires a change to an existing project says what to change.
The work order is specific to one upgrade. The updater puts a .gitignore inside .cirrus, so the directory stays out of your repository without a change to your own .gitignore.
If the packages were already updated
Section titled “If the packages were already updated”The updater asks your deployed PDS which version it is running, using PDS_HOSTNAME from wrangler.jsonc. If production is behind the version installed in the project, the work order starts from the deployed version, so it covers everything the next deploy changes. If the PDS can’t be reached, the updater starts from the installed version. To choose the starting version yourself:
npx upgrade-pds@latest --from 0.18.0It writes a work order for every release after that version, and updates any package that is still behind. If the project installs @getcirrus/pds from a local path or a workspace, --from also switches it to the npm release.
Test locally
Section titled “Test locally”pnpm devThe Vite dev server starts the Worker locally on port 5173. Use pds status --dev and pds passkey list --dev to verify auth and the Durable Object still work as expected.
Deploy
Section titled “Deploy”pnpm run deployThis builds the worker and deploys it to Cloudflare. The Durable Object’s storage is preserved. Existing sessions remain valid unless a release explicitly invalidates them (the changelog calls this out).
After deploy, run pds status against production to confirm the upgraded Worker is healthy.
Roll back
Section titled “Roll back”If the new release is broken, roll back by pinning the previous version:
pnpm add @getcirrus/pds@<previous-version>pnpm run deployThe work order lists the previous version of each package. A Durable Object class migration that has been deployed stays deployed, and rolling back across a release that migrated storage may not work. The changelog flags this.
Update by hand
Section titled “Update by hand”The updater is a convenience. The same upgrade without it:
- Check the installed version with
pnpm list @getcirrus/pds. - Read the changelogs for
@getcirrus/pds,@getcirrus/oauth-provider, and@getcirrus/spacesfrom your version to the latest. - Run
pnpm update @getcirrus/pds --latest. - Make the project changes the entries call for, then test and deploy as above.
Updating the scaffolder
Section titled “Updating the scaffolder”The scaffolder (create-pds) is a separate package. It does not need to be updated to update an existing deployment; create-pds is only used to scaffold a new project.
To use a newer scaffolder for a new project:
npm create pds@latest