`vp run --log labeled` / `--log grouped` drops color from the Vitest coverage table
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
- 65/100
Hướng nghiên cứu
Start with the vp run output handling for the labeled and grouped log modes, then reproduce using the linked repository and compare with interleaved. Check how those modes relay task output and preserve color settings; done when the Vitest coverage table retains its threshold colors in all modes.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
When a task runs through vp run with --log labeled or --log grouped, the coverage table from @vitest/coverage-v8 (text reporter) is printed without color. The same task under the default interleaved mode, or with no --log, shows the table in color: red/yellow/green by coverage threshold.
Only the coverage table is affected. The rest of Vitest's output keeps its color in every mode: the RUN badge, 1 passed, the checkmarks, and the % Coverage report from v8 header.
The same split shows up when you run vp test with stdout piped and FORCE_COLOR set. Vitest's own output is colored and the coverage table is not. This suggests labeled and grouped relay the task's output through a pipe instead of a TTY, and the coverage reporter decides whether to color by checking for a TTY, not by honoring FORCE_COLOR.
Reproduction
https://github.com/rhermes62/no-test-coverage-output-coloring-reproduction
Steps to reproduce
- Clone the reproduction repo and install:
(git clone https://github.com/rhermes62/no-test-coverage-output-coloring-reproduction.git cd no-test-coverage-output-coloring-reproduction npm install --legacy-peer-deps--legacy-peer-depsworks around an unrelated npm 10.9.4 crash,Cannot read properties of null (reading 'edgesOut').) - In a real terminal (don't pipe the output), run:
node --run works:log-interleaved # vp run --log interleaved test node --run broken:log-labeled # vp run --log labeled test node --run broken:log-grouped # vp run --log grouped test - Compare the coverage tables.
Expected: The table is colored the same way in every mode: add.ts (100%) green, divide.ts (0%) red, % Funcs 50 yellow.
Actual: The table is colored under interleaved and with no --log, and plain under labeled and grouped. Coverage numbers are identical in all modes.
| Mode | Screenshot |
|---|---|
no --log (works) |
|
--log interleaved (works) |
|
--log labeled (broken) |
|
--log grouped (broken) |
System Info
`vp env current`: N/A (project install)
`vp --version`:
VITE+ - The Unified Toolchain for the Web
vp v1.0.0
Local vite-plus:
vite-plus v1.0.0
Tools:
vite v8.3.1
rolldown v1.2.11
vitest v5.0.1
oxfmt v0.70.0
oxlint v1.85.0
oxlint-tsgolint v7.0.2003
tsdown v0.23.0
Used Package Manager
npm
Logs
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
- Ngôn ngữ chính
- Rust
- Star
- 6.5k
- Fork
- 296
- Merge trung bình
- 1 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 229
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không 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 voidzero-dev/vite-plus
-
Docker guide: the runtime stage needs libatomic1 for Node.js 25 and laterCó thể đã có người làm @kshanxs đã nhận 1 ngày trước. Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
voidzero-dev/vite-plus#3219 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
voidzero-dev/vite-plus#2882 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
vp run -r executes each package task twice when the root package has a matching recursive scriptCó thể đã có người làm @wan9chi đã nhận 2 ngày trước. Đang mởpending triage
voidzero-dev/vite-plus#3221 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
voidzero-dev/vite-plus#3218 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
LSP loads vite.config.ts with the server's cwd as rootCó thể đã có người làm @leaysgur đã nhận 2 ngày trước. Đang mởpending triage
voidzero-dev/vite-plus#3217 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của voidzero-dev/vite-plus
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
manuscript-lang/manuscript#1364 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`printf "%o"` prints decimalĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
fable-compiler/Fable#5157 ·
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 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
C-bug needs-triage O-UEFI T-libs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
移动端宽屏适配Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày