Skip to content

Commit 127912d

Browse files
fix: buggy rendering in component add command due to lots of items (#159)
* Use JSON5 for parsing tsconfig * fix: buggy rendering in component add command due to lots of items --------- Co-authored-by: Stefan E-K <[email protected]>
1 parent 520da18 commit 127912d

File tree

4 files changed

+6747
-5144
lines changed

4 files changed

+6747
-5144
lines changed

.changeset/tidy-ways-learn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"solidui-cli": patch
3+
---
4+
5+
fix buggy rendering in component add command due to lots of items

packages/cli/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,14 @@
4646
"@babel/core": "^7.25.2",
4747
"@babel/parser": "^7.25.6",
4848
"@babel/plugin-transform-typescript": "^7.25.2",
49-
"@clack/prompts": "^0.7.0",
49+
"@clack/prompts": "^0.9.0",
5050
"chalk": "^5.3.0",
51-
"commander": "^12.1.0",
52-
"execa": "^9.4.0",
53-
"recast": "^0.23.9",
54-
"ts-morph": "^18.0.0",
55-
"tsconfig-paths": "^4.2.0"
51+
"commander": "^11.0.0",
52+
"detect-package-manager": "^3.0.1",
53+
"json5": "^2.2.3",
54+
"prompts": "^2.4.2",
55+
"recast": "^0.23.4",
56+
"ts-morph": "^20.0.0"
5657
},
5758
"devDependencies": {
5859
"@types/babel__core": "^7.20.5",

packages/cli/src/commands/add.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ export const add = new Command()
5151
const prompts = await p.group(
5252
{
5353
components: () =>
54-
p.multiselect<{ label: string; value: string }[], string>({
54+
p.multiselect<string>({
5555
message: `Which ${highlight("components")} would you like to add?`,
56-
options: registryIndex.map((v) => ({ label: v.name, value: v.name }))
56+
options: registryIndex.map((v) => ({ label: v.name, value: v.name })),
57+
maxItems: 10
5758
})
5859
},
5960
{

0 commit comments

Comments
 (0)