Skip to content

[cli] Update @clack/core and @clack/prompts to v1.2.0#13644

Merged
penalosa merged 4 commits into
mainfrom
clack-v1-update
Apr 23, 2026
Merged

[cli] Update @clack/core and @clack/prompts to v1.2.0#13644
penalosa merged 4 commits into
mainfrom
clack-v1-update

Conversation

@MattieTK

@MattieTK MattieTK commented Apr 23, 2026

Copy link
Copy Markdown
Member

Addresses this comment.

Updates the Clack dependencies used by @cloudflare/cli from 0.x to 1.2.0. Clack 1.0 ships as ESM-only and includes new features like typeahead search in core components.

Changes

  • @clack/core ^0.3.2^1.2.0 in packages/cli
  • @clack/prompts ^0.6.3^1.2.0 in packages/create-cloudflare
  • TextPrompt#valueWithCursor renamed to userInputWithCursor (Clack breaking change) — updated in packages/cli/interactive.ts
  • Prompt class now requires a generic parameter — SelectRefreshablePrompt and Renderer type updated
  • Validator return type widened from string | void to string | Error | undefined to match Clack's new API — normalisation added in acceptDefault() and packages/create-cloudflare/src/helpers/args.ts

Testing

  • @cloudflare/cli: type-check passes, 41 unit tests pass
  • create-cloudflare: type-check passes, 192 unit tests pass
  • wrangler: type-check passes, 3703 tests pass
  • miniflare: type-check passes
  • Manual: c3 scaffold flow completes end-to-end, wrangler dev boots successfully with Miniflare

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: internal dependency bump with no user-facing API changes

Open in Devin Review

Bumps the Clack dependencies used by @cloudflare/cli (consumed internally
by wrangler, miniflare, and create-cloudflare) from 0.x to 1.2.0.

Clack 1.0 is ESM-only and renames TextPrompt#valueWithCursor to
userInputWithCursor; internal call sites are updated to match. Validator
return types have been widened to accept Error instances alongside
strings, matching Clack's new API.

Addresses #12933 (comment)
@changeset-bot

changeset-bot Bot commented Apr 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0ef275f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Apr 23, 2026
@workers-devprod workers-devprod requested review from a team and NuroDev and removed request for a team April 23, 2026 00:26
@workers-devprod

workers-devprod commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Changeset Review

Summary

✅ All changesets look good

Review Details

update-clack-to-v1.md

  • Version Type: ✅ Patch appropriate for dependency update
  • Changelog Quality: ✅ Good description explaining the bump and user impact
  • Markdown Headers: ✅ No h1/h2/h3 headers

vite-plugin-cf-registry-support.md

  • Version Type: ✅ Patch appropriate for bug fix
  • Changelog Quality: ✅ Clear description of previous error and fix
  • Markdown Headers: ✅ No h1/h2/h3 headers

ninety-doors-sit.md

  • Version Type: ✅ Patch appropriate for refactor
  • Changelog Quality: ✅ Brief but acceptable for simple change
  • Markdown Headers: ✅ No h1/h2/h3 headers

sour-bears-shake.md

  • Version Type: ✅ Patch appropriate for simplification
  • Changelog Quality: ✅ Clear description of behavioral change
  • Markdown Headers: ✅ No h1/h2/h3 headers

vitest-pool-workers-reset-helper.md

  • Version Type: ✅ Minor appropriate for new features
  • Changelog Quality: ✅ Excellent description with code example
  • Markdown Headers: ✅ No h1/h2/h3 headers

stream-local-video-serving.md

  • Version Type: ✅ Minor appropriate for new features
  • Changelog Quality: ✅ Comprehensive description of multiple features
  • Markdown Headers: ✅ No h1/h2/h3 headers

dependabot-update-13633.md

  • Version Type: ✅ Patch for dependency update (Dependabot - exempt from strict validation)
  • Changelog Quality: ✅ Clear table showing version changes
  • Markdown Headers: ✅ No h1/h2/h3 headers

fix-vite-config-denylist.md

  • Version Type: ✅ Patch appropriate for bug fix
  • Changelog Quality: ✅ Clear description of fix
  • Markdown Headers: ✅ No h1/h2/h3 headers

sour-paws-thank.md

  • Version Type: ✅ Patch appropriate for bug fix
  • Changelog Quality: ✅ Description explains the fix (uses conventional commit style which is acceptable)
  • Markdown Headers: ✅ No h1/h2/h3 headers

dependabot-update-13645.md

  • Version Type: ✅ Patch for dependency update (Dependabot - exempt from strict validation)
  • Changelog Quality: ✅ Clear table showing version changes
  • Markdown Headers: ✅ No h1/h2/h3 headers

detect-waf-block-response.md

  • Version Type: ✅ Patch appropriate for improved error handling
  • Changelog Quality: ✅ Excellent description of before/after behavior
  • Markdown Headers: ✅ No h1/h2/h3 headers

angry-bears-count.md

  • Version Type: ✅ Minor appropriate for new configuration options
  • Changelog Quality: ✅ Clear description of new fields
  • Markdown Headers: ✅ No h1/h2/h3 headers

fix-nonretryable-error-message.md

  • Version Type: ✅ Patch appropriate for bug fix
  • Changelog Quality: ✅ Clear description referencing the compatibility flag
  • Markdown Headers: ✅ No h1/h2/h3 headers

ai-search-inherit-display.md

  • Version Type: ✅ Patch appropriate for display fix
  • Changelog Quality: ✅ Clear description of the fix
  • Markdown Headers: ✅ No h1/h2/h3 headers

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@pkg-pr-new

pkg-pr-new Bot commented Apr 23, 2026

Copy link
Copy Markdown
create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13644

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13644

miniflare

npm i https://pkg.pr.new/miniflare@13644

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13644

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13644

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13644

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13644

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13644

wrangler

npm i https://pkg.pr.new/wrangler@13644

commit: 0ef275f

@ask-bonk

ask-bonk Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Now I have a complete picture. Let me assess whether there are any actionable issues:

  1. Type widening is correct@clack/core v1.2.0 defines validate as (value: TValue | undefined) => string | Error | undefined, and @clack/core internally handles Error instances (extracts .message). The PR correctly widens the BasePromptConfig.validate return type to match.

  2. acceptDefault function handles Error correctly — The instanceof Error check at line 119 is correct.

  3. args.ts handles Error correctly — The instanceof Error check at line 436 is correct.

  4. valueWithCursoruserInputWithCursor rename — Correct per the upstream API change.

  5. PromptPrompt<unknown> generic parameter — Correct; @clack/core v1.2.0 requires the generic.

  6. SelectRefreshablePrompt extends Prompt<string> — Correct; this class stores string values.

  7. Changeset includes miniflare — This is defensible since miniflare imports spinner from @cloudflare/cli/interactive, which bundles the updated @clack/core. The rebuilt artifact changes even if no miniflare source code changed.

  8. dispatchRender return type changed from string | void to string | undefined — Correct per @clack/core v1.2.0's render signature: render(this: Omit<Self, 'prompt'>): string | undefined.

I don't see any logic bugs, security issues, backward compatibility violations, or incorrect API behavior. All the changes are mechanically correct and properly aligned with the upstream @clack/core v1.2.0 API.

LGTM

github run

Comment thread .changeset/update-clack-to-v1.md Outdated

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Apr 23, 2026
MattieTK and others added 3 commits April 23, 2026 14:07
@penalosa penalosa merged commit 377715d into main Apr 23, 2026
59 of 60 checks passed
@penalosa penalosa deleted the clack-v1-update branch April 23, 2026 23:16
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants