Skip to content

Commit 755a526

Browse files
teallarsonclaude
andcommitted
Update @clack/prompts from 0.x to 1.1.0
- Use s.error() instead of s.stop() for failure cases (new spinner API) - Handle undefined in validate callback (new type signature) - placeholder change is safe since validate already rejects empty input Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6ecf132 commit 755a526

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

package-lock.json

Lines changed: 11 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"format:check": "prettier --check ."
3030
},
3131
"dependencies": {
32-
"@clack/prompts": "^0.10.0",
32+
"@clack/prompts": "^1.1.0",
3333
"cross-spawn": "^7.0.6",
3434
"handlebars": "^4.7.8",
3535
"picocolors": "^1.1.1"

src/post-scaffold.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export async function installDeps(targetDir: string, meta: TemplateMeta): Promis
103103
const cmd = process.platform === "win32" && step.winCmd ? step.winCmd : step.cmd;
104104
const result = await runAsync(cmd, step.args, targetDir);
105105
if (result.status !== 0) {
106-
s.stop(`${step.label} failed`);
106+
s.error(`${step.label} failed`);
107107
p.log.warn(
108108
`${result.stderr || `${cmd} ${step.args.join(" ")} failed`}\n\nRun manually: ${cmd} ${step.args.join(" ")}`
109109
);
@@ -124,7 +124,7 @@ export async function runMigrations(targetDir: string, meta: TemplateMeta) {
124124
const cmd = process.platform === "win32" && step.winCmd ? step.winCmd : step.cmd;
125125
const result = await runAsync(cmd, step.args, targetDir);
126126
if (result.status !== 0) {
127-
s.stop("Database setup failed (you can run migrations manually)");
127+
s.error("Database setup failed (you can run migrations manually)");
128128
p.log.warn(result.stderr || `${cmd} ${step.args.join(" ")} failed`);
129129
return;
130130
}

src/prompts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export async function getProjectName(argv: string[]): Promise<string> {
5151
const result = await p.text({
5252
message: "What is your project name?",
5353
placeholder: "my-arcade-agent",
54-
validate: (v) => validateProjectName(v.trim()),
54+
validate: (v) => validateProjectName((v ?? "").trim()),
5555
});
5656
if (p.isCancel(result)) {
5757
p.cancel("Cancelled.");

0 commit comments

Comments
 (0)