[cli] standardize uses of confirm on confirm.ts#12834
Conversation
🦋 Changeset detectedLatest commit: 4426aef 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 |
There was a problem hiding this comment.
I slightly prefer going the other way: converting await confirm() usages into await client.input.confirm(). Then we'd be able do delete confirm.ts and better match how the rest of the codebase seems to prefer client.input.confirm. Maybe we also change the implementation to restrict the options.
However, I think making things more consistent is helpful regardless, so approving this!
With this PR, we make everything consistent, which makes it easier to switch in the future. With your comment in mind, I'm reminded that I'll do a fast-follow PR that migrates everything to that one location, thus removing the confusion of which |
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 ## [email protected] ### Minor Changes - [cli] add compile cache to improve startup performance ([#12783](#12783)) ### Patch Changes - [cli] standardizes uses of confirm on confirm.ts ([#12834](#12834)) - [cli] sort imports in build/index.ts ([#12833](#12833)) - Updated dependencies \[[`5fea2c49103adf6f7153f04378bff6f571375b0e`](5fea2c4)]: - @vercel/[email protected] ## @vercel/[email protected] ### Minor Changes - Add support for in-function concurrency ([#12850](#12850)) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ace (#12846) Moves the restrictive interface for the `confirm` function to `client.input.confirm`, and refactors all call sites to use the updated interface. This PR removes any confusion about whether to use the `input.confirm` method or the `confirm` function. Previous discussion: #12834 (comment)
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 ## [email protected] ### Minor Changes - [cli] add compile cache to improve startup performance ([#12783](vercel/vercel#12783)) ### Patch Changes - [cli] standardizes uses of confirm on confirm.ts ([#12834](vercel/vercel#12834)) - [cli] sort imports in build/index.ts ([#12833](vercel/vercel#12833)) - Updated dependencies \[[`ac7961adcbbcf65b9cc6231b581e1f04a78bba2a`](vercel/vercel@ac7961a)]: - @vercel/[email protected] ## @vercel/[email protected] ### Minor Changes - Add support for in-function concurrency ([#12850](vercel/vercel#12850)) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ace (#12846) Moves the restrictive interface for the `confirm` function to `client.input.confirm`, and refactors all call sites to use the updated interface. This PR removes any confusion about whether to use the `input.confirm` method or the `confirm` function. Previous discussion: vercel/vercel#12834 (comment)
Prior to this PR, we had a mixed usage of the
confirminteractive input component. Some came throughclient.input.confirmand some came through the functionconfirmthat wraps it. This PR standardizes on the functionconfirmsince that was in use in more places and restricts the options that a call site can use.This PR doesn't prevent
client.input.confirmfrom being called directly in the future. It may be worth considering aninput-managersimilar to the previousoutput-managerrefactor.