feat: add include to registry.json#10708
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
|
can you run |
# Conflicts: # apps/v4/registry/directory.json
Contributor
|
A new prerelease is available for testing: pnpm dlx shadcn@0.0.0-beta.94d76c5f9 |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for composing registry.json via an include field, enabling large registries to be split across multiple registry chunks while still producing a flattened, consumer-ready registry catalog.
Changes:
- Extend the registry schema to support
includeand introduce a “chunk” schema for included registry files. - Add a registry loader that resolves
include, validates include trees, rewrites item file paths, and supports loading a single item with file contents. - Update
shadcn buildto resolve includes and emit a flattenedregistry.json, plus update schemas/tests/docs accordingly.
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/shadcn/src/registry/schema.ts | Adds include support and introduces registryChunkSchema for composable registry chunks. |
| packages/shadcn/src/registry/schema.test.ts | Adds tests for chunk parsing, root requirements, and items/include presence rules. |
| packages/shadcn/src/registry/loader.ts | New loader that resolves include, validates trees, rewrites paths, and loads catalogs/items. |
| packages/shadcn/src/registry/loader.test.ts | New tests for include resolution, validation, path handling, and loader behavior. |
| packages/shadcn/src/registry/index.ts | Exposes new loader APIs and new error types from the registry entrypoint. |
| packages/shadcn/src/registry/errors.ts | Extends error types (validation/not-found) and enriches parse/local-file errors with options. |
| packages/shadcn/src/registry/api.ts | Rejects consumer registries that still contain include and centralizes catalog parsing. |
| packages/shadcn/src/registry/api.test.ts | Adds coverage for rejecting remote registries that return include. |
| packages/shadcn/src/commands/build.ts | Switches build to use include-aware loader and writes flattened registry.json when needed. |
| packages/shadcn/src/commands/build.test.ts | Adds test ensuring build outputs flattened registry catalog and item JSON for include-based sources. |
| apps/v4/public/schema/registry.json | Updates published JSON Schema with include and chunk-friendly optional fields. |
| apps/v4/lib/docs.ts | Updates docs routing metadata to point to registry docs pages. |
| apps/v4/content/docs/registry/registry-json.mdx | Documents include usage and clarifies items defaulting/requirements. |
| apps/v4/content/docs/registry/registry-index.mdx | Updates title/heading structure for the registry directory page. |
| apps/v4/content/docs/registry/meta.json | Reorders/updates registry docs navigation pages. |
| apps/v4/content/docs/registry/getting-started.mdx | Major docs refresh: adds include-based structure guidance and producer-side loader examples. |
| apps/v4/content/docs/changelog/2026-05-registry-include.mdx | Adds changelog entry announcing registry include support and loader APIs. |
| apps/v4/content/docs/(root)/meta.json | Updates root docs metadata list. |
| apps/v4/content/docs/(root)/_v0.mdx | Adds “Open in v0” documentation content. |
| .changeset/rotten-humans-cover.md | Declares a minor release for the shadcn package. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
{ "$schema": "https://ui.shadcn.com/schema/registry.json", "name": "acme", "homepage": "https://acme.com", "include": [ "components/ui/registry.json", "hooks/registry.json" ] }