[Request] Plain line output for spinner and progress in CI
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 58/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
- Área
- cli
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 8.1k
- Forks
- 225
- Merge medio
- 12 h 54 min
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de bombshell-dev/clack
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
bombshell-dev/clack#625 ·
Los mantenedores suelen responder en 1 día
-
[Bug] Prompts never settle when stdin endsPosiblemente ocupada @MFA-G la tomó hace 11 días. Abierto
Dificultad 3/5 Medio día Aptitud para principiantes 55/100
bombshell-dev/clack#615 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 70/100
bombshell-dev/clack#613 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
bombshell-dev/clack#597 ·
Los mantenedores suelen responder en 1 día
-
rfc: accessible modeAbiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
bombshell-dev/clack#585 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de bombshell-dev/clack
Issues similares
-
area:cli bug P4
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
bug from-studio
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
esengine/DeepSeek-Reasonix#14868 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
linxiv-dev/linXiv#384 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
scope:core type:security
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
follow-redirects updateAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
mailgun/mailgun.js#544 ·