diff --git a/actions_bootstrap.ps1 b/actions_bootstrap.ps1 index 2368270..3859669 100644 --- a/actions_bootstrap.ps1 +++ b/actions_bootstrap.ps1 @@ -7,30 +7,30 @@ Get-PackageProvider -Name Nuget -ForceBootstrap | Out-Null Set-PSRepository -Name PSGallery -InstallationPolicy Trusted # List of PowerShell Modules required for the build -$modulesToInstall = [System.Collections.ArrayList]::new() +$modulesToInstall = New-Object System.Collections.Generic.List[object] # https://github.com/PowerShell/Plaster -$null = $modulesToInstall.Add(([PSCustomObject]@{ - ModuleName = 'Plaster' - ModuleVersion = '1.1.4' -})) +[void]$modulesToInstall.Add(([PSCustomObject]@{ + ModuleName = 'Plaster' + ModuleVersion = '1.1.4' + })) # https://github.com/pester/Pester -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' ModuleVersion = '5.5.0' })) # https://github.com/nightroman/Invoke-Build -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'InvokeBuild' ModuleVersion = '5.10.5' })) # https://github.com/PowerShell/PSScriptAnalyzer -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'PSScriptAnalyzer' ModuleVersion = '1.21.0' })) # https://github.com/PowerShell/platyPS # older version used due to: https://github.com/PowerShell/platyPS/issues/457 -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'platyPS' ModuleVersion = '0.12.0' })) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 7227d91..5a884f7 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Catesta template module changes - Added `MarkdownRepair.ps1` and added Markdown repair logic to InvokeBuild script. This is to account for an issue in PowerShell `7.4.0`+ where a new parameter was introduced that platyPS can not handle during help creation. Ref: [platyPS issue]([text](https://github.com/PowerShell/platyPS/issues/595)). - If a build is run and the build environment is `7.4.0`+ the Markdown repair will run to account for the new parameter and repair markdown for help creation. + - Replaced uses of `System.Collections.ArrayList` with `System.Collections.Generic.List` throughout. - CI/CD Changes: - Azure: - Updated `testRunner` alias reference to `testResultsFormat` @@ -21,11 +22,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Plaster bumped from `1.1.3` to `1.1.4` - Pester bumped from `5.4.0` to `5.5.0` - InvokeBuild bumped from `5.10.2` to `5.10.5` - - Catesta primary module changes - Added `MarkdownRepair.ps1` and added Markdown repair logic to InvokeBuild script. - Updated `LicenseUri` and `IconUri` link in `psd1` manifest. - Updated link references in inline help for both public functions + - Replaced uses of `System.Collections.ArrayList` with `System.Collections.Generic.List` throughout. - Plaster bumped from `1.1.3` to `1.1.4` - Pester bumped from `5.4.0` to `5.5.0` - InvokeBuild bumped from `5.10.2` to `5.10.5` diff --git a/src/Catesta/Resources/AWS/install_modules.ps1 b/src/Catesta/Resources/AWS/install_modules.ps1 index 4edf197..413ab62 100644 --- a/src/Catesta/Resources/AWS/install_modules.ps1 +++ b/src/Catesta/Resources/AWS/install_modules.ps1 @@ -41,12 +41,12 @@ $VerbosePreference = 'SilentlyContinue' # List of PowerShell Modules required for the build # The AWS PowerShell Modules are added below, based on the $PSEdition -$modulesToInstall = [System.Collections.ArrayList]::new() +$modulesToInstall = New-Object System.Collections.Generic.List[object] <% if ($PLASTER_PARAM_Pester-eq '4') { @' # https://github.com/pester/Pester -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' ModuleVersion = '4.10.1' BucketName = '<%=$PLASTER_PARAM_S3Bucket%>' @@ -57,7 +57,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ elseif ($PLASTER_PARAM_Pester-eq '5') { @' # https://github.com/pester/Pester -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' ModuleVersion = '5.5.0' BucketName = '<%=$PLASTER_PARAM_S3Bucket%>' @@ -66,25 +66,25 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ '@ } %> -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'InvokeBuild' ModuleVersion = '5.10.5' BucketName = '<%=$PLASTER_PARAM_S3Bucket%>' KeyPrefix = '' })) -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'PSScriptAnalyzer' ModuleVersion = '1.21.0' BucketName = '<%=$PLASTER_PARAM_S3Bucket%>' KeyPrefix = '' })) -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'platyPS' ModuleVersion = '0.12.0' BucketName = '<%=$PLASTER_PARAM_S3Bucket%>' KeyPrefix = '' })) -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'AWS.Tools.Common' ModuleVersion = '4.1.133' BucketName = '<%=$PLASTER_PARAM_S3Bucket%>' @@ -94,7 +94,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ <% if ($PLASTER_PARAM_VAULT -eq 'VAULT') { @' -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Microsoft.PowerShell.SecretManagement' ModuleVersion = '1.1.2' BucketName = '<%=$PLASTER_PARAM_S3Bucket%>' @@ -113,7 +113,7 @@ if ($galleryDownload -eq $false) { if ($PSEdition -eq 'Core') { $moduleInstallPath = [System.IO.Path]::Combine($env:ProgramFiles, 'PowerShell', 'Modules') # Add the AWSPowerShell.NetCore Module - # $null = $modulesToInstall.Add(([PSCustomObject]@{ + # [void]$modulesToInstall.Add(([PSCustomObject]@{ # ModuleName = 'AWSPowerShell.NetCore' # ModuleVersion = '3.3.604.0' # BucketName = 'ps-invoke-modules' @@ -123,7 +123,7 @@ if ($galleryDownload -eq $false) { else { $moduleInstallPath = [System.IO.Path]::Combine($env:ProgramFiles, 'WindowsPowerShell', 'Modules') # Add the AWSPowerShell Module - # $null = $modulesToInstall.Add(([PSCustomObject]@{ + # [void]$modulesToInstall.Add(([PSCustomObject]@{ # ModuleName = 'AWSPowerShell' # ModuleVersion = '3.3.604.0' # BucketName = 'ps-invoke-modules' @@ -135,7 +135,7 @@ if ($galleryDownload -eq $false) { $moduleInstallPath = [System.IO.Path]::Combine('/', 'usr', 'local', 'share', 'powershell', 'Modules') # Add the AWSPowerShell.NetCore Module - # $null = $modulesToInstall.Add(([PSCustomObject]@{ + # [void]$modulesToInstall.Add(([PSCustomObject]@{ # ModuleName = 'AWSPowerShell.NetCore' # ModuleVersion = '3.3.604.0' # BucketName = 'ps-invoke-modules' @@ -145,7 +145,7 @@ if ($galleryDownload -eq $false) { elseif ($PSEdition -eq 'Desktop') { $moduleInstallPath = [System.IO.Path]::Combine($env:ProgramFiles, 'WindowsPowerShell', 'Modules') # Add the AWSPowerShell Module - # $null = $modulesToInstall.Add(([PSCustomObject]@{ + # [void]$modulesToInstall.Add(([PSCustomObject]@{ # ModuleName = 'AWSPowerShell' # ModuleVersion = '3.3.604.0' # BucketName = 'ps-invoke-modules' diff --git a/src/Catesta/Resources/AppVeyor/actions_bootstrap.ps1 b/src/Catesta/Resources/AppVeyor/actions_bootstrap.ps1 index 6cae12c..ddc0402 100644 --- a/src/Catesta/Resources/AppVeyor/actions_bootstrap.ps1 +++ b/src/Catesta/Resources/AppVeyor/actions_bootstrap.ps1 @@ -7,12 +7,12 @@ Get-PackageProvider -Name Nuget -ForceBootstrap | Out-Null Set-PSRepository -Name PSGallery -InstallationPolicy Trusted # List of PowerShell Modules required for the build -$modulesToInstall = [System.Collections.ArrayList]::new() +$modulesToInstall = New-Object System.Collections.Generic.List[object] <% if ($PLASTER_PARAM_Pester-eq '4') { @' # https://github.com/pester/Pester -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' ModuleVersion = '4.10.1' })) @@ -21,7 +21,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ elseif ($PLASTER_PARAM_Pester-eq '5') { @' # https://github.com/pester/Pester -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' ModuleVersion = '5.5.0' })) @@ -29,18 +29,18 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ } %> # https://github.com/nightroman/Invoke-Build -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'InvokeBuild' ModuleVersion = '5.10.5' })) # https://github.com/PowerShell/PSScriptAnalyzer -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'PSScriptAnalyzer' ModuleVersion = '1.21.0' })) # https://github.com/PowerShell/platyPS # older version used due to: https://github.com/PowerShell/platyPS/issues/457 -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'platyPS' ModuleVersion = '0.12.0' })) @@ -48,7 +48,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ <% if ($PLASTER_PARAM_VAULT -eq 'VAULT') { @' -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Microsoft.PowerShell.SecretManagement' ModuleVersion = '1.1.2' })) diff --git a/src/Catesta/Resources/Azure/actions_bootstrap.ps1 b/src/Catesta/Resources/Azure/actions_bootstrap.ps1 index 6cae12c..ddc0402 100644 --- a/src/Catesta/Resources/Azure/actions_bootstrap.ps1 +++ b/src/Catesta/Resources/Azure/actions_bootstrap.ps1 @@ -7,12 +7,12 @@ Get-PackageProvider -Name Nuget -ForceBootstrap | Out-Null Set-PSRepository -Name PSGallery -InstallationPolicy Trusted # List of PowerShell Modules required for the build -$modulesToInstall = [System.Collections.ArrayList]::new() +$modulesToInstall = New-Object System.Collections.Generic.List[object] <% if ($PLASTER_PARAM_Pester-eq '4') { @' # https://github.com/pester/Pester -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' ModuleVersion = '4.10.1' })) @@ -21,7 +21,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ elseif ($PLASTER_PARAM_Pester-eq '5') { @' # https://github.com/pester/Pester -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' ModuleVersion = '5.5.0' })) @@ -29,18 +29,18 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ } %> # https://github.com/nightroman/Invoke-Build -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'InvokeBuild' ModuleVersion = '5.10.5' })) # https://github.com/PowerShell/PSScriptAnalyzer -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'PSScriptAnalyzer' ModuleVersion = '1.21.0' })) # https://github.com/PowerShell/platyPS # older version used due to: https://github.com/PowerShell/platyPS/issues/457 -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'platyPS' ModuleVersion = '0.12.0' })) @@ -48,7 +48,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ <% if ($PLASTER_PARAM_VAULT -eq 'VAULT') { @' -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Microsoft.PowerShell.SecretManagement' ModuleVersion = '1.1.2' })) diff --git a/src/Catesta/Resources/Bitbucket/actions_bootstrap.ps1 b/src/Catesta/Resources/Bitbucket/actions_bootstrap.ps1 index 6cae12c..ddc0402 100644 --- a/src/Catesta/Resources/Bitbucket/actions_bootstrap.ps1 +++ b/src/Catesta/Resources/Bitbucket/actions_bootstrap.ps1 @@ -7,12 +7,12 @@ Get-PackageProvider -Name Nuget -ForceBootstrap | Out-Null Set-PSRepository -Name PSGallery -InstallationPolicy Trusted # List of PowerShell Modules required for the build -$modulesToInstall = [System.Collections.ArrayList]::new() +$modulesToInstall = New-Object System.Collections.Generic.List[object] <% if ($PLASTER_PARAM_Pester-eq '4') { @' # https://github.com/pester/Pester -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' ModuleVersion = '4.10.1' })) @@ -21,7 +21,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ elseif ($PLASTER_PARAM_Pester-eq '5') { @' # https://github.com/pester/Pester -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' ModuleVersion = '5.5.0' })) @@ -29,18 +29,18 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ } %> # https://github.com/nightroman/Invoke-Build -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'InvokeBuild' ModuleVersion = '5.10.5' })) # https://github.com/PowerShell/PSScriptAnalyzer -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'PSScriptAnalyzer' ModuleVersion = '1.21.0' })) # https://github.com/PowerShell/platyPS # older version used due to: https://github.com/PowerShell/platyPS/issues/457 -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'platyPS' ModuleVersion = '0.12.0' })) @@ -48,7 +48,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ <% if ($PLASTER_PARAM_VAULT -eq 'VAULT') { @' -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Microsoft.PowerShell.SecretManagement' ModuleVersion = '1.1.2' })) diff --git a/src/Catesta/Resources/GitHubActions/actions_bootstrap.ps1 b/src/Catesta/Resources/GitHubActions/actions_bootstrap.ps1 index 6cae12c..ddc0402 100644 --- a/src/Catesta/Resources/GitHubActions/actions_bootstrap.ps1 +++ b/src/Catesta/Resources/GitHubActions/actions_bootstrap.ps1 @@ -7,12 +7,12 @@ Get-PackageProvider -Name Nuget -ForceBootstrap | Out-Null Set-PSRepository -Name PSGallery -InstallationPolicy Trusted # List of PowerShell Modules required for the build -$modulesToInstall = [System.Collections.ArrayList]::new() +$modulesToInstall = New-Object System.Collections.Generic.List[object] <% if ($PLASTER_PARAM_Pester-eq '4') { @' # https://github.com/pester/Pester -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' ModuleVersion = '4.10.1' })) @@ -21,7 +21,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ elseif ($PLASTER_PARAM_Pester-eq '5') { @' # https://github.com/pester/Pester -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' ModuleVersion = '5.5.0' })) @@ -29,18 +29,18 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ } %> # https://github.com/nightroman/Invoke-Build -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'InvokeBuild' ModuleVersion = '5.10.5' })) # https://github.com/PowerShell/PSScriptAnalyzer -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'PSScriptAnalyzer' ModuleVersion = '1.21.0' })) # https://github.com/PowerShell/platyPS # older version used due to: https://github.com/PowerShell/platyPS/issues/457 -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'platyPS' ModuleVersion = '0.12.0' })) @@ -48,7 +48,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ <% if ($PLASTER_PARAM_VAULT -eq 'VAULT') { @' -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Microsoft.PowerShell.SecretManagement' ModuleVersion = '1.1.2' })) diff --git a/src/Catesta/Resources/GitLab/actions_bootstrap.ps1 b/src/Catesta/Resources/GitLab/actions_bootstrap.ps1 index 6cae12c..ddc0402 100644 --- a/src/Catesta/Resources/GitLab/actions_bootstrap.ps1 +++ b/src/Catesta/Resources/GitLab/actions_bootstrap.ps1 @@ -7,12 +7,12 @@ Get-PackageProvider -Name Nuget -ForceBootstrap | Out-Null Set-PSRepository -Name PSGallery -InstallationPolicy Trusted # List of PowerShell Modules required for the build -$modulesToInstall = [System.Collections.ArrayList]::new() +$modulesToInstall = New-Object System.Collections.Generic.List[object] <% if ($PLASTER_PARAM_Pester-eq '4') { @' # https://github.com/pester/Pester -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' ModuleVersion = '4.10.1' })) @@ -21,7 +21,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ elseif ($PLASTER_PARAM_Pester-eq '5') { @' # https://github.com/pester/Pester -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' ModuleVersion = '5.5.0' })) @@ -29,18 +29,18 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ } %> # https://github.com/nightroman/Invoke-Build -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'InvokeBuild' ModuleVersion = '5.10.5' })) # https://github.com/PowerShell/PSScriptAnalyzer -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'PSScriptAnalyzer' ModuleVersion = '1.21.0' })) # https://github.com/PowerShell/platyPS # older version used due to: https://github.com/PowerShell/platyPS/issues/457 -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'platyPS' ModuleVersion = '0.12.0' })) @@ -48,7 +48,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ <% if ($PLASTER_PARAM_VAULT -eq 'VAULT') { @' -$null = $modulesToInstall.Add(([PSCustomObject]@{ +[void]$modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Microsoft.PowerShell.SecretManagement' ModuleVersion = '1.1.2' }))