Skip to content

feat: add include to registry.json#10708

Merged
shadcn merged 10 commits into
mainfrom
shadcn/registry-include
May 21, 2026
Merged

feat: add include to registry.json#10708
shadcn merged 10 commits into
mainfrom
shadcn/registry-include

Conversation

@shadcn
Copy link
Copy Markdown
Collaborator

@shadcn shadcn commented May 20, 2026

{
  "$schema": "https://ui.shadcn.com/schema/registry.json",
  "name": "acme",
  "homepage": "https://acme.com",
  "include": [
    "components/ui/registry.json",
    "hooks/registry.json"
  ]
}

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ui Ignored Ignored Preview May 21, 2026 12:57pm

Request Review

@shadcn shadcn changed the title fix: include registry sources in generated registry metadata feat: add include to registry.json May 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

can you run pnpm registry:build and commit the json files please?

# Conflicts:
#	apps/v4/registry/directory.json
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

A new prerelease is available for testing:

pnpm dlx shadcn@0.0.0-beta.94d76c5f9

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 include and 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 build to resolve includes and emit a flattened registry.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.

Comment thread packages/shadcn/src/registry/loader.ts
Comment thread packages/shadcn/src/registry/api.ts Outdated
Comment thread apps/v4/public/schema/registry.json
@shadcn shadcn merged commit c8ab380 into main May 21, 2026
12 checks passed
@shadcn shadcn deleted the shadcn/registry-include branch May 21, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants