[Request] Plain line output for spinner and progress in CI
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 58/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
- 领域
- cli
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 8.1k
- 派生
- 225
- 平均合并
- 12 小时 54 分钟
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bombshell-dev/clack 的其他 Issue
-
bug
难度 4/5 3-5 天 新手友好度 48/100
bombshell-dev/clack#625 ·
维护者通常 1 天内回复
-
[Bug] Prompts never settle when stdin ends可能已有人在做 @MFA-G 于 10 天前认领。 未关闭
难度 3/5 半天 新手友好度 55/100
bombshell-dev/clack#615 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 70/100
bombshell-dev/clack#613 · 4 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
bombshell-dev/clack#597 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
bombshell-dev/clack#585 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
查看 bombshell-dev/clack 的全部 Issue
相似的 Issue
-
Parallel reticle_verify opens per-flow leases without the source lease's ignoreHTTPSErrors可能已有人在做 @as992949791 今天认领。 未关闭good first issue help wanted
难度 2/5 1-3 小时 新手友好度 85/100
reticlehq/reticle#2033 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area:quality p3-medium ready-for-agent type:docs
难度 2/5 1-3 小时 新手友好度 83/100
fderuiter/deruiter.dev#3589 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
manfredsteyer/angular-oauth2-oidc#1514 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
marmelab/react-admin#11431 ·
维护者通常 1 天内回复