Repository navigation
fix(create-void): let Enter accept the default project name - #232
Merged
Brooooooklyn merged 1 commit intoJun 29, 2026
Merged
Brooooooklyn merged 1 commit into
Brooooooklyn merged 1 commit into
Conversation
Brooooooklyn
approved these changes
Jun 29, 2026
Brooooooklyn
deleted the
06-25-fix_create-void_let_enter_accept_the_default_project_name
branch
June 29, 2026 09:48
cpojer
pushed a commit
that referenced
this pull request
Sep 11, 2026
…ry params (#232) * fix(dispatch): key the static-candidate edge cache on allowlisted query params The static-candidate edge cache (extensioned GETs) hardcoded its key to `<path>?_v=<version>`, discarding the request query. For a true static asset that is correct, but a dynamic extensioned route whose body depends on the query — e.g. a worker-rendered image/badge endpoint — then serves its first rendered variant for every distinct query, name, theme, etc., even when the route declares `revalidateQueryAllowlist` (which was only consulted on rewrite/fallback variants, never on a direct route). Project the route's `queryAllowlist` into the static-candidate key via `buildVariantOriginalUrl` (the same sorted/deterministic helper the ISR rewrite-variant path uses), matched against the original (pre-rewrite) request path. A route with no allowlist match still drops the query, so real static assets keep their pathname-only key — no behavior change. Read and write share one `staticCacheKey`, so both stay consistent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(dispatch): gate static-candidate query projection to exact paths Reviewer #232: the static-candidate edge cache has no per-path variant cap (unlike ISR), so projecting a broad `*` / prefix-wildcard `queryAllowlist` entry into its key would let a cache-buster query (`?cb=1`, `?cb=2`, …) fan out unbounded cache slots for true static assets. Add `exactQueryAllowlist`, which keeps only wildcard-free patterns, and feed the static-candidate key through it. Wildcard entries stay valid on the capped ISR variant path; here a route with no exact match keeps its pathname-only key — unchanged behavior for real static assets. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * style(dispatch): wrap variant-key import to satisfy fmt --check Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In
create-void, the interactiveProject name:prompt could not be confirmed by pressing Enter — you were forced to type a name. With nothing typed, submitting failed withProject name is required.Two things combined to cause this in
packages/create-void/src/index.ts. The prompt setplaceholder: 'my-app', but in@clack/promptsa placeholder is only a greyed-out hint and is never returned as the value, so an empty Enter submits an empty string rather thanmy-app. Thevalidatecallback then rejected empty input, and in@clack/corevalidate(value)runs on the raw typed value before any default would be applied, so the empty submission was blocked outright.Fix
Add
defaultValue: 'my-app'so an empty submission resolves to the default, and relaxvalidateso it no longer rejects empty input:Behavior after
Pressing Enter accepts
my-app; typing a name uses that name; entering only whitespace is still rejected withProject name cannot be blank.