Fix backwards compatability with output objects - #85
Open
alerickson wants to merge 1 commit into
Open
Conversation
alerickson
requested review from
Aditya Patwardhan (adityapatwardhan),
Anam Navied (anamnavi) and
shammu1
August 27, 2026 18:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Output objects were missing properties that v2 scripts can depend on. For example, Get-PSRepository returned v3's Uri/Priority/ApiVersion shape instead of v2's SourceLocation/InstallationPolicy/PackageManagementProvider shape, breaking scripts that check $repo.InstallationPolicy.Output objects were returning PSResourceGet objects instead of PowerShellGet v2 objects. Another example is relayed in the issue #39.
Scripts written for PowerShellGet v2.2.5 and below can expect specific properties on output objects:
Get-PSRepository: SourceLocation, InstallationPolicy, Registered, PackageManagementProvider, PublishLocation, ScriptSourceLocation, ScriptPublishLocation, ProviderOptions
Find-Module, Get-InstalledModule, etc.: RepositorySourceLocation, PackageManagementProvider
The compat module was only translating input parameters — it was passing through v3 output objects unchanged, which have different property names, different property sets, and different display formatting.
Changes made:
Added Update-TypeData for both output types to set default table display columns matching v2
Before:


After:
PR Context
Resolves issue #39