Skip to content

Latest commit

 

History

History
132 lines (109 loc) · 5.83 KB

upgrading.md

File metadata and controls

132 lines (109 loc) · 5.83 KB
title Upgrading & Versioning
id upgrading
order 2
description Breaking changes in the TanStack CMS 1.0 line as a changelog, plus the semantic versioning and support policy that applies from 1.0 on.
keywords
tanstack cms
upgrade
migration guide
breaking changes
semver
support policy

TanStack CMS has not shipped a stable release yet. During the alpha, breaking changes are a changelog, not a migration apparatus: update every @tanstack/cms-* package together (they share one version), re-read the docs for anything you use, and adjust. Your data upgrades itself — on first start the store runs its migrations; take a copy of your data directory before upgrading anyway.

User-facing codemods begin at the first breaking change after 1.0 ships; until then, any codemods are internal repo tooling, not a distributed command.

Breaking changes

The notable breaking changes made while reaching 1.0, newest areas first. Each is a change to make in an app that used an earlier alpha; see the linked docs for the current shape.

Auth, roles & access

  • Production requires defineCms({ auth }); without it, admin access is off outside development.
  • Roles and permissions replace ad-hoc admin/editor checks; author/editor carry agent.use by default.
  • Reads take an access context; there is no publicRead flag — the public-site read is siteReadContext.
  • Field access reaches nested fields and sees the whole document.
  • Tighter defaults for implicit admin and the shared MCP key; MCP agent identity is credential-bound (no self-asserted header).

Config & content model

  • The content model moves to cms.definition.ts (defineCollection, defineBlock); block renderers, field inputs and cells move out of the config into the UI layer.
  • AI, MCP and Start are optional peers; AI adapters are passed in via defineCms({ ai }).
  • No behaviour is keyed on collection names.
  • Plugins, content migrations, and the one content event bus.

Reads, writes & routes

  • Store reads are async and paginated.
  • One read vocabulary (get, list, relations populated by default) and one write vocabulary (save, act); the deprecated verbs are removed.
  • Content events, pending changes and scheduling.
  • Locators and nested slugs; collections are served at their locators.
  • Virtual routes moved and the Vite plugin is required; createRoutes replaces cmsVirtualRoutes.
  • The HTTP API is versioned under /api/cms/v1.

Storage, media & surfaces

  • Storage is Postgres-only. The SQLite (node:sqlite), Cloudflare D1, libSQL/Turso (@tanstack/cms-store-libsql), and read-only Markdown storage adapters, along with the createSqlStorage SQL-driver kit (SqlDriver, createMutex, createD1Storage, createSqliteStorage, and friends), were removed. Use embedded Postgres (PGlite) in development — the default — and a Postgres server via createPostgresStorage() from @tanstack/cms-store-postgres in production. Custom adapters implement the StorageAdapter interface directly and pass @tanstack/cms-core/storage/conformance. Markdown content in the repo is loaded with loadMarkdownDir() from @tanstack/cms-api/markdown, not a storage adapter.
  • Storage and media are pluggable; published documents keep a draft.
  • Site components moved to @tanstack/cms-ui-react/site; on-page editor and WebMCP export names changed.
  • The event stream requires content.read; request hardening.

Versioning policy

From 1.0, TanStack CMS follows semantic versioning. The 1.0 packages (cms-core, cms-api, cms-client, cms-ui-react, cms-store-postgres, cms-media-s3, and cms-cli) share one version number. The 1.0 promise is TanStack Start with the React admin, on top of framework-neutral headless APIs (the core engine, the HTTP API, and the client).

Public API (changes only in a major release):

  • Every export from a package entry point listed in its package.json exports.
  • The defineCms config shape and the field, collection, and block definitions.
  • The HTTP API under /api/cms/v1: paths, inputs, outputs, and error codes. Breaking changes ship as /api/cms/v2, with v1 kept for at least one major release.
  • The tanstack-cms CLI commands and flags.
  • The storage format: a newer release always opens and migrates a database created by an older one. Migrations only move forward, so back up before upgrading.

Experimental (can change or be removed in any release):

  • @tanstack/cms-ui-dom. It stays on 0.x with its own version number until it reaches parity with the React admin.
  • Exports prefixed unstable_.
  • WebMCP: the in-page agent tools (WebMcpBadge in the React admin, webMcpBadge and startWebMcpServer in Svelte) and the /api/cms endpoint behind them. The HTTP MCP server at /api/mcp is covered.

Not covered (can change in a minor release):

  • Admin UI markup, styling, and default message wording. Override a route if you depend on its markup.
  • Internal tables and columns of the Postgres storage adapter.

Support policy

  • The latest 1.x minor receives bug fixes and security fixes.
  • When 2.0 ships, the last 1.x minor receives security fixes for six months.
  • Supported runtimes: active and maintenance LTS versions of Node.js, starting at 22.13. CI runs on Node 22.13 and the current .nvmrc version. Bun and Deno are expected to work with createPostgresStorage and createS3Media, but are not tested in CI; bugs on them are fixed on a best-effort basis.
  • Pre-releases (alpha, beta, rc) are published under those npm tags and are not supported once the next stage ships.

Report security issues privately through GitHub security advisories on TanStack/cms, not public issues.