denoland / std

The Deno Standard Library
https://jsr.io/@std
MIT License
3.22k stars 621 forks source link

feat(cli/unstable): add `promptSelect()` #6190

Closed timreichen closed 1 day ago

timreichen commented 1 week ago

Ref: https://github.com/denoland/std/issues/4678

Changes Adds promptSelect() cli function.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 92.15686% with 4 lines in your changes missing coverage. Please review.

Project coverage is 96.56%. Comparing base (93e0cd6) to head (ef0a93d). Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
cli/unstable_prompt_select.ts 92.15% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6190 +/- ## ======================================= Coverage 96.56% 96.56% ======================================= Files 532 533 +1 Lines 40819 40870 +51 Branches 6111 6122 +11 ======================================= + Hits 39416 39467 +51 - Misses 1360 1361 +1 + Partials 43 42 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

kt3k commented 1 week ago
timreichen commented 1 week ago

I've added some tests but need help resolving the current errors. The tests ran successfully locally. I don't know, why they occur and how to fix them.

kt3k commented 5 days ago

The tests ran successfully locally. I don't know, why they occur and how to fix them.

I think you also need to stub Deno.stdin.setRaw (with empty function) to avoid error. (The error in CI seems happening because the stdin is not terminal in CI)

Kacaii commented 5 days ago

Im really excited for this one! Its exactly what I've been looking for! <3