PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

[Find-PSResource] To a same module into a local repository and a webserver repository, the content of the property 'VersionRange' of the dependency is different

Open LaurentDardenne opened this issue 2 years ago • 0 comments

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest released version
  • [X] Search the existing issues.

Steps to reproduce

When I search the same module into a local repository and a webserver repository, the property 'VersionRange' of the dependency is different. The packages are identical into the both repository Packages.zip

C:\temp> Get-PSresourceRepository|select *|ft

Name        Uri                                                              Trusted Priority CredentialInfo ApiVersion
----        ---                                                              ------- -------- -------------- ----------
PSRepoLocal file:///C:/Users/Laurent/AppData/Local/Temp/PSRepoLocal             True       40                     local
DevOttoMatt https://www.myget.org/F/devottomatt/api/v2                          True       50                        v2
PSGallery   https://www.powershellgallery.com/api/v2                            True       50                        v2
RepoTestV3  https://nuget.cloudsmith.io/repopsresourceget/test/v3/index.json    True       50                        v3


C:\temp> $M=Find-PSResource 'string' -Repository PSRepoLocal -Version 1.0.0
C:\temp> $m

Name   Version Prerelease Repository  Description
----   ------- ---------- ----------  -----------
String 1.0.0              PSRepoLocal Module String


C:\temp> $m.Dependencies

Name      VersionRange
----      ------------
UpperCase [1.0.0, )

C:\temp> $M.Dependencies[0].VersionRange|select *


IsFloating             : False
MinVersion             : 1.0.0
MaxVersion             :
HasLowerBound          : True
IsMinInclusive         : True
HasUpperBound          : False
IsMaxInclusive         : False
HasLowerAndUpperBounds : False
Float                  :
OriginalString         :


C:\temp> $M2=Find-PSResource 'string' -Repository DevOttoMatt -Version 1.0.0
C:\temp> $M2

Name   Version Prerelease Repository  Description
----   ------- ---------- ----------  -----------
String 1.0.0              DevOttoMatt Module String


C:\temp> $M2.Dependencies

Name      VersionRange
----      ------------
UpperCase [1.0.0, 1.0.0]

C:\temp> $M2.Dependencies[0].VersionRange|select *

IsFloating             : False
MinVersion             : 1.0.0
MaxVersion             : 1.0.0
HasLowerBound          : True
IsMinInclusive         : True
HasUpperBound          : True
IsMaxInclusive         : True
HasLowerAndUpperBounds : True
Float                  :
OriginalString         : 1.0.0

Expected behavior

The contents of the 'VersionRange' property should be the same.

Actual behavior

Repo local :
VersionRange equal to '[1.0.0, )'

Repo web server
VersionRange equal to '[1.0.0, 1.0.0]'

Error details

no error

Environment data

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     0.5.24     Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-InstalledPSResource, Get-PSResourceR...

Key   : PSVersion
Value : 5.1.19041.3031
Name  : PSVersion


Key   : PSEdition
Value : Desktop
Name  : PSEdition


Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.3031}
Name  : PSCompatibleVersions


Key   : BuildVersion
Value : 10.0.19041.3031
Name  : BuildVersion


Key   : CLRVersion
Value : 4.0.30319.42000
Name  : CLRVersion


Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion


Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion


Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion

Visuals

image

LaurentDardenne avatar Aug 17 '23 10:08 LaurentDardenne