[Request] Plain line output for spinner and progress in CI
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 58/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- node.js, typescript
- Bereich
- cli
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 8.1k
- Forks
- 225
- Ø Merge
- 12 Std. 54 Min.
- Gemergte PRs (30 T.)
- 3
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus bombshell-dev/clack
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
bombshell-dev/clack#625 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug] Prompts never settle when stdin endsEvtl. vergeben @MFA-G hat das vor 11 Tagen übernommen. Offen
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 55/100
bombshell-dev/clack#615 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 70/100
bombshell-dev/clack#613 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
bombshell-dev/clack#597 ·
Maintainer antworten meist innerhalb von 1 Tag
-
rfc: accessible modeOffenenhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
bombshell-dev/clack#585 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in bombshell-dev/clack
Ähnliche Issues
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 86/100
awslabs/visual-asset-management-system#937 ·
Maintainer antworten meist innerhalb von 1 Tag
-
t0ggles
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
nolimits4web/swiper#8255 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 15 Tagen
-
render: --variables-file (and --variables <path>) fails with "io.readFile is not a function" since 0.8.212Evtl. vergeben @miguel-heygen hat das heute übernommen. Offenbug triage/needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
heygen-com/hyperframes#6830 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug launch local use
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
account: profile bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 5 Tagen