impr: Replace initial value with default value in CLI#2569
Merged
Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (355 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.95, 1.94, 4.04, 6.62, 7.39, 10.96, 22.28, 21.21]
line [0.93, 1.92, 3.91, 6.11, 7.30, 10.41, 20.96, 24.66]
line [1.01, 2.05, 4.42, 6.61, 7.82, 9.90, 22.18, 24.13]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.34, 0.51, 0.71, 0.90, 1.13, 1.12, 1.37, 1.59]
line [0.35, 0.55, 0.73, 0.94, 1.20, 1.27, 1.52, 1.69]
line [0.34, 0.57, 0.70, 0.86, 1.17, 1.25, 1.53, 1.65]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.86, 2.10, 3.43, 6.24, 12.32, 25.49, 55.58, 110.98]
line [0.87, 2.03, 3.72, 6.26, 12.28, 25.70, 56.11, 114.35]
line [0.89, 2.03, 4.09, 6.45, 12.68, 26.51, 58.72, 118.62]
|
There was a problem hiding this comment.
Pull request overview
Updates the @typegpu/cli interactive prompts to avoid pre-filling a suggested project name, using a placeholder + default instead (closer to create-vite behavior).
Changes:
- Switch project name prompt from
initialValuetodefaultValuewhile keeping the suggestion asplaceholder. - Adjust project name validation logic to always validate the entered value.
- Remove redundant
initialValue: ''from the package name prompt.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
17
to
21
| placeholder: initialValue, | ||
| initialValue, | ||
| defaultValue: initialValue, | ||
| validate: (value) => { | ||
| return value && !isValidProjectDirectory(value) ? 'Invalid project name.' : undefined; | ||
| return !isValidProjectDirectory(value) ? 'Invalid project name.' : undefined; | ||
| }, |
Contributor
Author
There was a problem hiding this comment.
this is never empty, there is a default value
Collaborator
There was a problem hiding this comment.
add these lines and we will be fine
projectDir = projectDIr.trim();
projectDir ??= '.';
return projectDir;
iwoplaza
approved these changes
May 28, 2026
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.
Closes #2542
This way, we're more similar to vite create