Skip to content

Add parseAnsiStyles to resolve ANSI SGR codes into styled text runs - #279

Closed
nev21 with Copilot wants to merge 3 commits into
mainfrom
copilot/feature-add-parser-for-ansi-sgr-codes
Closed

nev21 with Copilot wants to merge 3 commits into
mainfrom
copilot/feature-add-parser-for-ansi-sgr-codes

Simplify SGR lookups and 256-colour conversion

fe13c1c
Select commit
Loading
Failed to load commit list.
Codecov / codecov/project failed Oct 28, 2026 in 1s

49.92% (-39.94%) compared to 4559e38

View this Pull Request on Codecov

49.92% (-39.94%) compared to 4559e38

Details

Codecov Report

❌ Patch coverage is 8.12183% with 181 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.92%. Comparing base (4559e38) to head (fe13c1c).

Files with missing lines Patch % Lines
core/src/ansi/parseAnsiStyles.ts 4.95% 115 Missing ⚠️
core/src/ansi/ansiToHtml.ts 7.69% 36 Missing ⚠️
core/src/ansi/ansiColors.ts 19.04% 17 Missing ⚠️
core/src/ansi/sgrCodes.ts 18.75% 13 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (4559e38) and HEAD (fe13c1c). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (4559e38) HEAD (fe13c1c)
4 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #279       +/-   ##
===========================================
- Coverage   89.86%   49.92%   -39.94%     
===========================================
  Files          23       27        +4     
  Lines         513      709      +196     
  Branches      138      213       +75     
===========================================
- Hits          461      354      -107     
- Misses         52      355      +303     
Files with missing lines Coverage Δ
core/src/ansi/sgrCodes.ts 18.75% <18.75%> (ø)
core/src/ansi/ansiColors.ts 19.04% <19.04%> (ø)
core/src/ansi/ansiToHtml.ts 7.69% <7.69%> (ø)
core/src/ansi/parseAnsiStyles.ts 4.95% <4.95%> (ø)

... and 12 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.