Upgrading from an older alpha

One ordered path from any alpha to the current beta: the commands to run, then the code changes your starting version needs.

Jazz releases almost every day, so you may be several releases behind. This page is the whole path from your version to the current beta in one pass. It has two parts: the commands, which depend only on your starting version, and the code changes, which depend on what your app uses. The details of each change are in Backups and Upgrades, section by section; this page puts them in order.

Upgrade on a clean Git working tree, and commit after each step, so you can review each diff.

Find your starting version

Then work down the code changes from there to the end.

Commands

The examples use npm. With pnpm or Yarn, use pnpm add -E or yarn add -E for the installs, and pnpm exec or yarn in place of npx for the installed version. Bump every Jazz package your app depends on to the same version as jazz-tools (jazz-napi, for example).

From alpha.60–alpha.62

alpha.66 moved your schema and permissions into schema.ts, and jazz-tools upgrade converts an app to that form. It's on npm up to alpha.70 (beta.0 removed it), and it reads the jazz.app.json and jazz.permissions.json files that validate writes from alpha.63 on. So you pass through alpha.65 to write those files first:

Terminal
npx jazz-tools migrations create # with your version still installed
npm install -E jazz-tools@2.0.0-alpha.65
npx jazz-tools validate # writes jazz.app.json and jazz.permissions.json
npx jazz-tools@2.0.0-alpha.70 upgrade # converts the app to schema.ts
npm install -E jazz-tools@latest
npx jazz-tools generate
  1. migrations create records your current schema.ts as the app's first version, so later schema changes can be migrated. Run it before you change the schema. If migrations/snapshots/ already has a snapshot of your current schema, it says so and changes nothing.
  2. validate on alpha.65 writes the two JSON files. alpha.63 or alpha.64 works too, but alpha.62 and older don't write them. upgrade's error on an app without them suggests running validate with the version you have, which isn't enough below alpha.63: install alpha.65 as above.
  3. upgrade from alpha.70 needs alpha.65 or older still installed: run it before you install the latest. It rewrites schema.ts, moves your permissions into it, deletes permissions.ts and migrations/index.ts, rewrites imports, and checks that the converted app deploys exactly as the old one did. Review the diff; Run jazz-tools upgrade and review the diff lists what it does, and What it refuses what stops it.
  4. generate on the latest version checks schema.ts and writes the JSON files and jazz.generated.ts. Commit them.

From alpha.63–alpha.65

Your version already writes the JSON files, so run validate with it, then the same conversion:

Terminal
npx jazz-tools validate # with your version still installed
npx jazz-tools@2.0.0-alpha.70 upgrade
npm install -E jazz-tools@latest
npx jazz-tools generate

If validate tells you the project has no schema snapshot yet, run npx jazz-tools migrations create first, as above.

From alpha.66 on

Your app is already on schema.ts:

Terminal
npm install -E jazz-tools@latest
npx jazz-tools generate

validate is gone from beta.0: use generate.

Before you run upgrade

upgrade stops, before writing anything, at some things it can't convert. Two that apps commonly hit:

  • A named import of permissions.ts. upgrade converts only its default export. If your backend has import { permissions } from "./permissions", export the permissions as the default and import them as import permissions from "./permissions", then run upgrade again.
  • Computed fields and transforms. Take them out before upgrading and add them back after, as Computed fields and transforms describes.

Code changes

Each section is one release step: start at the one the table names and work down to the end. Each says who it affects and links to the details. Your typecheck finds most of them, so run it once the commands are done, and again after the changes. A step with no section needs no code changes (alpha.64 to alpha.65, and alpha.66 to alpha.67).

alpha.58 or older

Upgrade to alpha.59 first, one release at a time, following the upgrade notes in each release on GitHub: alpha.55 and alpha.56 change the sync protocol (upgrade clients and servers together), alpha.56 changes how schemas are declared (export your schema first, as its notes say), and alpha.57 removes ReadTier.RemoteIfPossible. alpha.59 is a non-breaking upgrade from alpha.58. Then continue with the next step.

alpha.59 to alpha.65

