Skip to content

feat: Add version diff highlighting to upgrade and list output#6281

Closed
keanehatescoding wants to merge 1 commit into
microsoft:masterfrom
keanehatescoding:feat/version-diff-highlighting
Closed

feat: Add version diff highlighting to upgrade and list output#6281
keanehatescoding wants to merge 1 commit into
microsoft:masterfrom
keanehatescoding:feat/version-diff-highlighting

Conversation

@keanehatescoding

@keanehatescoding keanehatescoding commented Jun 11, 2026

Copy link
Copy Markdown

Colorize the changed suffix of version strings when displaying pending upgrades via winget upgrade and winget list. The common prefix of the installed and available version is rendered in the default color, while the diverging suffix is highlighted: bright red for the installed version and bright green for the available version.

Highlighting is suppressed when VT is disabled (redirected output, --nowrap, or --no-vt), preserving clean machine-readable output.

📖 Description

🔗 References

🔍 Validation

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Microsoft Reviewers: Open in CodeFlow

Colorize the changed suffix of version strings when displaying pending
upgrades via `winget upgrade` and `winget list`. The common prefix of
the installed and available version is rendered in the default color,
while the diverging suffix is highlighted: bright red for the installed
version and bright green for the available version.

Highlighting is suppressed when VT is disabled (redirected output,
--nowrap, or --no-vt), preserving clean machine-readable output.
@keanehatescoding keanehatescoding requested a review from a team as a code owner June 11, 2026 21:32

@Trenly Trenly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test cases need to be added for this. It also should be opt-in as a user setting under the visual options as this had stong potential to break existing scripts relying on the raw output

@microsoft-github-policy-service microsoft-github-policy-service Bot added the Needs-Author-Feedback Issue needs attention from issue or PR author label Jun 11, 2026
@keanehatescoding keanehatescoding deleted the feat/version-diff-highlighting branch June 11, 2026 21:44
@microsoft-github-policy-service microsoft-github-policy-service Bot removed the Needs-Author-Feedback Issue needs attention from issue or PR author label Jun 11, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the existing formatting for the code.

@florelis

Copy link
Copy Markdown
Member

this had stong potential to break existing scripts relying on the raw output

Does it? I thought that we were able to detect when we were not running in a terminal and would produce the output as if we had --no-vt.

@Trenly

Trenly commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

this had stong potential to break existing scripts relying on the raw output

Does it? I thought that we were able to detect when we were not running in a terminal and would produce the output as if we had --no-vt.

Hmmm. That is true (granted it is a recent addition) - but is there not the possibility that someone takes un-ridrected output from the attached terminal?

Either way, it seems like a strong case for a user setting - though that point may be moot since the head branch has been deleted, though I'm not sure why as I could imagine tests (and even a setting) would have been relatively straightforward to add compared to the other changes in the pr

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.

3 participants