Skip to content

Upgrading

Apps generated by create-dashild and dashild init pin the exact version of the four packages, so nothing changes until you ask:

package.json
"@dashild/core": "0.1.0-alpha.11",
"@dashild/admin": "0.1.0-alpha.11",
"@dashild/prisma": "0.1.0-alpha.11",
"@dashild/cli": "0.1.0-alpha.11"
Terminal window
pnpm dashild upgrade --check

It prints the current and target versions and exits with code 1 when the app is behind. Use it in CI if you want to be told when a new release exists.

Terminal window
pnpm dashild upgrade --dry-run

--dry-run shows the plan without writing or installing.

Terminal window
pnpm dashild upgrade

It:

  1. Resolves the target version from the npm latest tag (the four packages must match; otherwise it stops).
  2. Rewrites the four versions in package.json.
  3. Records the version in dashild.json (stackVersion).
  4. Runs the project’s package manager (pnpm, npm, yarn, or bun).
  5. Runs prisma generate, so the client and the Dashild metadata match the new packages.

Options:

Flag Effect
--tag alpha Use the alpha dist-tag instead of latest.
--to <v> Install an exact version.
--no-install Skip the package manager step.
--no-generate Skip prisma generate.
--cwd <dir> Project root (defaults to the current directory).

dashild init writes panel.ts, policies.ts, runtime.ts, the route, and the auth helpers once. upgrade never rewrites them: they are app code, and a framework that silently replaces them is worse than one that asks.

New files carry a marker with the CLI that created them:

src/dashild/panel.ts
// dashild:generated 0.1.0-alpha.11
import { definePanel } from "@dashild/core";

After an upgrade, the command lists the glue it found and the version in each marker. Files without a marker were generated before markers existed: review them by hand against the current docs. Common changes between releases:

  • A route may need a new prop (themeAction, organizations, …).
  • A generated session may need tenant fields.
  • The panel may need brand or a new resource entry.

If a release changes the glue, the changelog says which file and what to add, and the command points at the Upgrading guide.

Area Why it can break
@dashild/core types Public API changes (defineResource, definePanel, CurrentUser).
Metadata The generator and the runtime share formatVersion; always run prisma generate.
Generated glue New features may require a manual prop or file.
@dashild/admin imports @dashild/admin/ui/* and the Tailwind @source path.
Database Only if the release adds a feature you enable (tenancy adds fields).

While Dashild is alpha, every release documents breaking changes in the changelog and the version keeps the 0.1.0-alpha.N format, so the number alone does not tell you whether an update is safe. Read the entry and run your tests.

From 1.0, semantic versioning applies: breaking changes are major releases with a migration guide.