Skip to content

fix(outdated): improve table column alignment and NO_COLOR fallback - #15

Merged
Ritual-Dev-Git merged 1 commit into
RitualDev-Lab:mainfrom
sakshi5925:fix/outdated-table-alignment-no-color
Dec 6, 2026
Merged

Ritual-Dev-Git merged 1 commit into
RitualDev-Lab:mainfrom
sakshi5925:fix/outdated-table-alignment-no-color

Conversation

@sakshi5925

Copy link
Copy Markdown

Fixes #12

Summary

  • Problem: poly outdated used fixed column widths with truncation/slicing and emitted ANSI color codes unconditionally without checking NO_COLOR, which could misalign columns or leave ANSI escape sequences when NO_COLOR=1 is set.
  • Solution: Extracted table formatting into src/outdated/formatter.ts (re-exported from src/outdated/index.ts and called in src/cli.ts) with dynamic column width calculation based on ANSI-stripped visible character lengths and NO_COLOR fallback handling while preserving --json and empty-report output.
  • Tests Added: Added unit tests in tests/outdated.test.ts verifying dynamic column alignment without truncating long package names or workspace paths, ANSI color output when enabled, and absence of ANSI escape sequences when NO_COLOR=1 is set.

@Ritual-Dev-Git
Ritual-Dev-Git merged commit ec9cd27 into RitualDev-Lab:main Dec 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

good first issue: Improve outdated dependency table formatting in poly outdated

3 participants