JustinGrote / JustinGrote/ModuleFast

ModuleFast/PWSHGallery do not have support for hiding/filtering unlisted packages

Offen
#103 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
C#
Sterne
151
Forks
11
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Because pwsh.gallery does not handle prereleases properly, at least for some modules, ModuleFast offers prerelease versions as stable.

More info in this issue:

Testing with PowerShell v7.4.6 `-NoProfile` and ModuleFast v0.5.1:

```pwsh
PowerShell 7.4.6
PS C:\Users\olav.birkeland> Import-module -name 'modulefast'
PS C:\Users\olav.birkeland> $Destination = [string] '{0}\Microsoft\PowerShell\Modules' -f $env:LOCALAPPDATA
PS C:\Users\olav.birkeland> $InstalledModules = [string[]](
>> [System.IO.Directory]::GetDirectories($Destination).ForEach{$_.Split([System.IO.Path]::DirectorySeparatorChar)[-1]}
>> )
PS C:\Users\olav.birkeland> ModuleFast\Install-ModuleFast -Destination $Destination -Name $InstalledModules `
>> -DestinationOnly -NoPSModulePathUpdate -NoProfileUpdate -Update -WhatIf
Install-ModuleFast [Plan ]
What if: Performing the operation "Install 2 Modules" on target "C:\Users\olav.birkeland\AppData\Local\Microsoft\PowerShell\Modules".

Name ModuleVersion Location
---- ------------- --------
EnterprisePolicyAsCode 10.7.6 https://pwsh.gallery/flatcontainer/enterprisepolicyascode/10.7.6/enterprisepolicyascode.10.7.6.nupkg
Microsoft.PowerShell.ThreadJob 3.0.0 https://pwsh.gallery/flatcontainer/microsoft.powershell.threadjob/3.0.0/microsoft.powershell.threadjob.3.0.0.nupkg

PS C:\Users\olav.birkeland>
```

* EnterprisePolicyAsCode v10.7.6 is a prerelease, `10.7.6-beta`
* Microsoft.PowerShell.ThreadJob v3.0.0 does not exist anywhere else (PowerShell Gallery, repo)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start by reproducing the PowerShell 7.4.6 example with ModuleFast v0.5.1 and the Install-ModuleFast entry point. Review how prerelease and unlisted packages are selected, including the linked PWSHGallery issue, and verify that prereleases are not presented as stable and nonexistent packages are filtered or hidden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp, powershell
Bereich
cli, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.