alpha.60 moved Jazz into your backend and its data to SQLite, so this step is the biggest: your app needs a backend with createJazz, auth moves into authenticate, and a self-hosted data directory is moved with the exporter and importer attached to alpha.65. Follow Upgrading from alpha.59 to alpha.65, then run the commands From alpha.63–alpha.65 and continue at alpha.65 to alpha.66.

alpha.60 to alpha.61

Client sessions and auth: one session object, device accounts in place of local-first auth, and expiresAt from authenticate. Names you'll change include:

  • acceptLocalFirstAuth → acceptDeviceAccounts;
  • initial: "local-first" → <JazzProvider config={{ initial: "device", … }}>;
  • useJazzAuth() and the account state hooks → useJazzSession();
  • createLocalFirst(), restoreLocalFirst(secret) and exportLocalFirstSecret(…) → createDeviceAccount(), restoreDeviceAccount(key) and session.exportDeviceKey(), for passkeys and recovery phrases.

The full table, and moving device-account keys useLocalFirstAuth kept, are in Upgrading from alpha.60.

alpha.61 to alpha.62

  • Apps defined with { migrations: "none" } ship their migrations instead (the migrations create command above records the first version).
  • vercel() takes a namespace.
  • Better Auth 1.7.22, with a schema migration.
  • React Native needs a new native build.

See Upgrading from alpha.61.

alpha.62 to alpha.63

Nothing beyond the commands: validate writes jazz.app.json and jazz.permissions.json.

alpha.63 to alpha.64

Your code doesn't change. A few edge cases behave differently: some serializable windowed reads are refused, negated policies compare claims by the column's type, and schema is an ES module namespace, so spying on or assigning to its members throws. See the alpha.64 release notes.

alpha.65 to alpha.66

The upgrade command converts the app to schema.ts. Besides reviewing its diff: validate is now generate, schema changes start in schema.ts, slicing is removed, and createJazz takes the generated app and the imported jazz.permissions.json. See Upgrading from alpha.65.

alpha.67 to alpha.68

On Vercel, vercel() takes a required region: add region: "iad1" to keep your existing cores. See Upgrading from alpha.66.

alpha.68 to alpha.69

session.authMode is "device-account", not "local-first", in permissions and app code, and a few error codes and APIs are renamed. Permissions that still compare with "local-first" stop working on an alpha.69 core, so on Jazz Cloud upgrade the core and redeploy your backend together. See Upgrading from alpha.68.

alpha.69 to alpha.70

Jazz needs Node.js 22.18 or later.

alpha.70 to beta.0

beta.0 removes everything earlier alphas deprecated, such as useSession(), the alpha.61 auth stubs and the local_first Rust names. Most of them fail at build time. See Upgrading from alpha.70 to beta.0.

beta.0 to beta.1

Kotlin (experimental) installs from the GitHub release instead of Maven Central. See Upgrading from beta.0 to beta.1.

beta.1 to beta.2

TypeScript apps change nothing. The experimental native clients do:

  • Kotlin: plain Maven builds depend on tools.jazz:jazz-kotlin-jvm, and close() returns before the native core has finished (closeAndWait() waits).
  • Swift: JazzError has a new case, stillQueued, so an exhaustive switch over it needs it.
  • Rust: shutdown and close fail calls waiting on the server with Error::Stopped.

See Upgrading from beta.1 to beta.2.

beta.2 to beta.3

No code changes. A backend no longer follows a redirect from a remote core: configure remote() or durableObjects() with the core's final URL. See Upgrading from beta.2 to beta.3.

Later releases

From beta.0 on, a release that has to break something stable gets its own section in Backups and Upgrades: work through those from your version on.

Deploying

You don't need to deploy the versions in between: run the commands, make the code changes, then deploy once. Deploy your backend and your clients together, and back up first, as Upgrading between releases describes. A self-hosted data directory last written by alpha.60 or later opens in the current release; one from alpha.59 or older has to be moved as alpha.59 to alpha.65 describes.

For an AI coding assistant

Give it this page and the sections it links to, with a prompt such as: "Upgrade this app from jazz-tools 2.0.0-alpha.60 to the latest version following 'Upgrading from an older alpha'. Run the commands in order and commit after each one, then make the code changes from 'alpha.60 to alpha.61' on, run the typecheck and npx jazz-tools generate, and show me the diff." Review the diff before you deploy.