Skip to content

Conversation

@danstis
Copy link
Owner

@danstis danstis commented Jan 22, 2026

User description

Summary

  • Fixes the AvailableVersion column displaying as a hashtable instead of a version string
  • Adds .ToString() to $Available.Version in both PS7+ parallel and legacy code paths

Problem

When displaying PowerShell module updates, the AvailableVersion column showed:

@{Major=15; Minor=2; Build=0; Revision=-1; MajorRevision=-1; MinorRevision=-1}

instead of 15.2.0.

Root Cause

The Version object from Find-Module was stored directly. After JSON serialization/deserialization, it lost its type information and displayed as a hashtable.

Fix

Convert to string before storing (matching CurrentVersion behavior):

AvailableVersion = $Available.Version.ToString()

Fixes #57


PR Type

Bug fix


Description

  • Convert AvailableVersion to string

  • Add .ToString() in parallel code branch

  • Add .ToString() in legacy code branch


File Walkthrough

Relevant files
Bug fix
Get-Updates.ps1
Convert AvailableVersion to string                                             

functions/Get-Updates.ps1

  • Added .ToString() for AvailableVersion in parallel path
  • Added .ToString() for AvailableVersion in legacy path
+2/-2     

The Version object from Find-Module was being stored directly, causing
it to display as a hashtable after JSON serialization/deserialization.
Adding .ToString() ensures consistent string formatting matching
CurrentVersion behavior.

Fixes #57
@sophie-syntax
Copy link

sophie-syntax bot commented Jan 22, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

57 - Fully compliant

Compliant requirements:

  • Ensure AvailableVersion displays as a version string instead of a hashtable
  • Match CurrentVersion behavior by calling .ToString() on version objects
  • Apply conversion in both parallel (PowerShell 7+) and legacy branches
⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@sophie-syntax
Copy link

sophie-syntax bot commented Jan 22, 2026

PR Code Suggestions ✨

No code suggestions found for the PR.

@danstis danstis merged commit 3fa6da2 into master Jan 22, 2026
4 checks passed
@danstis danstis deleted the fix/issue-57-version-display branch January 22, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PowerShell module updates now show a hashtable for the AvailableVersion

1 participant