Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

[Request] Plain line output for spinner and progress in CI

Offen
#629 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

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:

  1. Cursor codes: ESC[?25l and ESC[?25h from block(), and ESC[1G with ESC[J from the
    clear step. A CI log viewer shows them as noise.
  2. The spinner frame (◒, ◐) on each line. A frame of an animation means nothing in a log.
  3. The progress bar. Each update prints one more bar line, often with no message.
  4. 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 isTTY for isCI). That changes when CI mode turns on. This request is about what
    CI mode prints. Both changes work well together.

Additional context

  • @clack/prompts 1.8.1, @clack/core 1.5.1, through @changesets/cli 3.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

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus bombshell-dev/clack

Alle Issues in bombshell-dev/clack

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.