mirror of
https://github.com/unovue/shadcn-vue.git
synced 2026-09-14 19:59:38 +08:00
dev
* fix(cli): explain Tailwind v4-only items instead of a bare 404 Items that only ship for the new-york-v4 style (message, bubble, attachment, marker, questionnaire, message-scroller) are absent from the legacy new-york registry. Projects whose components.json still has a non-empty tailwind.config resolve to new-york and get: The item at .../styles/new-york/message.json was not found. It may not exist at the registry. which reads as "this item does not exist" and sends people looking for a missing registry file. On a 404 under styles/new-york, probe the same item under the v4 style. If it is there, throw RegistryStyleNotFoundError naming the style and pointing at the tailwind.config field. Items missing from both styles still throw RegistryNotFoundError unchanged. Closes #1947 * fix(cli): scope the style fallback probe to the shadcn-vue registry Follow-up to the review on #1951: - Only probe when the 404 came from the shadcn-vue registry. A third-party registry can share the `/styles/{style}/{name}.json` shape, and it should not receive an unexpected HEAD or a shadcn-specific Tailwind suggestion. - Probe with the headers resolved for the requested item. The header context is keyed by the exact item url, so the fallback url never had any, which meant the probe went out unauthenticated against private registries. - Pass `retry: 0` so a dead host doesn't double the added latency. - Surface the fallback url in the error message instead of only carrying it on the error, and attribute the v3 configuration to components.json. - Make the "should not probe" test assert on the requests msw saw. The probe swallows every error, so the previous version passed either way - widening the guard to also match new-york-v4 left all four tests green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(cli): resolve the target style for top-level registry items `add message` on a Tailwind v4 project with a stale `tailwind.config` in components.json fetched `styles/new-york/message.json` and 404'd, because fetchRegistryItems resolved the style straight from config.style while resolveRegistryDependencies routed it through getTargetStyleFromConfig, which upgrades "new-york" to "new-york-v4" for Tailwind v4 projects. An item and its registryDependencies could therefore resolve under two different styles. Both paths now share resolveTargetRegistryStyle, so the item resolves the same way its dependencies already did and the fallback error added in this PR is left for genuine Tailwind v3 projects. The style is resolved once per batch and only when a bare item name needs it, so url, local and namespaced items still skip project detection. Closes #1947 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: zernonia <59365435+zernonia@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
shadcn-vue
A set of beautifully designed components that you can customize, extend, and build on. Start here then make it your own. Open Source. Open Code. Use this to build your own component library.
Documentation
Visit http://shadcn-vue.com/docs to view the documentation.
Contributing
Please read the contributing guide.
License
Licensed under the MIT license.
Languages
Vue
64.8%
TypeScript
30%
CSS
5.1%
