|
1 | 1 | --- |
2 | | -title: May 2026 - Registry Include |
3 | | -description: Organize large registries with included registry.json files. |
| 2 | +title: May 2026 - Registry Include and Validate |
| 3 | +description: Organize and validate source registries. |
4 | 4 | date: 2026-05-20 |
5 | 5 | --- |
6 | 6 |
|
7 | | -We've added support for `include` in `registry.json`. |
| 7 | +This release adds two updates for registry authors: |
| 8 | + |
| 9 | +- `include` for composing large source registries from multiple `registry.json` |
| 10 | + files. |
| 11 | +- `shadcn registry validate` for checking source registries before publishing. |
| 12 | + |
| 13 | +This makes it easier to maintain source and dynamic registries without keeping |
| 14 | +one large `registry.json` file by hand. |
8 | 15 |
|
9 | 16 | Registry authors can now organize a large source registry across multiple |
10 | 17 | `registry.json` files and compose them with `shadcn build`. |
11 | 18 |
|
12 | | -```txt |
| 19 | +```txt /registry.json/ |
13 | 20 | registry.json |
14 | 21 | components |
15 | 22 | └── ui |
|
23 | 30 | ``` |
24 | 31 |
|
25 | 32 | {/* prettier-ignore */} |
26 | | -```json title="registry.json" showLineNumbers |
| 33 | +```json title="registry.json" showLineNumbers {6-7} |
27 | 34 | { |
28 | 35 | "$schema": "https://ui.shadcn.com/schema/registry.json", |
29 | 36 | "name": "acme", |
@@ -64,6 +71,21 @@ registry metadata. |
64 | 71 | registry, so a file declared in `components/ui/registry.json` is written as |
65 | 72 | `components/ui/button.tsx` in the built registry item. |
66 | 73 |
|
| 74 | +## Validate your registry |
| 75 | + |
| 76 | +You can now validate a source registry before publishing or serving it. |
| 77 | + |
| 78 | +```bash |
| 79 | +npx shadcn registry validate |
| 80 | +``` |
| 81 | + |
| 82 | +Validation runs against the source registry files directly. You do not need to |
| 83 | +run `shadcn build` first. |
| 84 | + |
| 85 | +The command checks the root `registry.json`, included registry files, item |
| 86 | +schema errors, duplicate item names, include rules, and local item file paths. |
| 87 | +Validation reports all actionable errors it can find in one run. |
| 88 | + |
67 | 89 | ## Registry loaders |
68 | 90 |
|
69 | 91 | The `shadcn/registry` package also exports `loadRegistry` and |
|
0 commit comments