After several months of testing and building scenarios (there are still some left) I will soon deliver a version which corrects some defects of the last version.
Changes :
Add support for the modules dependencies. Module paths to be saved in cache are unique.
Refactoring and bug fixes around managing multiple repositories.
Add module name duplication checking. Previously you could call Save-Module several times for the same module.
Update actions/cache@v3.0.11 to actions/cache@v3.3.2
Update actions/checkout@v2.5.0 to actions/checkout@v4.1.0
Remove unused workflows.
Fix #54 . Some modules will be impossible to load under Ubuntu, in this case a warning is displayed in the workflow logs.
Fix (#51). If there is a module with the same name in several PSRepositories, we must now prefix the module name with the name of the desired repository: PSGallery\string.
Fix (#50). Module dependencies were not saved into a cache. Now each dependency is saved.
Fix (#47). Documentation: specifies the use of '::' (YAML syntax)
Fix (#45,#48). Some module packages are case-sensitive, and break the implicit (and informal) PascalCase naming rule.
On Linux, the path names passed as a parameter to the 'Cache' action must be constructed with the nuget package name and not with the name coming from the 'modules-to-cache' parameter of the 'PSModuleCache' action.
Fix the analyze of a module name.
Fix module name handling for case-sensitive filesystems. See the 'Test-ModuleNaming' function.
Fix module duplication when we call "Find-Module -name 'AZ' -IncludeDependencies". Example: the dependent module 'Az.Accounts v2.13.1' is duplicated 25 times.
Fix CleanWorkFlowsHistory.yml. Deleting workflow execution history caused an exception when calling ConvertFrom-Json. If the workflow execution history contains a large number of entries (+500) and the API returns a string of several megabytes that is impossible to convert.
Breaking changes
Now we check the existence of at least one repository.
The existence of a module with the same name in several PSRepositories will cause a blocking error.
We must now prefix a name of the duplicated module with the name of the desired repository.
Previously we sorted the elements by version number then we selected the first in the list.
In this case we consider and record both versions but it is the prerelease version which will be saved last in the ".\Pester\5.3.0" directory.
The following setting can also produce the same effect (we assume that at least one stable version exists and that its version number is lower than 2.0.0):
- name: Known issue
uses: potatoqualitee/psmodulecache@v6.0
with:
modules-to-cache: PSModuleCache\Duplicate,PSGallery\string
Here we register two versions of the 'String' module but each package has a different module GUID.
We let the user check the consistency of what they configure.
Note : Under Powershell Core this last setting works some times and other times causes an error (caused by PSmoduleCache) ...
The management of external dependencies (PrivateData.PSData.ExternalModuleDependencies) is the responsibility of the user.
That is to say that external dependencies must be specified in the settings, regardless of the order of declaration.
After several months of testing and building scenarios (there are still some left) I will soon deliver a version which corrects some defects of the last version.
Changes :
Add support for the modules dependencies. Module paths to be saved in cache are unique.
Refactoring and bug fixes around managing multiple repositories.
Add module name duplication checking. Previously you could call Save-Module several times for the same module.
Update actions/cache@v3.0.11 to actions/cache@v3.3.2
Update actions/checkout@v2.5.0 to actions/checkout@v4.1.0
Remove unused workflows.
Fix #54 . Some modules will be impossible to load under Ubuntu, in this case a warning is displayed in the workflow logs.
Fix (#51). If there is a module with the same name in several PSRepositories, we must now prefix the module name with the name of the desired repository: PSGallery\string.
Fix (#50). Module dependencies were not saved into a cache. Now each dependency is saved.
Fix (#47). Documentation: specifies the use of '::' (YAML syntax)
Fix (#45,#48). Some module packages are case-sensitive, and break the implicit (and informal) PascalCase naming rule. On Linux, the path names passed as a parameter to the 'Cache' action must be constructed with the nuget package name and not with the name coming from the 'modules-to-cache' parameter of the 'PSModuleCache' action.
Fix the analyze of a module name.
Fix module name handling for case-sensitive filesystems. See the 'Test-ModuleNaming' function.
Fix module duplication when we call "Find-Module -name 'AZ' -IncludeDependencies". Example: the dependent module 'Az.Accounts v2.13.1' is duplicated 25 times.
Fix CleanWorkFlowsHistory.yml. Deleting workflow execution history caused an exception when calling ConvertFrom-Json. If the workflow execution history contains a large number of entries (+500) and the API returns a string of several megabytes that is impossible to convert.
Breaking changes
Now we check the existence of at least one repository.
The existence of a module with the same name in several PSRepositories will cause a blocking error. We must now prefix a name of the duplicated module with the name of the desired repository. Previously we sorted the elements by version number then we selected the first in the list.
Known issues
In this case we consider and record both versions but it is the prerelease version which will be saved last in the ".\Pester\5.3.0" directory.
The following setting can also produce the same effect (we assume that at least one stable version exists and that its version number is lower than 2.0.0):
The problem will occur as soon as version 2.0.0 is released.
If we authorize the configuration with the same module of different version but coming from two repositories:
we implicitly authorize the following case:
Here we register two versions of the 'String' module but each package has a different module GUID. We let the user check the consistency of what they configure.
Note : Under Powershell Core this last setting works some times and other times causes an error (caused by PSmoduleCache) ...
Module name collision under Linux.
The management of external dependencies (PrivateData.PSData.ExternalModuleDependencies) is the responsibility of the user. That is to say that external dependencies must be specified in the settings, regardless of the order of declaration.