Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(cli): align prompt functions #6257

Closed
wants to merge 3 commits into from

Conversation

timreichen
Copy link
Contributor

@timreichen timreichen commented Dec 12, 2024

This PR aligns all cli prompt functions to look and work the same internally.

@timreichen timreichen requested a review from kt3k as a code owner December 12, 2024 09:34
@github-actions github-actions bot added the cli label Dec 12, 2024
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 94.28571% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.49%. Comparing base (283cf34) to head (f0865be).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cli/unstable_prompt_multiple_select.ts 94.44% 1 Missing ⚠️
cli/unstable_prompt_select.ts 94.11% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6257   +/-   ##
=======================================
  Coverage   96.49%   96.49%           
=======================================
  Files         536      536           
  Lines       41179    41186    +7     
  Branches     6175     6177    +2     
=======================================
+ Hits        39734    39744   +10     
+ Misses       1403     1400    -3     
  Partials       42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +205 to +208
} else if (
paramDoc.kind === "assign" && paramDoc.left.kind === "object"
) {
return true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change has undesirable effect in doc rendering.

By using destructuring in parameter, there's no longer options param in arguments, and @param options directive becomes unclear about what it documents.

Copy link
Contributor Author

@timreichen timreichen Dec 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Why is it though that deno task lint:docs allows

{ clear }: PromptSelectOptions = {},
but will throw here if destructured:
options: PromptMultipleSelectOptions = {},

@timreichen
Copy link
Contributor Author

I will close this in favour of multiple small PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants