Fix project name prompt placeholder leak#466
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR updates the interactive prompt message for project name input in the TanStack CLI from "What would you like to name your project?" to "Project name (leave empty to use current directory)", with the placeholder text removed. The corresponding test assertions are updated to validate the new prompt text and expect no placeholder. ChangesPrompt Message Update
Possibly Related PRs
Poem
🎯 1 (Trivial) | ⏱️ ~2 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
packages/cli/tests/ui-prompts.test.tsParsing error: "parserOptions.project" has been provided for Comment |
Summary
Fixes the interactive project-name prompt so pressing Enter for the current directory no longer lets the placeholder text leak into validation.
Details
The prompt used Clack's
placeholderfor the current-directory hint. In this edge case, the placeholder could be treated like input after Enter, then validated as a project name and duplicated in the prompt output. The hint now lives in the prompt message, and the project-name prompt no longer sets a placeholder.Validation
pnpm --filter @tanstack/cli test -- ui-promptspnpm --filter @tanstack/cli buildnx run-many --target=build --parallel 5pnpm test:unit && pnpm test:e2eSummary by CodeRabbit