Keep Krate, @krate/runtime, and @krate/components in sync and upgrade safely.
#Upgrading
Krate ships as several packages that must stay on the same minor:
@krate/core— the CLI + Go compiler@krate/runtime— signals, DOM, router, server renderer@krate/components— the built-in component library
#Upgrading a project
npm install @krate/core@latest @krate/runtime@latest @krate/components@latest@krate/core declares an @krate/runtime peer; a version mismatch prints a warning. Upgrade them together.
Then rebuild and check:
krate build
krate check#Prereleases
Prereleases are published under a dist-tag (e.g. beta):
npm install @krate/core@betaPin exact versions in production. Prereleases may change config or output between builds.
#Breaking-change checklist
When upgrading across a minor:
- Read the release notes (GitHub Releases for the tag).
- Re-read Configuration for renamed/removed keys — Krate now warns on unknown config keys.
- Regenerate types:
krate types. - Run
krate build && krate check && npx tsc --noEmit. - Diff
dist/if output shape matters to you.
#Version compatibility
| Package | Requirement |
|---|---|
Node (for npx tsx config + sidecars) | 20+ |
| Go (to build the compiler from source) | see packages/compiler/go.mod |
| Browsers | see Browser Support |
#Rolling back
Pin the previous version explicitly:
npm install @krate/core@0.4.0-rc.4 @krate/runtime@0.4.0-rc.4 @krate/components@0.4.0-rc.4If a build broke after an upgrade, delete stale caches and rebuild:
rm -rf dist .krate#Component library: namespaced parts
@krate/components uses a namespaced compound API: Tabs.Trigger, Breadcrumb.List, Table.Row, Steps.Step, Form.Field, FileTree.Folder, and so on. The older flat exports (TabsTrigger, BreadcrumbList, TableRow, Step, FormField, FileTreeItem, …) still work as deprecated aliases, but prefer the namespaced form — it is what the docs and examples use.
Last updated: 2026-10-16
Contributors: Noinkin