[Request] Plain line output for spinner and progress in CI
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 58/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
Start by reading the implementations of spinner(), progress(), block() and the other live components in the repository, then trace how they detect CI and TTY output. The issue describes the desired plain-line behavior and final status lines; check existing component tests and add coverage for CI and non-TTY output. Done means logs contain no cursor codes, spinner frames or progress bars.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
When CI is "true", spinner() and progress() stop the animation. But the CI log still gets
terminal output that only makes sense on a TTY. This is the output of changeset publish
(changesets uses progress()) on GitHub Actions, with CI=true:
^[[?25l◒ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Publishing packages...
^[[1G^[[J◇ Successfully published:
...
^[[?25h^[[?25l◒ Creating git tags...
^[[1G^[[J◇ Created git tags.
^[[?25h
Progress updates also print lines like this one, with a new frame each time and no message:
◐ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The problems:
- Cursor codes:
ESC[?25landESC[?25hfromblock(), andESC[1GwithESC[Jfrom the
clear step. A CI log viewer shows them as noise. - The spinner frame (
◒,◐) on each line. A frame of an animation means nothing in a log. - The progress bar. Each update prints one more bar line, often with no message.
- Each change of the spinner message prints a new line. That is fine for real steps, but a
message that only updates a counter or a string fills the log.
Describe the solution you'd like
In CI mode (or when the output is not a TTY), spinner(), progress() and the other live
components write plain lines only:
- No cursor or erase codes, and no call to
block()that hides the cursor. - No spinner frame and no progress bar. Print the message, then the final status line
(◇ Done,■ Cancelled,▲ Failed). - Optional: an option to skip message updates in CI, so only the start and the end lines print.
Describe alternatives you've considered
- Strip ANSI codes in each consumer, for example with a pipe through
sed. Every CLI that uses
clack must then do it, and a pipe can hide the exit code. - #286 (use
isTTYforisCI). That changes when CI mode turns on. This request is about what
CI mode prints. Both changes work well together.
Additional context
@clack/prompts1.8.1,@clack/core1.5.1, through@changesets/cli3.0.3.- Node 26, GitHub Actions runner.
- Ngôn ngữ chính
- TypeScript
- Star
- 8.1k
- Fork
- 225
- Merge trung bình
- 12 giờ 54 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của bombshell-dev/clack
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
bombshell-dev/clack#625 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Prompts never settle when stdin endsCó thể đã có người làm @MFA-G đã nhận 10 ngày trước. Đang mở
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 55/100
bombshell-dev/clack#615 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
bombshell-dev/clack#613 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
bombshell-dev/clack#597 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
rfc: accessible modeĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
bombshell-dev/clack#585 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của bombshell-dev/clack
Issue tương tự
-
Shell: serve the home app's Cookie Policy on a hard reloadCó thể đã có người làm @2001anshkaushik đã nhận hôm nay. Đang mởfeature module:ai
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
rocketride-org/rocketride-server#2899 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
wazuh/wazuh-dashboard-plugins#9551 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
gofish-graphics/gofish-graphics#1252 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
optimization P3 size:XS
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
josephfung/curia#2366 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stranded-follow-up sweep trusts any issue whose body carries the marker as the tracking issueĐang mởtype:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
nightgauge/nightgauge#2688 ·
Maintainer thường phản hồi trong vòng 1 ngày