fix(cli): Scope DELETE confirmation prompt to vercel api command only#14787
Merged
fix(cli): Scope DELETE confirmation prompt to vercel api command only#14787
vercel api command only#14787Conversation
🦋 Changeset detectedLatest commit: a35543f 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-4j27sb0ao.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-4j27sb0ao.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 |
The test is testing the request functionality, not the confirmation behavior. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
jeffsee55
approved these changes
Jan 29, 2026
This was referenced Jan 29, 2026
Merged
tknickman
pushed a commit
that referenced
this pull request
Jan 29, 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.9.2 ### Patch Changes - fix(cli): Scope DELETE confirmation prompt to `vercel api` command only ([#14787](#14787)) This fixes a regression from #14769 where the DELETE confirmation prompt was incorrectly applied to all DELETE operations (e.g., `vercel env rm`, `vercel alias rm`) instead of only the `vercel api` command. Commands like `env rm` and `alias rm` have their own `--yes` flags for confirmation and should not be affected. - experimental rust runtime framework preset ([#14765](#14765)) - Add redirects command to top level help message. ([#14772](#14772)) - Updated dependencies \[]: - @vercel/static-build@2.8.28 ## @vercel/frameworks@3.16.1 ### Patch Changes - Generic node framework preset ([#14779](#14779)) - experimental rust runtime framework preset ([#14765](#14765)) ## @vercel/fs-detectors@5.7.19 ### Patch Changes - experimental rust runtime framework preset ([#14765](#14765)) - Updated dependencies \[[`9d1e38e9ff6f0431dce8e421497e1ec4fc823291`](9d1e38e), [`e800617a334377e11953df22ef40d03716daf692`](e800617)]: - @vercel/frameworks@3.16.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
adriancooney
pushed a commit
that referenced
this pull request
Jan 30, 2026
…ly (#14787) ## Summary Fixes a regression from #14769 where the DELETE confirmation prompt was incorrectly applied to **all** DELETE operations instead of only the `vercel api` command. This was breaking CI/CD pipelines that use commands like: - `vercel env rm <name> --yes` - `vercel alias rm <alias> --yes` - `vercel remove <deployment> --yes` These commands have their own `--yes` flags for confirmation and should not be affected by the new `--dangerously-skip-permissions` flag which was designed specifically for the `vercel api` command. ## Changes - **`packages/cli/src/util/client.ts`**: Made `confirmMutatingOperation()` public and removed the call from `fetch()` method - **`packages/cli/src/commands/api/index.ts`**: Added `confirmMutatingOperation()` calls in `executeSingleRequest()` and `executePaginatedRequest()` - scoping confirmation to only the `vercel api` command - **`packages/cli/test/mocks/client.ts`**: Removed workaround that set `dangerouslySkipPermissions = true` by default - **`packages/cli/test/unit/util/client-confirmation.test.ts`**: Updated tests to call `confirmMutatingOperation()` directly ## Test plan - [x] All 15 unit tests pass - [x] TypeScript compiles without errors - [x] `vercel env rm --yes` works in non-TTY mode (no longer blocked) - [x] `vercel api -X DELETE` still prompts for confirmation as intended ## Related - Fixes regression introduced in #14769 - Supersedes #14784 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
adriancooney
pushed a commit
that referenced
this pull request
Jan 30, 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.9.2 ### Patch Changes - fix(cli): Scope DELETE confirmation prompt to `vercel api` command only ([#14787](#14787)) This fixes a regression from #14769 where the DELETE confirmation prompt was incorrectly applied to all DELETE operations (e.g., `vercel env rm`, `vercel alias rm`) instead of only the `vercel api` command. Commands like `env rm` and `alias rm` have their own `--yes` flags for confirmation and should not be affected. - experimental rust runtime framework preset ([#14765](#14765)) - Add redirects command to top level help message. ([#14772](#14772)) - Updated dependencies \[]: - @vercel/static-build@2.8.28 ## @vercel/frameworks@3.16.1 ### Patch Changes - Generic node framework preset ([#14779](#14779)) - experimental rust runtime framework preset ([#14765](#14765)) ## @vercel/fs-detectors@5.7.19 ### Patch Changes - experimental rust runtime framework preset ([#14765](#14765)) - Updated dependencies \[[`9d1e38e9ff6f0431dce8e421497e1ec4fc823291`](9d1e38e), [`e800617a334377e11953df22ef40d03716daf692`](e800617)]: - @vercel/frameworks@3.16.1 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
Fixes a regression from #14769 where the DELETE confirmation prompt was incorrectly applied to all DELETE operations instead of only the
vercel apicommand.This was breaking CI/CD pipelines that use commands like:
vercel env rm <name> --yesvercel alias rm <alias> --yesvercel remove <deployment> --yesThese commands have their own
--yesflags for confirmation and should not be affected by the new--dangerously-skip-permissionsflag which was designed specifically for thevercel apicommand.Changes
packages/cli/src/util/client.ts: MadeconfirmMutatingOperation()public and removed the call fromfetch()methodpackages/cli/src/commands/api/index.ts: AddedconfirmMutatingOperation()calls inexecuteSingleRequest()andexecutePaginatedRequest()- scoping confirmation to only thevercel apicommandpackages/cli/test/mocks/client.ts: Removed workaround that setdangerouslySkipPermissions = trueby defaultpackages/cli/test/unit/util/client-confirmation.test.ts: Updated tests to callconfirmMutatingOperation()directlyTest plan
vercel env rm --yesworks in non-TTY mode (no longer blocked)vercel api -X DELETEstill prompts for confirmation as intendedRelated
vercel apicommand only #14784🤖 Generated with Claude Code