Closed JustinGrote closed 9 months ago
My heart jumped when I saw this PR. But looking at the code in this change it looks like it is still not possible to specify just one of several modules passed to Get-ModuleFastPlan to return the latest prerelease, or to specify that one of several modules should return specific prerelease version. Was hoping it would close issue #7. But great of you getting initial prerelease support working! It will help other use-cases.
@johlju yes, currently if you specify a prerelease spec for one module it is assumed you want prerelease for all modules. You can work around this by pinning your upper version e.g. 'Az<=3.2.0' and since prereleases sort below released versions, you will not see a prerelease e.g. 3.2.0-alpha1 in this case.
I'm thinking about incorporating a syntax like ! to flag individual items as prerelease without requiring the whole thing to operate on prerelease.
Yes using !
could work, but does it need to work on both the ModuleName and RequiredVersion in the module specification passed to Get-ModuleFastPlan
?
E.g.:
ModuleName = 'Az!'
- means latest prerelease or latest release, the last module version to been released RequiredVersion = '1.0.1!'
- means the latest prerelease version of 1.0.1 or full release 1.0.1. (It won't choose 1.0.2-alpha if it exist). RequiredVersion = '1.0.1-beta2'
- when version have a prerelease string means this specific prerelease. This could also be written as '1.0.1-beta2!' It would be on modulename most likely and I will probably use instead of ! because is not a valid filename character and thus not a valid module character.
Note there are many more ways to specify a modulespec now such as nuget syntax: https://github.com/JustinGrote/ModuleFast/blob/3a432010bb75d1932d5531b65e61209ae713bfc9/ModuleFast.tests.ps1#L152-L220
This pull request adds initial support for prerelease modules and enables the prerelease feature automatically if specified. It also includes updates to the Get-ModuleFastPlan function to filter and show prerelease modules based on user preferences.