[cli] Fix flakey link --repo test caused by Inquirer type-ahead#14716
Merged
[cli] Fix flakey link --repo test caused by Inquirer type-ahead#14716
Conversation
The test "should create projects using subdirectory names for monorepo workspaces" was failing intermittently because sending 'y\n' to confirm scope selection triggered Inquirer's type-ahead search feature. When a randomly-generated team name started with 'Y' (like "Yellow Corporation"), the 'y' keystroke would jump to that option, then '\n' would confirm the wrong selection. Fix: Use '\n' alone for scope selection and checkbox prompts since the desired option is already selected by default. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 954e546 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Contributor
📦 CLI Tarball ReadyThe Vercel CLI tarball for this PR is now available! Quick TestYou can test this PR's CLI directly by running: npx https://vercel-fi911fahv.vercel.sh/tarballs/vercel.tgz --helpUse in vercel.jsonTo use this CLI version in your project builds, add to your {
"build": {
"env": {
"VERCEL_CLI_VERSION": "vercel@https://vercel-fi911fahv.vercel.sh/tarballs/vercel.tgz"
}
}
} |
Contributor
🧪 Unit Test StrategyComparing: Strategy: Affected packages only ✅ Only testing packages that have been modified or depend on modified packages. Affected packages - 1 (2%)
Unaffected packages - 40 (98%)
Results
This comment is automatically generated based on the affected testing strategy |
Apply the same fix to all scope selection prompts in the link tests, including the non-repo tests that use "Which scope should contain your project?" (singular form). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
mehulkar
approved these changes
Jan 23, 2026
Merged
tknickman
pushed a commit
that referenced
this pull request
Jan 23, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## vercel@50.5.0 ### Minor Changes - New, consistent --format command for machine readable output ([#14609](#14609)) - api command ([#14715](#14715)) - Detect Augment and OpenCode agents ([#14635](#14635)) ### Patch Changes - Track CLI as source for marketplace integration installations ([#14713](#14713)) - Do not show default project settings when framework is detected ([#14608](#14608)) - Fix flakey link tests caused by Inquirer type-ahead search ([#14716](#14716)) - Updated dependencies \[[`64b4577b6d702335478af47c8395bf36daf4f311`](64b4577), [`1ba97e3af1c1240703df3297fbbf7af0f809dd56`](1ba97e3)]: - @vercel/python@6.3.1 - @vercel/detect-agent@1.1.0 ## @vercel/detect-agent@1.1.0 ### Minor Changes - Detect Augment and OpenCode agents ([#14635](#14635)) ## @vercel/python@6.3.1 ### Patch Changes - isInstalled check only needs to check for python on the path. ([#14712](#14712)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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
link > --repo > should create projects using subdirectory names for monorepo workspacesy\nto confirm prompts triggered Inquirer's type-ahead search, causing wrong selection when team names started with 'Y'\nalone since the desired option is already selected by defaultDetails
The test was flaky because the mock data uses
chance()to generate random team names. When a team name happened to start with 'Y' (like "Yellow Corporation"), theykeystroke iny\ntriggered Inquirer's type-ahead search feature, jumping to that option instead of keeping the user selected. The subsequent\nwould then confirm the wrong selection.Expected:
"Linked to 2 Projects under francis (created .vercel...)"Actual:
"Linked to 2 Projects under p*num (created .vercel...)"(team name instead of username)Test plan
pnpm vitest run test/unit/commands/link/index.test.ts- all 22 tests pass🤖 Generated with Claude Code