Skip to content

Commit

Permalink
(11/n) shadcn: filter out deprecated from --all (#6617)
Browse files Browse the repository at this point in the history
* fix(shadcn): filter out deprecated from --all

* chore: changeset
  • Loading branch information
shadcn authored Feb 11, 2025
1 parent 202131c commit bd8533b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/proud-snails-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"shadcn": patch
---

filter out deprecated from --all
6 changes: 5 additions & 1 deletion packages/shadcn/src/commands/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,11 @@ async function promptForRegistryComponents(
}

if (options.all) {
return registryIndex.map((entry) => entry.name)
return registryIndex
.map((entry) => entry.name)
.filter(
(component) => !DEPRECATED_COMPONENTS.some((c) => c.name === component)
)
}

if (options.components?.length) {
Expand Down

0 comments on commit bd8533b

Please sign in to comment.