- Search across multiple registries and make the registry argument
optional: omit it to search every registry configured in components.json
(builtins like @shadcn excluded). Without a components.json or configured
registries, a clear usage error is printed.
- Add a --type filter (accepts "ui" or "registry:ui", comma-separated)
with validation against the known item types.
- Fetch registries concurrently with a capped worker pool, preserving
result order.
- Tolerate per-registry failures when searching all configured registries
(reported in a structured `errors` field); exit non-zero when every
registry fails. Usage errors print directly instead of routing through
handleError.
- MCP parity: optional registries (search-all), a `types` filter, and type
validation across the search/list/examples tools.
- Keep the public registry surface to `searchRegistries` and make it
self-contained (clears its own context, useCache defaults to false).
- Consolidate search formatting into registry/search, add the `errors`
field to searchResultsSchema, and update the skill docs.
* fix(tests): wait for registry readiness in global setup instead of per-test sleep
The first e2e test was flaky on CI because `start-server-and-test` only
checks that the root URL (http://localhost:4000) responds before running
tests, not the /r registry endpoint. The existing 2-second hardcoded sleep
in the first test was unreliable on slower CI runners.
Move the readiness check into the vitest globalSetup so all tests wait for
the registry /r endpoint to actually be reachable before any test starts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(tests): fix race condition in global setup - poll correct URL and CLI binary
Two issues caused the previous fix to fail:
1. Was polling `http://localhost:4000/r` which is a directory → always 404.
Now polls `{REGISTRY_URL}/index.json`, a real static file that returns 200.
2. The v4 dev script (`pnpm --filter=shadcn build && pnpm icons:dev & next dev`)
runs the shadcn CLI build in the background while next dev starts immediately.
On fast CI runs start-server-and-test can detect the server as ready before
the CLI binary (packages/shadcn/dist/index.js) has been built, causing the
first test to fail when it tries to invoke the CLI.
Now explicitly waits for the binary to exist before any test runs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(tests): warm up /init route in global setup to prevent first-test timeout
The CLI's first request during `shadcn init` hits the dynamic Next.js /init
route. On a cold dev server this route takes ~1.8s to compile. Combined with
the rest of what init does (pnpm install, file writes), this pushes the first
test over the 30s CLI timeout on CI. Subsequent tests pass because the route
is already warm.
Polling /init in global setup ensures the route is compiled before any test
runs, making the first test's CLI invocation as fast as all subsequent ones.
Also replaced the /r/index.json poll (a static file that responds immediately
and doesn't reflect real route readiness) with the actual /init route poll,
which also naturally verifies the registry server is up.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(tests): warm up 404 route and increase default CLI timeout
Two more issues found in CI logs:
1. The CLI requests font files that don't exist (e.g. /r/styles/new-york-v4/
font-geist.json), causing Next.js to compile /_not-found/page on the first
404 response. That compilation takes ~4-5s on a cold dev server and is
another hidden cost on the first test. Now triggering a 404 in global setup
so the not-found page is compiled before any test runs.
2. The default CLI timeout of 30s is too tight for CI. Even with the /init and
404 routes pre-warmed, pnpm install inside the fixture takes ~25s, leaving
only ~5s of headroom. Increasing the default from 30s to 60s gives a
comfortable buffer without masking real hangs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Updated dependencies to fix Next.js and React CVE vulnerabilities.
The fix-react2shell-next tool automatically updated the following packages to their secure versions:
- next
- react-server-dom-webpack
- react-server-dom-parcel
- react-server-dom-turbopack
All package.json files have been scanned and vulnerable versions have been patched to the correct fixed versions based on the official React advisory.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
* feat(shadcn): add support for registries index
* fix
* fix
* chore: changeset
* feat(shadcn): update handling of add commands
* feat: add support for known registries
* docs: update index docs