Contract 2.0.0 is a breaking change for config and install paths. There are no production users assumed on v1; treat this as a clean cut.
| Area | v1 | v2 |
|---|---|---|
| Framework | vite-react required for init |
react | svelte | … | none |
| Init requirements | Vite + React project | Any folder; optional package.json |
| Install root | Implicit src/… mix |
Explicit dir + canonical folders |
| File paths | Basename flatten | Preserve target / nested path |
| Types | Limited set | Adds registry:utils, registry:widget |
| Utility map | ui8kit.map.json from utility-props*.ts |
Removed |
| JSON Schema emit on build | Yes | Removed |
| Runtime deps | Heavy (chalk, ora, typescript, …) | commander, prompts, zod |
| Node engines | 18+ | 20+ |
Before
{
"framework": "vite-react",
"componentsDir": "./src/components",
"libDir": "./src/lib"
}After
{
"contractVersion": "2.0.0",
"framework": "react",
"runtime": "react",
"dir": "src",
"typescript": true,
"globalCss": "src/index.css"
}Soft-migration: reading framework: "vite-react" rewrites to "react" at load time, but you should commit the new shape.
If v1 flattened Button.tsx into a single folder, v2 may create nested directories from registry targets. Plan a one-time:
ui8kit reset --yes # or manually remove old kit folders
ui8kit init --yes --framework react --dir src
ui8kit add --all --forceUpdate app imports to the new layout / aliases.
- Delete reliance on
ui8kit.map.jsongeneration (move safelist generation to codegen if needed) - Stop expecting
packages/registry/schema/**frombuild - Keep using
scan→buildfor/rartifacts registry cleanstill removes leftover map/schema paths if present
v1 CDN overrides still work; prefer config fields:
{
"registryUrl": "https://cdn.example.com/r",
"registryVersion": "0.1.0",
"strictCdn": true,
"cdnBaseUrls": ["https://cdn.example.com/r"]
}- Node
>=20in local + CI - Replace
vite-reactwithreact(or other) - Set
dir/paths/runtime - Re-install kit with
add --force - Fix Tailwind content paths
- Fix app import paths
- Authors: rebuild registry without map/schema assumptions
- Document new
--registry-urlfor consumers