You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
API - Filter by version - Specifying both minimum and maximum version returns no results #270
https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Az'&$orderby=NormalizedVersion desc&$inlinecount=allpages&$skip=0&$filter=IsPrerelease eq false and Id eq 'Az' and NormalizedVersion gt '9.0.0' and NormalizedVersion lt '10.0.0'
Which should return all versions of Az newer than 9.0.0 and older than 10.0.0.
Expected behavior
Should get all versions of Az newer than v9.0.0 and older than v10.0.0.
This seems fixed now (since yesterday?), assuming you would use a range with existing versions:
❯ Find-PSResource-Repository 'PSGallery'-Name 'Az'-Version '(11,13)'-Debug
DEBUG: In FindPSResource::ProcessResourceNameParameterSet()
DEBUG: Filtering package name(s) on wildcards
DEBUG: Parsing package version
DEBUG: In FindHelper::FindByResourceName()
DEBUG: Parameters passed in>>> Name: 'Az'; ResourceType: 'None'; VersionRange: '(11,13)'; NuGetVersion: ''; VersionType: 'VersionRange'; Version: '(11,13)'; Prerelease: 'False'; Tag: ''; Repository: 'PSGallery'; IncludeDependencies 'False'
DEBUG: Searching through repository 'PSGallery'
DEBUG: In FindHelper::SearchByNames()
DEBUG: Version range and package name are specified
DEBUG: In V2ServerAPICalls::FindVersionGlobbing()
DEBUG: In V2ServerAPICalls::FindVersionGlobbing()
DEBUG: In V2ServerAPICalls::HttpRequestCall()
DEBUG: Request url is 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Az'&$orderby=NormalizedVersion desc&$inlinecount=allpages&$skip=0&$filter=IsPrerelease eq false and Id eq 'Az' and NormalizedVersion gt '11.0.0' and NormalizedVersion lt '13.0.0''
DEBUG: Found package 'Az' version '12.1.0'
DEBUG: Package 'Az' returned from server
DEBUG: Package 'Az' was previously discovered and returned
DEBUG: Found package 'Az' version '12.0.0'
DEBUG: Package 'Az' returned from server
DEBUG: Found package 'Az' version '11.6.0'
DEBUG: Package 'Az' returned from server
DEBUG: Found package 'Az' version '11.5.0'
DEBUG: Package 'Az' returned from server
DEBUG: Found package 'Az' version '11.4.0'
DEBUG: Package 'Az' returned from server
DEBUG: Found package 'Az' version '11.3.1'
DEBUG: Package 'Az' returned from server
DEBUG: Found package 'Az' version '11.3.0'
DEBUG: Package 'Az' returned from server
DEBUG: Found package 'Az' version '11.2.0'
DEBUG: Package 'Az' returned from server
DEBUG: Found package 'Az' version '11.1.0'
DEBUG: Package 'Az' returned from server
Name Version Prerelease Repository Description
------------------------------------------
Az 12.1.0 PSGallery Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with PowerShell and Windows PowerShell.…
Az 12.0.0 PSGallery Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with PowerShell and Windows PowerShell.…
Az 11.6.0 PSGallery Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with PowerShell and Windows PowerShell.…
Az 11.5.0 PSGallery Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with PowerShell and Windows PowerShell.…
Az 11.4.0 PSGallery Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with PowerShell and Windows PowerShell.…
Az 11.3.1 PSGallery Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with PowerShell and Windows PowerShell.…
Az 11.3.0 PSGallery Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with PowerShell and Windows PowerShell.…
Az 11.2.0 PSGallery Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with PowerShell and Windows PowerShell.…
Az 11.1.0 PSGallery Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with PowerShell and Windows Powe
Activity
jpawlowski commentedon Jul 13, 2024
This seems fixed now (since yesterday?), assuming you would use a range with existing versions:
o-l-a-v commentedon Jul 13, 2024
Julian Pawlowski (@jpawlowski) Interesting.
(11,13)as in your example seems to work.(11,12)too. Also(8,9). But not(9,10).Using PSResourceGet v1.0.5:
Screenshot from PowerShell Gallery ( https://www.powershellgallery.com/packages/Az ):
o-l-a-v commentedon Oct 3, 2024
Seems if the NuGet range goes from a number with one digit (
9) to one with two (10), PowerShell Gallery doesn't return anything. Same with EnterprisePolicyAsCode ( https://www.powershellgallery.com/packages/EnterprisePolicyAsCode ):This is a somewhat critical issue. Say you want to pin major version to 9 with:
Not possible at the moment. Unless you do something like:
But come on.. 😋 The API should be able to handle this.