From 75fcdb5d7a60e803bf9e6cc680f4a9dba1d13055 Mon Sep 17 00:00:00 2001 From: Stiwi Gabriel Courage Date: Tue, 28 Apr 2026 15:42:57 +0200 Subject: [PATCH 1/4] feat(#133): enhance test coverage for NovaModuleTools - Add tests for CodeScene Cobertura remapping helpers - Implement coverage gap tests for quality helpers - Validate Nova package output directory initialization - Improve timeout handling in PowerShell script execution --- .../InitializeNovaPackageOutputDirectory.ps1 | 12 +- .../InvokeNovaPowerShellScriptWithTimeout.ps1 | 5 +- tests/CiCoverage.Tests.ps1 | 221 ++++++++++ tests/CoverageGaps.ReleaseInternals.Tests.ps1 | 128 ++++++ tests/RemainingHelperCoverage.Tests.ps1 | 399 ++++++++++++++++++ tests/UpdateNotification.Tests.ps1 | 99 +++++ 6 files changed, 856 insertions(+), 8 deletions(-) diff --git a/src/private/package/InitializeNovaPackageOutputDirectory.ps1 b/src/private/package/InitializeNovaPackageOutputDirectory.ps1 index 25dde969..e00706c9 100644 --- a/src/private/package/InitializeNovaPackageOutputDirectory.ps1 +++ b/src/private/package/InitializeNovaPackageOutputDirectory.ps1 @@ -3,19 +3,19 @@ function Initialize-NovaPackageOutputDirectory { [CmdletBinding()] param( [Parameter(Mandatory)][pscustomobject]$ProjectInfo, - [Alias('PackageMetadata')][Parameter(Mandatory)][object[]]$PackageMetadataList + [AllowEmptyCollection()][Alias('PackageMetadata')][Parameter(Mandatory)][object[]]$PackageMetadataList ) - $packageMetadata = @($PackageMetadataList)[0] + $packageMetadata = @($PackageMetadataList) | Select-Object -First 1 if ($null -eq $packageMetadata) { Stop-NovaOperation -Message 'Package metadata list cannot be empty.' -ErrorId 'Nova.Validation.PackageMetadataListEmpty' -Category InvalidArgument -TargetObject 'PackageMetadataList' } - if ($PackageMetadata.CleanOutputDirectory) { - Clear-NovaPackageOutputDirectory -ProjectInfo $ProjectInfo -OutputDirectory $PackageMetadata.OutputDirectory + if ($packageMetadata.CleanOutputDirectory) { + Clear-NovaPackageOutputDirectory -ProjectInfo $ProjectInfo -OutputDirectory $packageMetadata.OutputDirectory } - if (-not (Test-Path -LiteralPath $PackageMetadata.OutputDirectory)) { - $null = New-Item -ItemType Directory -Path $PackageMetadata.OutputDirectory -Force + if (-not (Test-Path -LiteralPath $packageMetadata.OutputDirectory)) { + $null = New-Item -ItemType Directory -Path $packageMetadata.OutputDirectory -Force } } diff --git a/src/private/update/InvokeNovaPowerShellScriptWithTimeout.ps1 b/src/private/update/InvokeNovaPowerShellScriptWithTimeout.ps1 index 3dd648ec..5ed0084a 100644 --- a/src/private/update/InvokeNovaPowerShellScriptWithTimeout.ps1 +++ b/src/private/update/InvokeNovaPowerShellScriptWithTimeout.ps1 @@ -3,10 +3,11 @@ function Invoke-NovaPowerShellScriptWithTimeout { param( [Parameter(Mandatory)][string]$Script, [object[]]$ArgumentList = @(), - [int]$TimeoutMilliseconds = 3000 + [int]$TimeoutMilliseconds = 3000, + [scriptblock]$PowerShellFactory = {[powershell]::Create()} ) - $powershell = [powershell]::Create() + $powershell = & $PowerShellFactory try { $null = $powershell.AddScript($Script) foreach ($argument in $ArgumentList) { diff --git a/tests/CiCoverage.Tests.ps1 b/tests/CiCoverage.Tests.ps1 index 71ba5faf..164472c9 100644 --- a/tests/CiCoverage.Tests.ps1 +++ b/tests/CiCoverage.Tests.ps1 @@ -2,6 +2,47 @@ BeforeAll { . (Join-Path $PSScriptRoot '..' 'scripts' 'build' 'ci' 'CodeSceneCoverageMap.ps1') . (Join-Path $PSScriptRoot '..' 'scripts' 'build' 'ci' 'CodeSceneCoverageXml.ps1') . (Join-Path $PSScriptRoot '..' 'scripts' 'build' 'ci' 'CoverageLowReport.ps1') + + foreach ($functionName in @( + 'ConvertTo-CoberturaRelativePath' + 'Get-CodeSceneCoverageErrorRecord' + 'Get-SourceSectionListFromBuiltModule' + 'Find-SourceSectionForLine' + 'Get-EmptyCoberturaLineBucket' + 'Add-CoberturaLineHit' + 'Get-CoberturaLineStat' + 'Get-CoberturaPackageName' + 'Get-CoberturaSourceLineRange' + 'Test-CoberturaLineOutsideSourceRange' + 'Add-CoberturaMappedLineHit' + 'Add-CoberturaLineNodeHit' + 'Get-CoberturaLineBucketMap' + 'Add-CoberturaAttribute' + 'Get-CoberturaClassElement' + 'Get-CoberturaPackageElement' + 'Get-CoberturaCoverageAttributeMap' + 'Get-CoberturaCoverageDocument' + 'Convert-CoberturaCoverageToSourcePath' + 'ConvertTo-CoverageLineRate' + 'Get-CoverageLowReportEntryList' + 'Format-CoverageLowReportLine' + 'Write-CoverageLowReport' + )) { + $scriptBlock = (Get-Command -Name $functionName -CommandType Function -ErrorAction Stop).ScriptBlock + Set-Item -Path "function:global:$functionName" -Value $scriptBlock + } + + $here = Split-Path -Parent $PSCommandPath + $script:repoRoot = Split-Path -Parent $here + $script:moduleName = (Get-Content -LiteralPath (Join-Path $script:repoRoot 'project.json') -Raw | ConvertFrom-Json).ProjectName + $script:distModuleDir = Join-Path $script:repoRoot "dist/$script:moduleName" + + if (-not (Test-Path -LiteralPath $script:distModuleDir)) { + throw "Expected built $script:moduleName module at: $script:distModuleDir. Run Invoke-NovaBuild in the repo root first." + } + + Remove-Module $script:moduleName -ErrorAction SilentlyContinue + Import-Module $script:distModuleDir -Force } Describe 'CodeScene Cobertura remapping helpers' { @@ -204,3 +245,183 @@ Describe 'CodeScene Cobertura remapping helpers' { ) } } + +Describe 'Coverage gaps for quality helpers' { + It 'Write-NovaPesterTestResultReport writes a success NUnit-style report with default suite name' { + $outputPath = Join-Path $TestDrive 'success-report.xml' + + InModuleScope $script:moduleName -Parameters @{OutputPath = $outputPath} { + param($OutputPath) + + $testResult = [pscustomobject]@{ + Tests = @( + [pscustomobject]@{Result = 'Passed'} + [pscustomobject]@{Result = 'Passed'} + [pscustomobject]@{Result = 'Skipped'} + [pscustomobject]@{Result = 'Inconclusive'} + ) + } + + Write-NovaPesterTestResultReport -TestResult $testResult -OutputPath $OutputPath + + [xml]$report = Get-Content -LiteralPath $OutputPath -Raw + $testResultsNode = $report.SelectSingleNode('/test-results') + $testSuiteNode = $report.SelectSingleNode('/test-results/test-suite') + + $testResultsNode.name | Should -Be 'NovaModuleTools' + $testResultsNode.total | Should -Be '4' + $testResultsNode.failures | Should -Be '0' + $testResultsNode.inconclusive | Should -Be '1' + $testResultsNode.skipped | Should -Be '1' + $testSuiteNode.result | Should -Be 'Success' + $testSuiteNode.success | Should -Be 'True' + $testSuiteNode.passed | Should -Be '2' + } + } + + It 'Write-NovaPesterTestResultReport writes a failure NUnit-style report when failed tests are present' { + $outputPath = Join-Path $TestDrive 'failure-report.xml' + + InModuleScope $script:moduleName -Parameters @{OutputPath = $outputPath} { + param($OutputPath) + + $testResult = [pscustomobject]@{ + Tests = @( + [pscustomobject]@{Result = 'Passed'} + [pscustomobject]@{Result = 'Failed'} + ) + } + + Write-NovaPesterTestResultReport -TestResult $testResult -OutputPath $OutputPath -TestSuiteName 'FocusedSuite' + + [xml]$report = Get-Content -LiteralPath $OutputPath -Raw + $testResultsNode = $report.SelectSingleNode('/test-results') + $testSuiteNode = $report.SelectSingleNode('/test-results/test-suite') + + $testResultsNode.name | Should -Be 'FocusedSuite' + $testResultsNode.failures | Should -Be '1' + $testSuiteNode.result | Should -Be 'Failure' + $testSuiteNode.success | Should -Be 'False' + $testSuiteNode.failed | Should -Be '1' + } + } + + It 'Write-NovaPesterTestResultArtifact returns without writing when the result has no Tests property' { + InModuleScope $script:moduleName { + Mock Get-Command {throw 'Get-Command should not be called when Tests is missing.'} + + {Write-NovaPesterTestResultArtifact -TestResult ([pscustomobject]@{Summary = 'no tests'}) -OutputPath '/tmp/unused.xml'} | Should -Not -Throw + + Assert-MockCalled Get-Command -Times 0 + } + } + + It 'Write-NovaPesterTestResultArtifact uses the provided report writer when one is supplied' { + InModuleScope $script:moduleName { + $calls = [System.Collections.Generic.List[object]]::new() + $reportWriter = { + param($TestResult, $OutputPath) + + $calls.Add([pscustomobject]@{ + TestResult = $TestResult + OutputPath = $OutputPath + }) | Out-Null + }.GetNewClosure() + $testResult = [pscustomobject]@{Tests = @([pscustomobject]@{Result = 'Passed'})} + + Write-NovaPesterTestResultArtifact -TestResult $testResult -OutputPath '/tmp/provided.xml' -ReportWriter $reportWriter + + $calls.Count | Should -Be 1 + $calls[0].OutputPath | Should -Be '/tmp/provided.xml' + $calls[0].TestResult.Tests[0].Result | Should -Be 'Passed' + } + } + + It 'Write-NovaPesterTestResultArtifact resolves the default report writer when none is supplied' { + InModuleScope $script:moduleName { + Mock Get-Command { + [pscustomobject]@{ + ScriptBlock = { + param($TestResult, $OutputPath) + + return [pscustomobject]@{ + TestCount = @($TestResult.Tests).Count + OutputPath = $OutputPath + } + } + } + } -ParameterFilter { + $Name -eq 'Write-NovaPesterTestResultReport' -and $CommandType -eq 'Function' + } + + $result = Write-NovaPesterTestResultArtifact -TestResult ([pscustomobject]@{Tests = @([pscustomobject]@{Result = 'Passed'})}) -OutputPath '/tmp/default.xml' + + $result.TestCount | Should -Be 1 + $result.OutputPath | Should -Be '/tmp/default.xml' + Assert-MockCalled Get-Command -Times 1 -ParameterFilter { + $Name -eq 'Write-NovaPesterTestResultReport' -and $CommandType -eq 'Function' + } + } + } + + It 'Initialize-NovaPesterExecutionConfiguration applies returned overrides when ' -ForEach @( + @{ + Name = 'both verbosity and render mode are provided' + Override = [pscustomobject]@{Verbosity = 'Detailed'; RenderMode = 'Plaintext'} + BoundParameters = @{OutputVerbosity = 'Detailed'; OutputRenderMode = 'Plaintext'} + ExpectedVerbosity = 'Detailed' + ExpectedRenderMode = 'Plaintext' + } + @{ + Name = 'only render mode is provided' + Override = [pscustomobject]@{Verbosity = $null; RenderMode = 'Ansi'} + BoundParameters = @{OutputRenderMode = 'Ansi'} + ExpectedVerbosity = 'Normal' + ExpectedRenderMode = 'Ansi' + } + ) { + $pesterConfig = [pscustomobject]@{ + Output = [pscustomobject]@{ + Verbosity = 'Normal' + RenderMode = 'Auto' + } + TestResult = [pscustomobject]@{Enabled = $true} + } + + InModuleScope $script:moduleName -Parameters @{TestCase = $_; PesterConfig = $pesterConfig} { + param($TestCase, $PesterConfig) + + Mock Get-NovaPesterOutputOptionOverride {$TestCase.Override} + + Initialize-NovaPesterExecutionConfiguration -PesterConfig $PesterConfig -BoundParameters $TestCase.BoundParameters + + $PesterConfig.Output.Verbosity | Should -Be $TestCase.ExpectedVerbosity + $PesterConfig.Output.RenderMode | Should -Be $TestCase.ExpectedRenderMode + $PesterConfig.TestResult.Enabled | Should -BeFalse + Assert-MockCalled Get-NovaPesterOutputOptionOverride -Times 1 + } + } + + It 'Initialize-NovaPesterExecutionConfiguration preserves unsupported settings when no overrides are returned' { + $pesterConfig = [pscustomobject]@{ + Output = [pscustomobject]@{ + Verbosity = 'Normal' + RenderMode = 'Auto' + } + TestResult = [pscustomobject]@{Summary = 'No Enabled property'} + } + + InModuleScope $script:moduleName -Parameters @{PesterConfig = $pesterConfig} { + param($PesterConfig) + + Mock Get-NovaPesterOutputOptionOverride {$null} + + Initialize-NovaPesterExecutionConfiguration -PesterConfig $PesterConfig -BoundParameters @{} + + $PesterConfig.Output.Verbosity | Should -Be 'Normal' + $PesterConfig.Output.RenderMode | Should -Be 'Auto' + $PesterConfig.TestResult.PSObject.Properties.Name | Should -Not -Contain 'Enabled' + Assert-MockCalled Get-NovaPesterOutputOptionOverride -Times 1 + } + } +} diff --git a/tests/CoverageGaps.ReleaseInternals.Tests.ps1 b/tests/CoverageGaps.ReleaseInternals.Tests.ps1 index e1bedfec..fea8fd5d 100644 --- a/tests/CoverageGaps.ReleaseInternals.Tests.ps1 +++ b/tests/CoverageGaps.ReleaseInternals.Tests.ps1 @@ -380,6 +380,134 @@ Describe 'Coverage gaps for release and git internals' { } } + It 'Get-NovaPublishedLocalManifestPath returns nothing for non-local publish invocations and resolves the local manifest path when enabled' { + InModuleScope $script:moduleName { + $projectInfo = [pscustomobject]@{ProjectName = 'NovaModuleTools'} + $localInvocation = [pscustomobject]@{ + IsLocal = $true + Target = '/tmp/modules' + Parameters = @{ProjectInfo = $projectInfo} + } + + Get-NovaPublishedLocalManifestPath -PublishInvocation ([pscustomobject]@{IsLocal = $false; Target = '/tmp/ignored'; Parameters = @{ProjectInfo = $projectInfo}}) | Should -BeNullOrEmpty + Get-NovaPublishedLocalManifestPath -PublishInvocation $localInvocation | Should -Be (Join-Path '/tmp/modules/NovaModuleTools' 'NovaModuleTools.psd1') + } + } + + It 'Get-NovaLocalPublishActivation returns nothing for non-local publishes and resolves import details for local publishes' { + InModuleScope $script:moduleName { + $importAction = {'imported'} + + Mock Get-NovaPublishedLocalManifestPath {'/tmp/modules/NovaModuleTools/NovaModuleTools.psd1'} + Mock Get-Command {[pscustomobject]@{ScriptBlock = $importAction}} -ParameterFilter { + $Name -eq 'Import-NovaPublishedLocalModule' -and $CommandType -eq 'Function' + } + + Get-NovaLocalPublishActivation -PublishInvocation ([pscustomobject]@{IsLocal = $false}) | Should -BeNullOrEmpty + + $result = Get-NovaLocalPublishActivation -PublishInvocation ([pscustomobject]@{IsLocal = $true; Target = '/tmp/modules'; Parameters = @{ProjectInfo = [pscustomobject]@{ProjectName = 'NovaModuleTools'}}}) + + $result.ManifestPath | Should -Be '/tmp/modules/NovaModuleTools/NovaModuleTools.psd1' + $result.ImportAction | Should -Be $importAction + Assert-MockCalled Get-NovaPublishedLocalManifestPath -Times 1 + Assert-MockCalled Get-Command -Times 1 -ParameterFilter { + $Name -eq 'Import-NovaPublishedLocalModule' -and $CommandType -eq 'Function' + } + } + } + + It 'Get-NovaInstalledProjectManifestPath delegates through the local publish manifest helper with the resolved target path' { + InModuleScope $script:moduleName { + $projectInfo = [pscustomobject]@{ProjectName = 'NovaModuleTools'; ProjectRoot = '/tmp/project'} + + Mock Resolve-NovaLocalPublishPath {'/tmp/modules'} + Mock Get-NovaPublishedLocalManifestPath { + $PublishInvocation.IsLocal | Should -BeTrue + $PublishInvocation.Target | Should -Be '/tmp/modules' + $PublishInvocation.Parameters.ProjectInfo | Should -Be $projectInfo + return '/tmp/modules/NovaModuleTools/NovaModuleTools.psd1' + } + + $result = Get-NovaInstalledProjectManifestPath -ProjectInfo $projectInfo -ModuleDirectoryPath '/tmp/custom-modules' + + $result | Should -Be '/tmp/modules/NovaModuleTools/NovaModuleTools.psd1' + Assert-MockCalled Resolve-NovaLocalPublishPath -Times 1 -ParameterFilter {$ModuleDirectoryPath -eq '/tmp/custom-modules'} + Assert-MockCalled Get-NovaPublishedLocalManifestPath -Times 1 + } + } + + It 'Get-NovaResolvedPublishParameterMap copies publish parameters and lets workflow values override matching keys' { + InModuleScope $script:moduleName { + $publishInvocation = [pscustomobject]@{ + Parameters = [ordered]@{ + ProjectInfo = [pscustomobject]@{ProjectName = 'NovaModuleTools'} + Repository = 'PSGallery' + ApiKey = 'initial-key' + } + } + + $result = Get-NovaResolvedPublishParameterMap -PublishInvocation $publishInvocation -WorkflowParams @{ApiKey = 'workflow-key'; Confirm = $false} + + $result.ProjectInfo.ProjectName | Should -Be 'NovaModuleTools' + $result.Repository | Should -Be 'PSGallery' + $result.ApiKey | Should -Be 'workflow-key' + $result.Confirm | Should -BeFalse + } + } + + It 'Import-NovaPublishedLocalModule fails clearly when the local manifest is missing' { + InModuleScope $script:moduleName { + Mock Test-Path {$false} -ParameterFilter {$LiteralPath -eq '/tmp/missing.psd1' -and $PathType -eq 'Leaf'} + Mock Stop-NovaOperation {throw [System.InvalidOperationException]::new($Message)} + + {Import-NovaPublishedLocalModule -ProjectName 'NovaModuleTools' -ManifestPath '/tmp/missing.psd1'} | Should -Throw 'Expected locally published module manifest at: /tmp/missing.psd1' + Assert-MockCalled Stop-NovaOperation -Times 1 -ParameterFilter { + $Message -eq 'Expected locally published module manifest at: /tmp/missing.psd1' -and + $ErrorId -eq 'Nova.Environment.LocalPublishedModuleManifestNotFound' -and + $Category -eq 'ObjectNotFound' -and + $TargetObject -eq '/tmp/missing.psd1' + } + } + } + + It 'Import-NovaPublishedLocalModule imports the requested local module manifest as a global module' { + InModuleScope $script:moduleName { + $importedModule = [pscustomobject]@{Path = '/tmp/modules/NovaModuleTools/NovaModuleTools.psd1'; Name = 'NovaModuleTools'} + + Mock Test-Path {$true} + Mock Get-Module {@()} + Mock Remove-Module {} + Mock Import-Module {$importedModule} + + $result = Import-NovaPublishedLocalModule -ProjectName 'NovaModuleTools' -ManifestPath $importedModule.Path + + $result | Should -Be $importedModule + Assert-MockCalled Import-Module -Times 1 + } + } + + It 'Import-NovaPublishedLocalModule removes matching and stale loaded module instances around the import' { + InModuleScope $script:moduleName { + $importedModule = [pscustomobject]@{Path = '/tmp/modules/NovaModuleTools/NovaModuleTools.psd1'; Name = 'NovaModuleTools'} + + Mock Test-Path {$true} -ParameterFilter {$LiteralPath -eq $importedModule.Path -and $PathType -eq 'Leaf'} + Mock Get-Module { + @( + [pscustomobject]@{Path = $importedModule.Path} + [pscustomobject]@{Path = '/tmp/modules/NovaModuleTools/legacy.psd1'} + ) + } -ParameterFilter {$Name -eq 'NovaModuleTools' -and $All} + Mock Remove-Module {} + Mock Import-Module {$importedModule} -ParameterFilter { + $Name -eq $importedModule.Path -and $Force -and $Global -and $PassThru -and $ErrorAction -eq 'Stop' + } + + $null = Import-NovaPublishedLocalModule -ProjectName 'NovaModuleTools' -ManifestPath $importedModule.Path + + Assert-MockCalled Remove-Module -Times 2 + } + } + It 'Get-GitCommitMessageForVersionBump returns empty when the project is not a git repository' { InModuleScope $script:moduleName { $projectRoot = Join-Path $TestDrive 'no-git-project' diff --git a/tests/RemainingHelperCoverage.Tests.ps1 b/tests/RemainingHelperCoverage.Tests.ps1 index 722846b4..c6ffe80a 100644 --- a/tests/RemainingHelperCoverage.Tests.ps1 +++ b/tests/RemainingHelperCoverage.Tests.ps1 @@ -330,6 +330,405 @@ Describe 'Coverage for remaining manifest, JSON, and help-locale helpers' { } } + It 'Get-NovaPackageSettingValue reads dictionary and object values and returns nothing for missing entries' { + InModuleScope $script:moduleName { + Get-NovaPackageSettingValue -InputObject $null -Name 'Id' | Should -BeNullOrEmpty + Get-NovaPackageSettingValue -InputObject @{Id = 'Nova.Package'} -Name 'Id' | Should -Be 'Nova.Package' + Get-NovaPackageSettingValue -InputObject @{Id = 'Nova.Package'} -Name 'Missing' | Should -BeNullOrEmpty + Get-NovaPackageSettingValue -InputObject ([pscustomobject]@{Id = 'Nova.Object.Package'}) -Name 'Id' | Should -Be 'Nova.Object.Package' + Get-NovaPackageSettingValue -InputObject ([pscustomobject]@{Id = 'Nova.Object.Package'}) -Name 'Missing' | Should -BeNullOrEmpty + } + } + + It 'Merge-NovaPackageSettingTable merges dictionary and object settings while letting overrides win' { + InModuleScope $script:moduleName { + $result = Merge-NovaPackageSettingTable -BaseSettings ([pscustomobject]@{Id = 'base'; Authors = 'Base'}) -OverrideSettings @{Authors = 'Override'; Description = 'Package description'} + + $result.Id | Should -Be 'base' + $result.Authors | Should -Be 'Override' + $result.Description | Should -Be 'Package description' + (Merge-NovaPackageSettingTable -BaseSettings $null -OverrideSettings $null).Count | Should -Be 0 + } + } + + It 'Get-NovaConfiguredPackageTypeList uses configured values and defaults to NuGet when none are set' { + InModuleScope $script:moduleName { + @(Get-NovaConfiguredPackageTypeList -PackageSettings @{Types = @('NuGet', '', $null, 'Zip')}) | Should -Be @('NuGet', 'Zip') + @(Get-NovaConfiguredPackageTypeList -PackageSettings ([pscustomobject]@{Types = @('Zip')})) | Should -Be @('Zip') + @(Get-NovaConfiguredPackageTypeList -PackageSettings ([pscustomobject]@{Types = @('', $null)})) | Should -Be @('NuGet') + } + } + + It 'Test-NovaPackageLatestEnabled reads dictionary and object latest flags and defaults to false otherwise' { + InModuleScope $script:moduleName { + Test-NovaPackageLatestEnabled -PackageSettings @{Latest = $true} | Should -BeTrue + Test-NovaPackageLatestEnabled -PackageSettings @{Types = @('NuGet')} | Should -BeFalse + Test-NovaPackageLatestEnabled -PackageSettings ([pscustomobject]@{Latest = $true}) | Should -BeTrue + Test-NovaPackageLatestEnabled -PackageSettings ([pscustomobject]@{Types = @('Zip')}) | Should -BeFalse + Test-NovaPackageLatestEnabled -PackageSettings $null | Should -BeFalse + } + } + + It 'Get-NovaPackageMetadataList returns one entry per package type and optional latest variants' { + InModuleScope $script:moduleName { + Mock Get-NovaConfiguredPackageTypeList {@('NuGet', 'Zip')} + Mock Test-NovaPackageLatestEnabled {$true} + Mock Get-NovaPackageMetadata {"$( $PackageType )-latest:$( [bool]$Latest )"} + + $result = @(Get-NovaPackageMetadataList -ProjectInfo ([pscustomobject]@{Package = @{}})) + + $result | Should -Be @('NuGet-latest:False', 'NuGet-latest:True', 'Zip-latest:False', 'Zip-latest:True') + Assert-MockCalled Get-NovaPackageMetadata -Times 4 + } + } + + It 'Get-NovaPackageAuthorList normalizes string and enumerable author values' { + InModuleScope $script:moduleName { + @(Get-NovaPackageAuthorList -AuthorValue $null) | Should -Be @() + @(Get-NovaPackageAuthorList -AuthorValue ' Nova Author ') | Should -Be @('Nova Author') + @(Get-NovaPackageAuthorList -AuthorValue @(' Author A ', 'Author B', 'Author A', ' ')) | Should -Be @('Author A', 'Author B') + } + } + + It 'Get-NovaPackageAuthorList rejects unsupported author value types' { + InModuleScope $script:moduleName { + $thrown = $null + try { + Get-NovaPackageAuthorList -AuthorValue 42 + } + catch { + $thrown = $_ + } + + $thrown | Should -Not -BeNullOrEmpty + $thrown.Exception.Message | Should -Be 'Package.Authors must be a string or an array of strings.' + $thrown.FullyQualifiedErrorId | Should -Be 'Nova.Configuration.PackageAuthorsInvalidType' + $thrown.CategoryInfo.Category | Should -Be ([System.Management.Automation.ErrorCategory]::InvalidData) + $thrown.TargetObject | Should -Be 42 + } + } + + It 'Get-NovaPackageMetadata resolves explicit package types, trims fields, and uses a zip content root for zip packages' { + InModuleScope $script:moduleName { + $projectInfo = [pscustomobject]@{ + ProjectName = 'NovaModuleTools' + Version = ' 1.2.3 ' + Manifest = [pscustomobject]@{} + Package = [pscustomobject]@{ + Id = ' Nova.Package ' + Authors = @(' Author A ', 'Author B') + Description = ' Package description ' + OutputDirectory = [pscustomobject]@{Clean = $true} + Types = @('zip') + } + } + Mock ConvertTo-NovaPackageType {'Zip'} + Mock Get-NovaPackageAuthorList {@('Author A', 'Author B')} + Mock Get-NovaManifestValue { + switch ($Name) { + 'Tags' { + @('tools', '', 'module') + } + 'ProjectUri' { + ' https://example.test/project ' + } + 'ReleaseNotes' { + ' https://example.test/release-notes ' + } + 'LicenseUri' { + ' https://example.test/license ' + } + default { + $null + } + } + } + Mock Get-NovaPackageFileName {'Nova.Package.latest.zip'} + Mock Get-NovaPackageOutputDirectory {'/tmp/packages'} + + $result = Get-NovaPackageMetadata -ProjectInfo $projectInfo -PackageType 'zip' -Latest + + $result.Type | Should -Be 'Zip' + $result.Latest | Should -BeTrue + $result.Id | Should -Be 'Nova.Package' + $result.Version | Should -Be '1.2.3' + $result.Authors | Should -Be @('Author A', 'Author B') + $result.Description | Should -Be 'Package description' + $result.Tags | Should -Be @('tools', 'module') + $result.ProjectUrl | Should -Be 'https://example.test/project' + $result.ReleaseNotes | Should -Be 'https://example.test/release-notes' + $result.LicenseUrl | Should -Be 'https://example.test/license' + $result.PackagePath | Should -Be ([System.IO.Path]::Join('/tmp/packages', 'Nova.Package.latest.zip')) + $result.ContentRoot | Should -Be 'NovaModuleTools' + } + } + + It 'Get-NovaPackageMetadata defaults to NuGet and content packages when no package type is configured' { + InModuleScope $script:moduleName { + $projectInfo = [pscustomobject]@{ + ProjectName = 'NovaModuleTools' + Version = '1.2.3' + Manifest = [pscustomobject]@{} + Package = [pscustomobject]@{ + Id = 'Nova.Package' + Authors = 'Author A' + Description = 'Package description' + OutputDirectory = [pscustomobject]@{Clean = $false} + Types = @('', $null) + } + } + Mock ConvertTo-NovaPackageType {throw 'ConvertTo-NovaPackageType should not be called when the default NuGet type is used.'} + Mock Get-NovaPackageAuthorList {@('Author A')} + Mock Get-NovaManifestValue { + if ($Name -eq 'Tags') { + return @() + } + + return '' + } + Mock Get-NovaPackageFileName {'Nova.Package.nupkg'} + Mock Get-NovaPackageOutputDirectory {'/tmp/packages'} + + $result = Get-NovaPackageMetadata -ProjectInfo $projectInfo + + $result.Type | Should -Be 'NuGet' + $result.ContentRoot | Should -Be 'content/NovaModuleTools' + $result.CleanOutputDirectory | Should -BeFalse + } + } + + It 'Assert-NovaPackageMetadata accepts complete metadata and rejects missing required fields and authors' { + InModuleScope $script:moduleName { + { + Assert-NovaPackageMetadata -PackageMetadata ([pscustomobject]@{ + Type = 'NuGet' + Id = 'Nova.Package' + Version = '1.2.3' + Description = 'Package description' + OutputDirectory = '/tmp/packages' + PackageFileName = 'Nova.Package.nupkg' + PackagePath = '/tmp/packages/Nova.Package.nupkg' + Authors = @('Author A') + }) + } | Should -Not -Throw + + $missingField = $null + try { + Assert-NovaPackageMetadata -PackageMetadata ([pscustomobject]@{ + Type = '' + Id = 'Nova.Package' + Version = '1.2.3' + Description = 'Package description' + OutputDirectory = '/tmp/packages' + PackageFileName = 'Nova.Package.nupkg' + PackagePath = '/tmp/packages/Nova.Package.nupkg' + Authors = @('Author A') + }) + } + catch { + $missingField = $_ + } + + $missingField.FullyQualifiedErrorId | Should -Be 'Nova.Configuration.PackageMetadataValueMissing' + $missingField.TargetObject | Should -Be 'Type' + + $missingAuthors = $null + try { + Assert-NovaPackageMetadata -PackageMetadata ([pscustomobject]@{ + Type = 'NuGet' + Id = 'Nova.Package' + Version = '1.2.3' + Description = 'Package description' + OutputDirectory = '/tmp/packages' + PackageFileName = 'Nova.Package.nupkg' + PackagePath = '/tmp/packages/Nova.Package.nupkg' + Authors = @() + }) + } + catch { + $missingAuthors = $_ + } + + $missingAuthors.FullyQualifiedErrorId | Should -Be 'Nova.Configuration.PackageMetadataValueMissing' + $missingAuthors.TargetObject | Should -Be 'Authors' + } + } + + It 'Get-NovaPackageArtifactPatternInfo uses the configured pattern or defaults to the package id wildcard' { + InModuleScope $script:moduleName { + $defaultPattern = Get-NovaPackageArtifactPatternInfo -ProjectInfo ([pscustomobject]@{Package = [pscustomobject]@{Id = 'Nova.Package'; FileNamePattern = ' '}}) + + $defaultPattern.Pattern | Should -Be 'Nova.Package*' + $defaultPattern.ExplicitPackageType | Should -BeNullOrEmpty + + Mock ConvertTo-NovaPackageType {'Zip'} + + $zipPattern = Get-NovaPackageArtifactPatternInfo -ProjectInfo ([pscustomobject]@{Package = [pscustomobject]@{Id = 'Nova.Package'; FileNamePattern = 'artifacts/*.zip'}}) + + $zipPattern.Pattern | Should -Be 'artifacts/*.zip' + $zipPattern.ExplicitPackageType | Should -Be 'Zip' + } + } + + It 'Get-NovaPackageArtifactType resolves supported extensions and rejects unsupported upload file names' { + InModuleScope $script:moduleName { + Get-NovaPackageArtifactType -PackagePath '/tmp/Nova.Package.nupkg' | Should -Be 'NuGet' + Get-NovaPackageArtifactType -PackagePath '/tmp/Nova.Package.zip' | Should -Be 'Zip' + + foreach ($packagePath in @('/tmp/Nova.Package', '/tmp/Nova.Package.tar.gz')) { + $thrown = $null + try { + Get-NovaPackageArtifactType -PackagePath $packagePath + } + catch { + $thrown = $_ + } + + $thrown.FullyQualifiedErrorId | Should -Be 'Nova.Validation.UnsupportedPackageUploadFileType' + $thrown.TargetObject | Should -Be $packagePath + } + } + } + + It 'Get-NovaPackageOutputDirectory returns rooted paths unchanged and resolves relative paths from the project root' { + InModuleScope $script:moduleName { + $relativeProject = [pscustomobject]@{ProjectRoot = '/tmp/project'; Package = [pscustomobject]@{OutputDirectory = [pscustomobject]@{Path = 'artifacts/packages'}}} + $absoluteProject = [pscustomobject]@{ProjectRoot = '/tmp/project'; Package = [pscustomobject]@{OutputDirectory = '/tmp/packages'}} + + Get-NovaPackageOutputDirectory -ProjectInfo $relativeProject | Should -Be ([System.IO.Path]::Join('/tmp/project', 'artifacts/packages')) + Get-NovaPackageOutputDirectory -ProjectInfo $absoluteProject | Should -Be '/tmp/packages' + } + } + + It 'Get-NovaPackageBaseFileName and Get-NovaPackageFileName respect version suffix and latest naming rules' { + InModuleScope $script:moduleName { + $projectInfo = [pscustomobject]@{ + Version = '1.2.3' + Package = [pscustomobject]@{ + PackageFileName = ' Custom.Package.zip ' + AddVersionToFileName = $true + } + } + + Get-NovaPackageBaseFileName -ProjectInfo ([pscustomobject]@{Version = '1.2.3'; Package = [pscustomobject]@{PackageFileName = ''; AddVersionToFileName = $false}}) -PackageId 'Nova.Package' | Should -Be 'Nova.Package.1.2.3' + Get-NovaPackageBaseFileName -ProjectInfo $projectInfo -PackageId 'Nova.Package' | Should -Be 'Custom.Package.1.2.3' + Add-NovaPackageVersionSuffix -PackageFileName 'Custom.Package.1.2.3' -Version '1.2.3' | Should -Be 'Custom.Package.1.2.3' + ConvertTo-NovaLatestPackageFileName -PackageFileName 'Custom.Package.1.2.3' -Version '1.2.3' | Should -Be 'Custom.Package.latest' + ConvertTo-NovaLatestPackageFileName -PackageFileName 'Custom.Package' -Version '1.2.3' | Should -Be 'Custom.Package.latest' + ConvertTo-NovaLatestPackageFileName -PackageFileName 'Custom.Package.latest' -Version '1.2.3' | Should -Be 'Custom.Package.latest' + Get-NovaPackageFileName -ProjectInfo $projectInfo -PackageId 'Nova.Package' -PackageType 'zip' -Latest | Should -Be 'Custom.Package.latest.zip' + } + } + + It 'Get-NovaPackageUploadStatusCode returns integer status codes and nothing for null or missing responses' { + InModuleScope $script:moduleName { + Get-NovaPackageUploadStatusCode -Response $null | Should -BeNullOrEmpty + Get-NovaPackageUploadStatusCode -Response ([pscustomobject]@{StatusCode = '201'}) | Should -Be 201 + Get-NovaPackageUploadStatusCode -Response ([pscustomobject]@{Body = 'ok'}) | Should -BeNullOrEmpty + } + } + + It 'Get-NovaPackageUploadAuthHeaderValue returns raw tokens for non-authorization headers or None schemes and defaults authorization to Bearer' { + InModuleScope $script:moduleName { + Get-NovaPackageUploadAuthHeaderValue -AuthSettings $null -HeaderName 'X-Api-Key' -Token 'secret-token' | Should -Be 'secret-token' + Get-NovaPackageUploadAuthHeaderValue -AuthSettings $null -HeaderName 'Authorization' -Token 'secret-token' | Should -Be 'Bearer secret-token' + Get-NovaPackageUploadAuthHeaderValue -AuthSettings ([pscustomobject]@{Scheme = 'None'}) -HeaderName 'Authorization' -Token 'secret-token' | Should -Be 'secret-token' + Get-NovaPackageUploadAuthHeaderValue -AuthSettings $null -AuthenticationScheme ' Basic ' -HeaderName 'Authorization' -Token 'secret-token' | Should -Be 'Basic secret-token' + } + } + + It 'Initialize-NovaPackageOutputDirectory validates non-empty metadata, clears when requested, and creates missing directories' { + InModuleScope $script:moduleName { + $thrown = $null + try { + Initialize-NovaPackageOutputDirectory -ProjectInfo ([pscustomobject]@{}) -PackageMetadataList @() + } + catch { + $thrown = $_ + } + + $thrown.FullyQualifiedErrorId | Should -Be 'Nova.Validation.PackageMetadataListEmpty' + $thrown.TargetObject | Should -Be 'PackageMetadataList' + + $metadata = [pscustomobject]@{OutputDirectory = '/tmp/packages'; CleanOutputDirectory = $true} + Mock Clear-NovaPackageOutputDirectory {} + Mock Test-Path {$false} -ParameterFilter {$LiteralPath -eq '/tmp/packages'} + Mock New-Item {[pscustomobject]@{FullName = '/tmp/packages'}} -ParameterFilter {$ItemType -eq 'Directory' -and $Path -eq '/tmp/packages' -and $Force} + + Initialize-NovaPackageOutputDirectory -ProjectInfo ([pscustomobject]@{ProjectRoot = '/tmp/project'}) -PackageMetadataList @($metadata) + + Assert-MockCalled Clear-NovaPackageOutputDirectory -Times 1 -ParameterFilter {$OutputDirectory -eq '/tmp/packages'} + Assert-MockCalled New-Item -Times 1 -ParameterFilter {$ItemType -eq 'Directory' -and $Path -eq '/tmp/packages' -and $Force} + } + } + + It 'Join-NovaPackageUploadUrl trims separators and escapes package file names' { + InModuleScope $script:moduleName { + Join-NovaPackageUploadUrl -Url 'https://example.test/api/' -UploadPath ' uploads /packages/ ' -PackageFileName 'Nova Package 1.2.3.nupkg' | Should -Be 'https://example.test/api/uploads /packages//Nova%20Package%201.2.3.nupkg' + Join-NovaPackageUploadUrl -Url 'https://example.test/api' -PackageFileName 'Nova.Package.zip' | Should -Be 'https://example.test/api/Nova.Package.zip' + } + } + + It 'Resolve-NovaPackageUploadTypeList uses requested types, explicit artifact types, or metadata types depending on the inputs' { + InModuleScope $script:moduleName { + Mock Get-NovaPackageArtifactPatternInfo {[pscustomobject]@{Pattern = 'artifacts/*'; ExplicitPackageType = $null}} + Mock ConvertTo-NovaPackageType { + switch ($Type) { + '.zip' { + 'Zip' + } + '.nupkg' { + 'NuGet' + } + 'zip' { + 'Zip' + } + 'nupkg' { + 'NuGet' + } + default { + throw "Unsupported: $Type" + } + } + } + Mock Get-NovaPackageMetadataList {@([pscustomobject]@{Type = 'NuGet'}, [pscustomobject]@{Type = 'Zip'}, [pscustomobject]@{Type = 'NuGet'})} + + @(Resolve-NovaPackageUploadTypeList -ProjectInfo ([pscustomobject]@{}) -PackageType @('zip', 'ZIP', 'nupkg')) | Should -Be @('Zip', 'NuGet') + + Mock Get-NovaPackageArtifactPatternInfo {[pscustomobject]@{Pattern = 'artifacts/*.zip'; ExplicitPackageType = 'Zip'}} + @(Resolve-NovaPackageUploadTypeList -ProjectInfo ([pscustomobject]@{}) -PackageType @('zip', 'nupkg')) | Should -Be @('Zip') + + Mock Get-NovaPackageArtifactPatternInfo {[pscustomobject]@{Pattern = 'artifacts/*'; ExplicitPackageType = $null}} + @(Resolve-NovaPackageUploadTypeList -ProjectInfo ([pscustomobject]@{})) | Should -Be @('NuGet', 'Zip') + } + } + + It 'Resolve-NovaPackageUploadTypeList exposes a structured conflict when requested types disagree with an explicit artifact pattern' { + InModuleScope $script:moduleName { + Mock Get-NovaPackageArtifactPatternInfo {[pscustomobject]@{Pattern = 'artifacts/*.zip'; ExplicitPackageType = 'Zip'}} + Mock ConvertTo-NovaPackageType {'NuGet'} + + $thrown = $null + try { + Resolve-NovaPackageUploadTypeList -ProjectInfo ([pscustomobject]@{}) -PackageType @('nupkg') + } + catch { + $thrown = $_ + } + + $thrown.FullyQualifiedErrorId | Should -Be 'Nova.Validation.PackageUploadPatternConflict' + $thrown.TargetObject | Should -Be 'artifacts/*.zip' + } + } + + It 'Test-NovaPathContainsPath returns true for identical or nested paths and false for siblings' { + InModuleScope $script:moduleName { + Test-NovaPathContainsPath -ParentPath '/tmp/project' -ChildPath '/tmp/project' | Should -BeTrue + Test-NovaPathContainsPath -ParentPath '/tmp/project' -ChildPath '/tmp/project/dist/module' | Should -BeTrue + Test-NovaPathContainsPath -ParentPath '/tmp/project' -ChildPath '/tmp/another' | Should -BeFalse + } + } + It 'Get-AliasInFunctionFromFile returns aliases declared on the function' { $filePath = Join-Path $script:repoRoot 'src/public/UpdateNovaModuleTools.ps1' diff --git a/tests/UpdateNotification.Tests.ps1 b/tests/UpdateNotification.Tests.ps1 index 0e5eb0a2..bbf50359 100644 --- a/tests/UpdateNotification.Tests.ps1 +++ b/tests/UpdateNotification.Tests.ps1 @@ -5,6 +5,10 @@ $global:updateNotificationTestSupportFunctionNameList = @( 'Invoke-TestNotificationPreferenceToggle' 'Assert-TestNotificationPreferenceToggleResult' 'Invoke-TestNovaSelfUpdate' + 'New-TestPowerShellRunnerState' + 'New-TestPowerShellWaitHandle' + 'Add-TestPowerShellRunnerMethods' + 'New-TestPowerShellRunner' ) . $script:updateNotificationTestSupportPath @@ -38,6 +42,7 @@ BeforeAll { Import-Module $script:distModuleDir -Force } + Describe 'Update notification behavior' { It 'Get-NovaUpdateNotificationPreferenceStatus shapes the stored preference and settings path' { InModuleScope $script:moduleName { @@ -637,6 +642,100 @@ throw 'offline' } } + It 'Get-NovaPrereleaseModuleUpdateConfirmationPrompt returns the expected caption and message text' { + InModuleScope $script:moduleName { + $prompt = Get-NovaPrereleaseModuleUpdateConfirmationPrompt -CurrentVersion '1.2.3' -TargetVersion '1.3.0-preview1' + + $prompt.Caption | Should -Be 'Confirm prerelease NovaModuleTools update' + $prompt.Message | Should -Be @" +NovaModuleTools would update from 1.2.3 to prerelease 1.3.0-preview1. + +Prerelease updates may be less stable than released versions. +Continue with the prerelease update? +"@ + } + } + + It 'Confirm-NovaPrereleaseModuleUpdate delegates the generated prompt to ShouldContinue and returns the decision' { + InModuleScope $script:moduleName { + $calls = [System.Collections.Generic.List[object]]::new() + $cmdlet = [pscustomobject]@{ + Calls = $calls + ShouldContinueResult = $false + } + $cmdlet | Add-Member -MemberType ScriptMethod -Name ShouldContinue -Value { + param($Message, $Caption) + + $this.Calls.Add([pscustomobject]@{ + Message = $Message + Caption = $Caption + }) | Out-Null + return $this.ShouldContinueResult + } + + $result = Confirm-NovaPrereleaseModuleUpdate -Cmdlet $cmdlet -CurrentVersion '1.2.3' -TargetVersion '2.0.0-preview2' + + $result | Should -BeFalse + $calls.Count | Should -Be 1 + $calls[0].Caption | Should -Be 'Confirm prerelease NovaModuleTools update' + $calls[0].Message | Should -Match '1.2.3' + $calls[0].Message | Should -Match '2.0.0-preview2' + } + } + + It 'Invoke-NovaPowerShellScriptWithTimeout returns the first pipeline result and forwards arguments when the script completes' { + $runner = New-TestPowerShellRunner -ShouldComplete:$true -EndInvokeResult @('first result', 'second result') + + InModuleScope $script:moduleName -Parameters @{Runner = $runner} { + param($Runner) + + $result = Invoke-NovaPowerShellScriptWithTimeout -Script 'param($name, $flag)' -ArgumentList @('NovaModuleTools', $true) -TimeoutMilliseconds 321 -PowerShellFactory {$runner} + + $result | Should -Be 'first result' + $Runner.State.Script | Should -Be 'param($name, $flag)' + @($Runner.State.Arguments) | Should -Be @('NovaModuleTools', $true) + $Runner.State.LastTimeoutMilliseconds | Should -Be 321 + $Runner.State.EndInvokeCalls | Should -Be 1 + $Runner.State.StopCalls | Should -Be 0 + $Runner.State.DisposeCalls | Should -Be 1 + } + } + + It 'Invoke-NovaPowerShellScriptWithTimeout returns nothing and stops the pipeline when the timeout is exceeded' { + $runner = New-TestPowerShellRunner -ShouldComplete:$false + + InModuleScope $script:moduleName -Parameters @{Runner = $runner} { + param($Runner) + + $result = Invoke-NovaPowerShellScriptWithTimeout -Script 'Start-Sleep -Seconds 30' -TimeoutMilliseconds 25 -PowerShellFactory {$Runner} + + $result | Should -BeNullOrEmpty + $Runner.State.LastTimeoutMilliseconds | Should -Be 25 + $Runner.State.StopCalls | Should -Be 1 + $Runner.State.EndInvokeCalls | Should -Be 0 + $Runner.State.DisposeCalls | Should -Be 1 + } + } + + It 'Invoke-NovaPowerShellScriptWithTimeout swallows stop and EndInvoke failures and still disposes the pipeline' { + $stopFailureRunner = New-TestPowerShellRunner -ShouldComplete:$false -ThrowOnStop + $endFailureRunner = New-TestPowerShellRunner -ShouldComplete:$true -ThrowOnEndInvoke + + InModuleScope $script:moduleName -Parameters @{StopFailureRunner = $stopFailureRunner; EndFailureRunner = $endFailureRunner} { + param($StopFailureRunner, $EndFailureRunner) + + $timedOutResult = Invoke-NovaPowerShellScriptWithTimeout -Script 'Start-Sleep -Seconds 30' -TimeoutMilliseconds 25 -PowerShellFactory {$StopFailureRunner} + $endFailureResult = Invoke-NovaPowerShellScriptWithTimeout -Script 'throw' -PowerShellFactory {$EndFailureRunner} + + $timedOutResult | Should -BeNullOrEmpty + $endFailureResult | Should -BeNullOrEmpty + $StopFailureRunner.State.StopCalls | Should -Be 1 + $StopFailureRunner.State.DisposeCalls | Should -Be 1 + $EndFailureRunner.State.EndInvokeCalls | Should -Be 1 + $EndFailureRunner.State.DisposeCalls | Should -Be 1 + } + } + It 'Invoke-NovaBuildUpdateNotification warns about a newer stable release even when prerelease notifications are disabled' { $result = Invoke-TestBuildUpdateNotification -PrereleaseNotificationsEnabled:$false -LookupResult ([pscustomobject]@{ Stable = [pscustomobject]@{Version = '1.1.0'} From 3cb8f9dece26f0324dce24f92666b7838f9cba1a Mon Sep 17 00:00:00 2001 From: Stiwi Gabriel Courage Date: Tue, 28 Apr 2026 15:43:51 +0200 Subject: [PATCH 2/4] feat(#133): enhance test coverage for NovaModuleTools - Add tests for CodeScene Cobertura remapping helpers - Implement coverage gap tests for quality helpers - Validate Nova package output directory initialization - Improve timeout handling in PowerShell script execution --- tests/UpdateNotification.TestSupport.ps1 | 102 +++++++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/tests/UpdateNotification.TestSupport.ps1 b/tests/UpdateNotification.TestSupport.ps1 index f2d1c7f3..d0c00ba1 100644 --- a/tests/UpdateNotification.TestSupport.ps1 +++ b/tests/UpdateNotification.TestSupport.ps1 @@ -180,3 +180,105 @@ function Invoke-TestNovaSelfUpdate { } } } + +function New-TestPowerShellRunnerState { + [CmdletBinding()] + param() + + return [pscustomobject]@{ + Script = $null + Arguments = [System.Collections.Generic.List[object]]::new() + LastTimeoutMilliseconds = $null + StopCalls = 0 + EndInvokeCalls = 0 + DisposeCalls = 0 + } +} + +function New-TestPowerShellWaitHandle { + [CmdletBinding()] + param( + [Parameter(Mandatory)][object]$State, + [Parameter(Mandatory)][bool]$ShouldComplete + ) + + $waitHandle = [pscustomobject]@{ + ShouldComplete = $ShouldComplete + State = $State + } + + $waitHandle | Add-Member -MemberType ScriptMethod -Name WaitOne -Value { + param($TimeoutMilliseconds) + + $this.State.LastTimeoutMilliseconds = $TimeoutMilliseconds + return $this.ShouldComplete + } + + return $waitHandle +} + +function Add-TestPowerShellRunnerMethods { + [CmdletBinding()] + param( + [Parameter(Mandatory)][object]$Runner + ) + + $runner | Add-Member -MemberType ScriptMethod -Name AddScript -Value { + param($ScriptText) + + $this.State.Script = $ScriptText + return $this + } + $runner | Add-Member -MemberType ScriptMethod -Name AddArgument -Value { + param($Argument) + + $this.State.Arguments.Add($Argument) | Out-Null + return $this + } + $runner | Add-Member -MemberType ScriptMethod -Name BeginInvoke -Value { + return $this.AsyncResult + } + $runner | Add-Member -MemberType ScriptMethod -Name Stop -Value { + $this.State.StopCalls++ + if ($this.ThrowOnStop) { + throw 'stop failed' + } + } + $runner | Add-Member -MemberType ScriptMethod -Name EndInvoke -Value { + param($InvocationResult) + + $this.State.EndInvokeCalls++ + if ($this.ThrowOnEndInvoke) { + throw 'end failed' + } + + return $this.EndInvokeResult + } + $runner | Add-Member -MemberType ScriptMethod -Name Dispose -Value { + $this.State.DisposeCalls++ + } + + return $Runner +} + +function New-TestPowerShellRunner { + [CmdletBinding()] + param( + [bool]$ShouldComplete, + [object]$EndInvokeResult = $null, + [switch]$ThrowOnStop, + [switch]$ThrowOnEndInvoke + ) + + $state = New-TestPowerShellRunnerState + $waitHandle = New-TestPowerShellWaitHandle -State $state -ShouldComplete $ShouldComplete + $runner = [pscustomobject]@{ + State = $state + AsyncResult = [pscustomobject]@{AsyncWaitHandle = $waitHandle} + EndInvokeResult = $EndInvokeResult + ThrowOnStop = $ThrowOnStop.IsPresent + ThrowOnEndInvoke = $ThrowOnEndInvoke.IsPresent + } + + return Add-TestPowerShellRunnerMethods -Runner $runner +} From 2d98dc6e31542f543426e2aaa3e265a819d8c729 Mon Sep 17 00:00:00 2001 From: Stiwi Gabriel Courage Date: Tue, 28 Apr 2026 17:59:40 +0200 Subject: [PATCH 3/4] feat(#133): enhance test coverage and fix CLI help errors - Fix unsupported `nova` help invocations to return structured CLI validation errors - Align manifest/package helper edge cases with intended behavior - Add tests for CLI helper functions and project manifest resolution --- CHANGELOG.md | 6 + src/private/cli/GetNovaCliHelpRequest.ps1 | 4 +- .../package/NewNovaPackageArtifacts.ps1 | 2 +- ...GetNovaResolvedProjectManifestSettings.ps1 | 2 +- tests/CliHelperCoverage.Tests.ps1 | 130 ++++++++++++++++++ tests/CoverageGaps.ReleaseInternals.Tests.ps1 | 22 +++ tests/CoverageGaps.Tests.ps1 | 22 +++ tests/RemainingHelperCoverage.Tests.ps1 | 92 ++++++++++++- 8 files changed, 275 insertions(+), 5 deletions(-) create mode 100644 tests/CliHelperCoverage.Tests.ps1 diff --git a/CHANGELOG.md b/CHANGELOG.md index ae552d14..cfc368b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fix unsupported `nova` help invocations so they now return Nova's structured CLI validation error instead of a + PowerShell parameter-binding failure. +- Keep manifest/package helper edge cases aligned with their intended behavior. + - Manifest settings resolution now accepts ordered dictionary metadata shapes in addition to plain hashtables. + - `New-NovaPackageArtifacts` now accepts an empty metadata list and returns an empty artifact result instead of + failing during parameter binding. - Centralize delivery configuration resolution so raw package upload, update notification settings, and PSGallery publishing now follow one explicit precedence model without surfacing configured secrets in error text. - Raw upload now resolves command overrides before named repository settings, then package defaults. diff --git a/src/private/cli/GetNovaCliHelpRequest.ps1 b/src/private/cli/GetNovaCliHelpRequest.ps1 index 6e05899d..eef9a9cc 100644 --- a/src/private/cli/GetNovaCliHelpRequest.ps1 +++ b/src/private/cli/GetNovaCliHelpRequest.ps1 @@ -44,7 +44,7 @@ function Get-NovaCliRootHelpRequest { return Get-NovaCliResolvedHelpRequest -Command $Arguments[0] -View Long -TargetType Command } - Assert-NovaCliHelpUsageSupported -Tokens @('--help') + $Arguments + Assert-NovaCliHelpUsageSupported -Tokens (@('--help') + $Arguments) } function Get-NovaCliSubcommandHelpRequest { @@ -63,7 +63,7 @@ function Get-NovaCliSubcommandHelpRequest { } if (@($Arguments | Where-Object {Test-NovaCliHelpToken -Argument $_}).Count -gt 0) { - Assert-NovaCliHelpUsageSupported -Tokens @($Command) + $Arguments + Assert-NovaCliHelpUsageSupported -Tokens (@($Command) + $Arguments) } return $null diff --git a/src/private/package/NewNovaPackageArtifacts.ps1 b/src/private/package/NewNovaPackageArtifacts.ps1 index d3146916..6a84824f 100644 --- a/src/private/package/NewNovaPackageArtifacts.ps1 +++ b/src/private/package/NewNovaPackageArtifacts.ps1 @@ -4,7 +4,7 @@ function New-NovaPackageArtifacts { [CmdletBinding()] param( [Parameter(Mandatory)][pscustomobject]$ProjectInfo, - [Parameter(Mandatory)][object[]]$PackageMetadataList + [Parameter(Mandatory)][AllowEmptyCollection()][object[]]$PackageMetadataList ) $resolvedPackageMetadataList = @($PackageMetadataList) diff --git a/src/private/shared/GetNovaResolvedProjectManifestSettings.ps1 b/src/private/shared/GetNovaResolvedProjectManifestSettings.ps1 index 6b2ce54f..397af272 100644 --- a/src/private/shared/GetNovaResolvedProjectManifestSettings.ps1 +++ b/src/private/shared/GetNovaResolvedProjectManifestSettings.ps1 @@ -5,7 +5,7 @@ function Get-NovaResolvedProjectManifestSettings { [Parameter(Mandatory)][hashtable]$ProjectData ) - if ($ProjectData.ContainsKey('Manifest') -and $ProjectData['Manifest'] -is [hashtable]) { + if ($ProjectData.ContainsKey('Manifest') -and $ProjectData['Manifest'] -is [System.Collections.IDictionary]) { return [ordered]@{} + $ProjectData['Manifest'] } diff --git a/tests/CliHelperCoverage.Tests.ps1 b/tests/CliHelperCoverage.Tests.ps1 new file mode 100644 index 00000000..2a380147 --- /dev/null +++ b/tests/CliHelperCoverage.Tests.ps1 @@ -0,0 +1,130 @@ +$script:coverageGapsCliTestSupportPath = (Resolve-Path -LiteralPath (Join-Path $PSScriptRoot 'CoverageGaps.Cli.TestSupport.ps1')).Path +$global:cliHelperCoverageSupportFunctionNameList = @( + 'Assert-TestStructuredCliError' +) +. $script:coverageGapsCliTestSupportPath + +foreach ($functionName in $global:cliHelperCoverageSupportFunctionNameList) { + $scriptBlock = (Get-Command -Name $functionName -CommandType Function -ErrorAction Stop).ScriptBlock + Set-Item -Path "function:global:$functionName" -Value $scriptBlock +} + +BeforeAll { + $here = Split-Path -Parent $PSCommandPath + $script:repoRoot = Split-Path -Parent $here + $script:moduleName = (Get-Content -LiteralPath (Join-Path $script:repoRoot 'project.json') -Raw | ConvertFrom-Json).ProjectName + $script:distModuleDir = Join-Path $script:repoRoot "dist/$script:moduleName" + $coverageGapsCliTestSupportPath = (Resolve-Path -LiteralPath (Join-Path $PSScriptRoot 'CoverageGaps.Cli.TestSupport.ps1')).Path + + if (-not (Test-Path -LiteralPath $script:distModuleDir)) { + throw "Expected built $script:moduleName module at: $script:distModuleDir. Run Invoke-NovaBuild in the repo root first." + } + + . $coverageGapsCliTestSupportPath + foreach ($functionName in $global:cliHelperCoverageSupportFunctionNameList) { + $scriptBlock = (Get-Command -Name $functionName -CommandType Function -ErrorAction Stop).ScriptBlock + Set-Item -Path "function:global:$functionName" -Value $scriptBlock + } + + Remove-Module $script:moduleName -ErrorAction SilentlyContinue + Import-Module $script:distModuleDir -Force +} + +Describe 'Targeted coverage for smaller CLI helper internals' { + It 'CLI help helpers expose the usage text, unsupported usage errors, empty examples, and direct option accumulation' { + InModuleScope $script:moduleName { + Get-NovaCliHelpUsageText | Should -Be "Use 'nova --help', 'nova -h', 'nova --help ', 'nova -h ', or 'nova --help'/'nova -h'." + Get-NovaCliExampleText -Examples @() | Should -Be ' (none)' + + $options = @{} + Add-NovaCliOptionValue -Options $options -Name 'path' -Value '/tmp/one' + Add-NovaCliOptionValue -Options $options -Name 'path' -Value '/tmp/two' + + $options.path | Should -Be @('/tmp/one', '/tmp/two') + + $directHelpUsageError = $null + try { + Assert-NovaCliHelpUsageSupported -Tokens @('--help', 'build') + } + catch { + $directHelpUsageError = $_ + } + + Assert-TestStructuredCliError -ThrownError $directHelpUsageError -ExpectedError ([pscustomobject]@{ + Message = "Unsupported help usage. Use 'nova --help', 'nova -h', 'nova --help ', 'nova -h ', or 'nova --help'/'nova -h'." + ErrorId = 'Nova.Validation.UnsupportedCliHelpUsage' + Category = [System.Management.Automation.ErrorCategory]::InvalidArgument + TargetObject = '--help build' + }) + + $rootHelpUsageError = $null + try { + Get-NovaCliHelpRequest -Command '--help' -Arguments @('--help') + } + catch { + $rootHelpUsageError = $_ + } + + Assert-TestStructuredCliError -ThrownError $rootHelpUsageError -ExpectedError ([pscustomobject]@{ + Message = "Unsupported help usage. Use 'nova --help', 'nova -h', 'nova --help ', 'nova -h ', or 'nova --help'/'nova -h'." + ErrorId = 'Nova.Validation.UnsupportedCliHelpUsage' + Category = [System.Management.Automation.ErrorCategory]::InvalidArgument + TargetObject = '--help --help' + }) + + $subcommandHelpUsageError = $null + try { + Get-NovaCliHelpRequest -Command 'build' -Arguments @('--help', 'extra') + } + catch { + $subcommandHelpUsageError = $_ + } + + Assert-TestStructuredCliError -ThrownError $subcommandHelpUsageError -ExpectedError ([pscustomobject]@{ + Message = "Unsupported help usage. Use 'nova --help', 'nova -h', 'nova --help ', 'nova -h ', or 'nova --help'/'nova -h'." + ErrorId = 'Nova.Validation.UnsupportedCliHelpUsage' + Category = [System.Management.Automation.ErrorCategory]::InvalidArgument + TargetObject = 'build --help extra' + }) + } + } + + It 'Get-NovaCliForwardingParameterSet includes verbose and should-process options directly when requested' { + InModuleScope $script:moduleName { + $previousWhatIfPreference = $WhatIfPreference + try { + $WhatIfPreference = $true + $result = Get-NovaCliForwardingParameterSet -BoundParameters @{Verbose = $true; Confirm = $false} -IncludeShouldProcess + + $result.Verbose | Should -BeTrue + $result.WhatIf | Should -BeTrue + $result.Confirm | Should -BeFalse + } + finally { + $WhatIfPreference = $previousWhatIfPreference + } + } + } + + It 'Get-NovaCliInstalledVersion returns the stable version when prerelease metadata is blank or missing' { + InModuleScope $script:moduleName { + $blankPrereleaseModule = [pscustomobject]@{ + Version = [version]'2.0.0' + PrivateData = [pscustomobject]@{ + PSData = [pscustomobject]@{ + Prerelease = ' ' + } + } + } + $missingPrereleaseModule = [pscustomobject]@{ + Version = [version]'2.0.1' + PrivateData = [pscustomobject]@{ + PSData = [pscustomobject]@{} + } + } + + Get-NovaCliInstalledVersion -Module $blankPrereleaseModule | Should -Be '2.0.0' + Get-NovaCliInstalledVersion -Module $missingPrereleaseModule | Should -Be '2.0.1' + } + } +} diff --git a/tests/CoverageGaps.ReleaseInternals.Tests.ps1 b/tests/CoverageGaps.ReleaseInternals.Tests.ps1 index fea8fd5d..d1a1aae7 100644 --- a/tests/CoverageGaps.ReleaseInternals.Tests.ps1 +++ b/tests/CoverageGaps.ReleaseInternals.Tests.ps1 @@ -436,6 +436,28 @@ Describe 'Coverage gaps for release and git internals' { } } + It 'Get-NovaInstalledProjectManifestPath resolves the default project info when ProjectInfo is omitted' { + InModuleScope $script:moduleName { + Mock Get-NovaProjectInfo { + [pscustomobject]@{ProjectName = 'AzureDevOpsAgentInstaller'; ProjectRoot = '/tmp/project'} + } + Mock Resolve-NovaLocalPublishPath {'/tmp/default-modules'} + Mock Get-NovaPublishedLocalManifestPath { + $PublishInvocation.IsLocal | Should -BeTrue + $PublishInvocation.Target | Should -Be '/tmp/default-modules' + $PublishInvocation.Parameters.ProjectInfo.ProjectName | Should -Be 'AzureDevOpsAgentInstaller' + return '/tmp/default-modules/AzureDevOpsAgentInstaller/AzureDevOpsAgentInstaller.psd1' + } + + $result = Get-NovaInstalledProjectManifestPath + + $result | Should -Be '/tmp/default-modules/AzureDevOpsAgentInstaller/AzureDevOpsAgentInstaller.psd1' + Assert-MockCalled Get-NovaProjectInfo -Times 1 + Assert-MockCalled Resolve-NovaLocalPublishPath -Times 1 + Assert-MockCalled Get-NovaPublishedLocalManifestPath -Times 1 + } + } + It 'Get-NovaResolvedPublishParameterMap copies publish parameters and lets workflow values override matching keys' { InModuleScope $script:moduleName { $publishInvocation = [pscustomobject]@{ diff --git a/tests/CoverageGaps.Tests.ps1 b/tests/CoverageGaps.Tests.ps1 index f2449154..93da070a 100644 --- a/tests/CoverageGaps.Tests.ps1 +++ b/tests/CoverageGaps.Tests.ps1 @@ -507,6 +507,28 @@ Describe 'Coverage gaps for scaffold internals' { } } + It 'Initialize-NovaModule defaults Path to the current location when Path is omitted' { + InModuleScope $script:moduleName { + Mock Get-Location {[pscustomobject]@{Path = '/tmp/default-scaffold-root'}} + Mock Get-NovaModuleInitializationWorkflowContext { + [pscustomobject]@{ + Target = '/tmp/default-scaffold-root/NovaDelegation' + Action = 'Create Nova module scaffold' + } + } + Mock Invoke-NovaModuleInitializationWorkflow {} + + Initialize-NovaModule -Confirm:$false + + Assert-MockCalled Get-NovaModuleInitializationWorkflowContext -Times 1 -ParameterFilter { + $Path -eq '/tmp/default-scaffold-root' -and -not $Example + } + Assert-MockCalled Invoke-NovaModuleInitializationWorkflow -Times 1 -ParameterFilter { + $WorkflowContext.Target -eq '/tmp/default-scaffold-root/NovaDelegation' + } + } + } + It 'Initialize-NovaModule -Example creates the packaged example scaffold without asking about Pester' { InModuleScope $script:moduleName { $answer = @{ diff --git a/tests/RemainingHelperCoverage.Tests.ps1 b/tests/RemainingHelperCoverage.Tests.ps1 index c6ffe80a..8fb08107 100644 --- a/tests/RemainingHelperCoverage.Tests.ps1 +++ b/tests/RemainingHelperCoverage.Tests.ps1 @@ -207,6 +207,72 @@ Describe 'Coverage for remaining manifest, JSON, and help-locale helpers' { } } + It 'Get-NovaModulePsDataValue returns null for null PSData and reads object properties when present' { + InModuleScope $script:moduleName { + $nullPsDataModule = [pscustomobject]@{ + PrivateData = [pscustomobject]@{PSData = $null} + } + $objectPsDataModule = [pscustomobject]@{ + PrivateData = [pscustomobject]@{ + PSData = [pscustomobject]@{ + Prerelease = 'preview' + } + } + } + + Get-NovaModulePsDataValue -Name 'Prerelease' -Module $nullPsDataModule | Should -BeNullOrEmpty + Get-NovaModulePsDataValue -Name 'Prerelease' -Module $objectPsDataModule | Should -Be 'preview' + Get-NovaModulePsDataValue -Name 'ReleaseNotes' -Module $objectPsDataModule | Should -BeNullOrEmpty + } + } + + It 'Get-NovaResolvedProjectManifestSettings returns a copy for manifest hashtables and an empty ordered table otherwise' { + InModuleScope $script:moduleName { + $projectDataWithManifest = @{ + Manifest = [ordered]@{ + Author = 'Nova Author' + Description = 'Manifest description' + } + } + $resolvedManifest = Get-NovaResolvedProjectManifestSettings -ProjectData $projectDataWithManifest + + $resolvedManifest['Author'] | Should -Be 'Nova Author' + $resolvedManifest['Description'] | Should -Be 'Manifest description' + $resolvedManifest.GetType().Name | Should -Be 'OrderedDictionary' + + $resolvedManifest['Author'] = 'Changed' + $projectDataWithManifest.Manifest.Author | Should -Be 'Nova Author' + + (Get-NovaResolvedProjectManifestSettings -ProjectData @{}).Count | Should -Be 0 + (Get-NovaResolvedProjectManifestSettings -ProjectData @{Manifest = 'invalid'}).Count | Should -Be 0 + } + } + + It 'Get-NovaProjectPackageOutputDirectorySettingsTable returns dictionary copies and wraps scalar paths' { + InModuleScope $script:moduleName { + $dictionarySettings = [ordered]@{ + OutputDirectory = [ordered]@{ + Path = 'artifacts/packages' + Clean = $true + } + } + $resolvedDictionarySettings = Get-NovaProjectPackageOutputDirectorySettingsTable -PackageSettings $dictionarySettings + + $resolvedDictionarySettings.Path | Should -Be 'artifacts/packages' + $resolvedDictionarySettings.Clean | Should -BeTrue + $resolvedDictionarySettings.GetType().Name | Should -Be 'OrderedDictionary' + + $resolvedDictionarySettings['Path'] = 'changed' + $dictionarySettings.OutputDirectory.Path | Should -Be 'artifacts/packages' + + $resolvedStringSettings = Get-NovaProjectPackageOutputDirectorySettingsTable -PackageSettings @{OutputDirectory = 'dist/packages'} + $resolvedStringSettings.Path | Should -Be 'dist/packages' + + $resolvedMissingSettings = Get-NovaProjectPackageOutputDirectorySettingsTable -PackageSettings @{} + $resolvedMissingSettings.Path | Should -BeNullOrEmpty + } + } + It 'Test-ProjectSchema validates the Build schema' { InModuleScope $script:moduleName { Mock Get-ResourceFilePath { @@ -385,11 +451,20 @@ Describe 'Coverage for remaining manifest, JSON, and help-locale helpers' { It 'Get-NovaPackageAuthorList normalizes string and enumerable author values' { InModuleScope $script:moduleName { @(Get-NovaPackageAuthorList -AuthorValue $null) | Should -Be @() + @(Get-NovaPackageAuthorList -AuthorValue ' ') | Should -Be @() @(Get-NovaPackageAuthorList -AuthorValue ' Nova Author ') | Should -Be @('Nova Author') @(Get-NovaPackageAuthorList -AuthorValue @(' Author A ', 'Author B', 'Author A', ' ')) | Should -Be @('Author A', 'Author B') } } + It 'Get-NovaManifestValue reads dictionaries, objects, and returns null for missing object properties' { + InModuleScope $script:moduleName { + Get-NovaManifestValue -Manifest @{Author = 'Dictionary Author'} -Name 'Author' | Should -Be 'Dictionary Author' + Get-NovaManifestValue -Manifest ([pscustomobject]@{Author = 'Object Author'}) -Name 'Author' | Should -Be 'Object Author' + Get-NovaManifestValue -Manifest ([pscustomobject]@{Author = 'Object Author'}) -Name 'Tags' | Should -BeNullOrEmpty + } + } + It 'Get-NovaPackageAuthorList rejects unsupported author value types' { InModuleScope $script:moduleName { $thrown = $null @@ -575,7 +650,7 @@ Describe 'Coverage for remaining manifest, JSON, and help-locale helpers' { Get-NovaPackageArtifactType -PackagePath '/tmp/Nova.Package.nupkg' | Should -Be 'NuGet' Get-NovaPackageArtifactType -PackagePath '/tmp/Nova.Package.zip' | Should -Be 'Zip' - foreach ($packagePath in @('/tmp/Nova.Package', '/tmp/Nova.Package.tar.gz')) { + foreach ($packagePath in @('/tmp/package', '/tmp/Nova.Package', '/tmp/Nova.Package.tar.gz')) { $thrown = $null try { Get-NovaPackageArtifactType -PackagePath $packagePath @@ -590,6 +665,21 @@ Describe 'Coverage for remaining manifest, JSON, and help-locale helpers' { } } + It 'New-NovaPackageArtifacts returns an empty list when no package metadata was requested' { + InModuleScope $script:moduleName { + Mock Assert-NovaPackageMetadata {} + Mock Initialize-NovaPackageOutputDirectory {} + Mock New-NovaPackageArtifact {} + + $result = @(New-NovaPackageArtifacts -ProjectInfo ([pscustomobject]@{ProjectName = 'NovaModuleTools'}) -PackageMetadataList @()) + + $result | Should -Be @() + Assert-MockCalled Assert-NovaPackageMetadata -Times 0 + Assert-MockCalled Initialize-NovaPackageOutputDirectory -Times 0 + Assert-MockCalled New-NovaPackageArtifact -Times 0 + } + } + It 'Get-NovaPackageOutputDirectory returns rooted paths unchanged and resolves relative paths from the project root' { InModuleScope $script:moduleName { $relativeProject = [pscustomobject]@{ProjectRoot = '/tmp/project'; Package = [pscustomobject]@{OutputDirectory = [pscustomobject]@{Path = 'artifacts/packages'}}} From 16767faf5b1cfb0878c00c4de01f45e1ad0740f0 Mon Sep 17 00:00:00 2001 From: Stiwi Gabriel Courage Date: Tue, 28 Apr 2026 18:26:09 +0200 Subject: [PATCH 4/4] feat(#133): improve test coverage and clean up unused code - Removed trailing whitespace from multiple files - Enhanced test coverage for various CLI helper functions --- .github/ISSUE_TEMPLATE/feature_request.yml | 1 - codecov.yml | 2 +- docs/NovaModuleTools/en-US/Deploy-NovaPackage.md | 1 - src/private/build/GetNovaBuildProjectInfo.ps1 | 1 - src/private/build/GetNovaBuildWorkflowContext.ps1 | 1 - src/private/build/InvokeNovaBuildWorkflow.ps1 | 1 - src/private/cli/AddNovaCliHeaderOption.ps1 | 1 - src/private/cli/AddNovaCliOptionValue.ps1 | 1 - src/private/cli/ConvertFromNovaBuildCliArgument.ps1 | 1 - src/private/cli/ConvertFromNovaBumpCliArgument.ps1 | 1 - src/private/cli/ConvertFromNovaCliArgument.ps1 | 1 - src/private/cli/ConvertFromNovaDeployCliArgument.ps1 | 2 -- src/private/cli/ConvertFromNovaTestCliArgument.ps1 | 1 - src/private/cli/FormatNovaCliCommandHelp.ps1 | 4 ---- src/private/cli/FormatNovaCliCommandResult.ps1 | 1 - src/private/cli/GetNovaCliCommandHelp.ps1 | 1 - src/private/cli/GetNovaCliCommandHelpDefinition.ps1 | 1 - src/private/cli/GetNovaCliHelpRequest.ps1 | 2 -- src/private/cli/GetNovaCliRequiredArgumentValue.ps1 | 1 - src/private/cli/InvokeNovaCliDeployCommand.ps1 | 2 -- src/private/cli/InvokeNovaCliInitCommand.ps1 | 1 - src/private/cli/InvokeNovaCliNotificationCommand.ps1 | 1 - src/private/package/AddNovaZipFileEntry.ps1 | 1 - src/private/package/AddNovaZipTextEntry.ps1 | 1 - src/private/package/AssertNovaPackageMetadata.ps1 | 1 - .../package/AssertNovaPackageOutputDirectoryCanBeCleared.ps1 | 1 - src/private/package/GetNovaManifestValue.ps1 | 1 - src/private/package/GetNovaPackageArtifactPatternInfo.ps1 | 1 - src/private/package/GetNovaPackageArtifactSearchPattern.ps1 | 1 - src/private/package/GetNovaPackageArtifactType.ps1 | 1 - src/private/package/GetNovaPackageAuthorList.ps1 | 1 - src/private/package/GetNovaPackageContentItemList.ps1 | 1 - src/private/package/GetNovaPackageFileName.ps1 | 1 - src/private/package/GetNovaPackageMetadata.ps1 | 1 - src/private/package/GetNovaPackageMetadataElement.ps1 | 1 - src/private/package/GetNovaPackageOutputDirectory.ps1 | 1 - src/private/package/GetNovaPackageRepository.ps1 | 1 - src/private/package/GetNovaPackageSettingValue.ps1 | 1 - src/private/package/GetNovaPackageTypeExtension.ps1 | 1 - src/private/package/GetNovaPackageUploadArtifact.ps1 | 1 - src/private/package/GetNovaPackageUploadAuthHeaderName.ps1 | 1 - src/private/package/GetNovaPackageUploadAuthHeaderValue.ps1 | 1 - src/private/package/GetNovaPackageUploadFileList.ps1 | 1 - src/private/package/GetNovaPackageUploadPath.ps1 | 1 - src/private/package/GetNovaPackageUploadStatusCode.ps1 | 1 - .../package/GetNovaPackageUploadTargetSettingBundle.ps1 | 1 - src/private/package/GetNovaPackageUploadTargetUrl.ps1 | 1 - src/private/package/GetNovaPackageUploadToken.ps1 | 1 - src/private/package/GetNovaPackageUploadWorkflowContext.ps1 | 1 - src/private/package/GetNovaPackageUploadWorkflowOperation.ps1 | 1 - src/private/package/GetNovaPackageUploadWorkflowTarget.ps1 | 1 - src/private/package/JoinNovaPackageUploadUrl.ps1 | 1 - src/private/package/NewNovaPackageContentTypesXml.ps1 | 1 - src/private/package/NewNovaPackageCorePropertiesXml.ps1 | 1 - src/private/package/NewNovaPackageNuspecXml.ps1 | 1 - src/private/package/NewNovaPackageRelationshipsXml.ps1 | 1 - .../package/ResolveNovaPackageUploadAuthHeaderEntry.ps1 | 1 - src/private/package/ResolveNovaPackageUploadHeaders.ps1 | 1 - src/private/package/ResolveNovaPackageUploadTarget.ps1 | 1 - src/private/package/ResolveNovaPackageUploadTypeList.ps1 | 1 - src/private/package/TestNovaPathContainsPath.ps1 | 1 - src/private/quality/GetNovaTestWorkflowContext.ps1 | 4 ---- src/private/quality/InvokeNovaTestWorkflow.ps1 | 2 -- src/private/quality/NewNovaTestDynamicParameterDictionary.ps1 | 1 - .../release/GetNovaVersionUpdateCiActivatedCommand.ps1 | 1 - src/private/release/WriteNovaPublishWorkflowContext.ps1 | 1 - src/private/shared/ConvertToNovaPackageType.ps1 | 1 - src/private/shared/GetNovaEnvironmentVariableValue.ps1 | 1 - src/private/shared/GetNovaProjectInfoContext.ps1 | 1 - .../GetNovaProjectPackageOutputDirectorySettingsTable.ps1 | 1 - src/private/shared/GetNovaProjectPackageSettingsTable.ps1 | 1 - src/private/shared/GetNovaResolvedProjectManifestSettings.ps1 | 1 - .../GetNovaResolvedProjectPackageOutputDirectorySettings.ps1 | 1 - src/private/shared/GetNovaResolvedProjectPackageSettings.ps1 | 1 - src/private/shared/GetNovaResolvedProjectPackageTypeList.ps1 | 1 - src/private/shared/GetNovaSettingsDirectoryPath.ps1 | 1 - src/private/shared/ImportNovaBuiltModuleForCi.ps1 | 1 - src/private/shared/InvokeNovaBuildValidation.ps1 | 2 -- .../shared/NewNovaDynamicSkipTestsParameterDictionary.ps1 | 1 - src/private/shared/SetNovaPackageSettingDefault.ps1 | 1 - src/private/shared/Write-ProjectJsonData.ps1 | 1 - src/public/DeployNovaPackage.ps1 | 1 - src/public/InitializeNovaModule.ps1 | 1 - src/resources/cli/help/build.psd1 | 1 - src/resources/cli/help/bump.psd1 | 1 - src/resources/cli/help/deploy.psd1 | 1 - src/resources/cli/help/info.psd1 | 1 - src/resources/cli/help/init.psd1 | 1 - src/resources/cli/help/notification.psd1 | 1 - src/resources/cli/help/package.psd1 | 1 - src/resources/cli/help/publish.psd1 | 1 - src/resources/cli/help/release.psd1 | 1 - src/resources/cli/help/test.psd1 | 1 - src/resources/cli/help/update.psd1 | 1 - src/resources/cli/help/version.psd1 | 1 - tests/CoverageGaps.BuildInternals.Tests.ps1 | 2 -- tests/CoverageGaps.Cli.TestSupport.ps1 | 1 - tests/NovaCommandModel.PackageUpload.TestSupport.ps1 | 1 - tests/NovaCommandModel.TestSupport.ps1 | 1 - tests/NovaCommandModel.TestSupport/Assertions.ps1 | 1 - tests/NovaCommandModel.TestSupport/CliProjectSupport.ps1 | 1 - tests/NovaCommandModel.TestSupport/ModuleSupport.ps1 | 1 - tests/NovaCommandModel.TestSupport/PesterSupport.ps1 | 1 - tests/NovaCommandModel.TestSupport/TextAndHelp.ps1 | 1 - tests/RemainingCommandCoverage.TestSupport.ps1 | 2 -- tests/RemainingHelperCoverage.TestSupport.ps1 | 1 - 106 files changed, 1 insertion(+), 119 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index ffe18a43..459c831f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -132,4 +132,3 @@ body: required: true - label: This is not a bug report or security vulnerability report. required: true - diff --git a/codecov.yml b/codecov.yml index 86c899af..17a925e5 100644 --- a/codecov.yml +++ b/codecov.yml @@ -5,4 +5,4 @@ coverage: target: auto patch: default: - target: 100% \ No newline at end of file + target: 100% diff --git a/docs/NovaModuleTools/en-US/Deploy-NovaPackage.md b/docs/NovaModuleTools/en-US/Deploy-NovaPackage.md index ee2f4fd2..1a304ad9 100644 --- a/docs/NovaModuleTools/en-US/Deploy-NovaPackage.md +++ b/docs/NovaModuleTools/en-US/Deploy-NovaPackage.md @@ -377,4 +377,3 @@ If no upload target can be resolved, `Deploy-NovaPackage` fails fast with a clea - https://github.com/stiwicourage/NovaModuleTools/blob/main/docs/NovaModuleTools/en-US/New-NovaModulePackage.md - https://github.com/stiwicourage/NovaModuleTools/blob/main/docs/NovaModuleTools/en-US/Invoke-NovaCli.md - https://github.com/stiwicourage/NovaModuleTools/blob/main/docs/NovaModuleTools/en-US/Publish-NovaModule.md - diff --git a/src/private/build/GetNovaBuildProjectInfo.ps1 b/src/private/build/GetNovaBuildProjectInfo.ps1 index 3b8168db..0140edbd 100644 --- a/src/private/build/GetNovaBuildProjectInfo.ps1 +++ b/src/private/build/GetNovaBuildProjectInfo.ps1 @@ -10,4 +10,3 @@ function Get-NovaBuildProjectInfo { return Get-NovaProjectInfo } - diff --git a/src/private/build/GetNovaBuildWorkflowContext.ps1 b/src/private/build/GetNovaBuildWorkflowContext.ps1 index 587316b3..a27d7259 100644 --- a/src/private/build/GetNovaBuildWorkflowContext.ps1 +++ b/src/private/build/GetNovaBuildWorkflowContext.ps1 @@ -14,4 +14,3 @@ function Get-NovaBuildWorkflowContext { Operation = 'Build Nova module output' } } - diff --git a/src/private/build/InvokeNovaBuildWorkflow.ps1 b/src/private/build/InvokeNovaBuildWorkflow.ps1 index 202c5a8e..9d594329 100644 --- a/src/private/build/InvokeNovaBuildWorkflow.ps1 +++ b/src/private/build/InvokeNovaBuildWorkflow.ps1 @@ -44,4 +44,3 @@ function Invoke-NovaBuildUpdateNotificationSafely { $null = $_ } } - diff --git a/src/private/cli/AddNovaCliHeaderOption.ps1 b/src/private/cli/AddNovaCliHeaderOption.ps1 index 44305517..a1cf8885 100644 --- a/src/private/cli/AddNovaCliHeaderOption.ps1 +++ b/src/private/cli/AddNovaCliHeaderOption.ps1 @@ -24,4 +24,3 @@ function Add-NovaCliHeaderOption { $Options.Headers[$headerName] = $headerValue } - diff --git a/src/private/cli/AddNovaCliOptionValue.ps1 b/src/private/cli/AddNovaCliOptionValue.ps1 index f0413033..563a843a 100644 --- a/src/private/cli/AddNovaCliOptionValue.ps1 +++ b/src/private/cli/AddNovaCliOptionValue.ps1 @@ -13,4 +13,3 @@ function Add-NovaCliOptionValue { $Options[$Name] = @($existingValue + $Value) } - diff --git a/src/private/cli/ConvertFromNovaBuildCliArgument.ps1 b/src/private/cli/ConvertFromNovaBuildCliArgument.ps1 index aa7c6562..09a0bb43 100644 --- a/src/private/cli/ConvertFromNovaBuildCliArgument.ps1 +++ b/src/private/cli/ConvertFromNovaBuildCliArgument.ps1 @@ -9,4 +9,3 @@ function ConvertFrom-NovaBuildCliArgument { '-i' = 'ContinuousIntegration' } } - diff --git a/src/private/cli/ConvertFromNovaBumpCliArgument.ps1 b/src/private/cli/ConvertFromNovaBumpCliArgument.ps1 index 49818b46..3aaa7a31 100644 --- a/src/private/cli/ConvertFromNovaBumpCliArgument.ps1 +++ b/src/private/cli/ConvertFromNovaBumpCliArgument.ps1 @@ -11,4 +11,3 @@ function ConvertFrom-NovaBumpCliArgument { '-i' = 'ContinuousIntegration' } } - diff --git a/src/private/cli/ConvertFromNovaCliArgument.ps1 b/src/private/cli/ConvertFromNovaCliArgument.ps1 index 27bad27e..339c6425 100644 --- a/src/private/cli/ConvertFromNovaCliArgument.ps1 +++ b/src/private/cli/ConvertFromNovaCliArgument.ps1 @@ -73,4 +73,3 @@ function ConvertFrom-NovaPackageCliArgument { return ConvertFrom-NovaCliArgument -Arguments $Arguments -AllowedOptionNameList @('SkipTests') } - diff --git a/src/private/cli/ConvertFromNovaDeployCliArgument.ps1 b/src/private/cli/ConvertFromNovaDeployCliArgument.ps1 index dc5bbf17..1bd4146e 100644 --- a/src/private/cli/ConvertFromNovaDeployCliArgument.ps1 +++ b/src/private/cli/ConvertFromNovaDeployCliArgument.ps1 @@ -49,5 +49,3 @@ function ConvertFrom-NovaDeployCliArgument { return $options } - - diff --git a/src/private/cli/ConvertFromNovaTestCliArgument.ps1 b/src/private/cli/ConvertFromNovaTestCliArgument.ps1 index dd292e9c..789867a4 100644 --- a/src/private/cli/ConvertFromNovaTestCliArgument.ps1 +++ b/src/private/cli/ConvertFromNovaTestCliArgument.ps1 @@ -9,4 +9,3 @@ function ConvertFrom-NovaTestCliArgument { '-b' = 'Build' } } - diff --git a/src/private/cli/FormatNovaCliCommandHelp.ps1 b/src/private/cli/FormatNovaCliCommandHelp.ps1 index abca4dc6..83b272da 100644 --- a/src/private/cli/FormatNovaCliCommandHelp.ps1 +++ b/src/private/cli/FormatNovaCliCommandHelp.ps1 @@ -174,7 +174,3 @@ function Format-NovaCliCommandHelp { return Format-NovaCliShortCommandHelp -Definition $Definition } - - - - diff --git a/src/private/cli/FormatNovaCliCommandResult.ps1 b/src/private/cli/FormatNovaCliCommandResult.ps1 index 5e33e485..b2bf1192 100644 --- a/src/private/cli/FormatNovaCliCommandResult.ps1 +++ b/src/private/cli/FormatNovaCliCommandResult.ps1 @@ -70,4 +70,3 @@ function Format-NovaCliCommandResult { return $Result } - diff --git a/src/private/cli/GetNovaCliCommandHelp.ps1 b/src/private/cli/GetNovaCliCommandHelp.ps1 index 424d8ac2..3aed0949 100644 --- a/src/private/cli/GetNovaCliCommandHelp.ps1 +++ b/src/private/cli/GetNovaCliCommandHelp.ps1 @@ -17,4 +17,3 @@ function Get-NovaCliCommandHelp { $definition = Get-NovaCliCommandHelpDefinition -Command $Command return Format-NovaCliCommandHelp -Definition $definition -View $View } - diff --git a/src/private/cli/GetNovaCliCommandHelpDefinition.ps1 b/src/private/cli/GetNovaCliCommandHelpDefinition.ps1 index 0fc02369..8495f0f8 100644 --- a/src/private/cli/GetNovaCliCommandHelpDefinition.ps1 +++ b/src/private/cli/GetNovaCliCommandHelpDefinition.ps1 @@ -39,4 +39,3 @@ function Get-NovaCliCommandHelpDefinition { return Import-PowerShellDataFile -Path (Get-NovaCliCommandHelpFilePath -Command $Command) } - diff --git a/src/private/cli/GetNovaCliHelpRequest.ps1 b/src/private/cli/GetNovaCliHelpRequest.ps1 index eef9a9cc..d0e0afd5 100644 --- a/src/private/cli/GetNovaCliHelpRequest.ps1 +++ b/src/private/cli/GetNovaCliHelpRequest.ps1 @@ -83,5 +83,3 @@ function Get-NovaCliHelpRequest { return Get-NovaCliSubcommandHelpRequest -Command $normalizedCommand -Arguments $Arguments } - - diff --git a/src/private/cli/GetNovaCliRequiredArgumentValue.ps1 b/src/private/cli/GetNovaCliRequiredArgumentValue.ps1 index da74a3d1..52d18538 100644 --- a/src/private/cli/GetNovaCliRequiredArgumentValue.ps1 +++ b/src/private/cli/GetNovaCliRequiredArgumentValue.ps1 @@ -13,4 +13,3 @@ function Get-NovaCliRequiredArgumentValue { return $Arguments[$Index.Value] } - diff --git a/src/private/cli/InvokeNovaCliDeployCommand.ps1 b/src/private/cli/InvokeNovaCliDeployCommand.ps1 index a63d0484..7666ca18 100644 --- a/src/private/cli/InvokeNovaCliDeployCommand.ps1 +++ b/src/private/cli/InvokeNovaCliDeployCommand.ps1 @@ -8,5 +8,3 @@ function Invoke-NovaCliDeployCommand { $options = ConvertFrom-NovaDeployCliArgument -Arguments $Arguments return Deploy-NovaPackage @options @ForwardedParameters } - - diff --git a/src/private/cli/InvokeNovaCliInitCommand.ps1 b/src/private/cli/InvokeNovaCliInitCommand.ps1 index eafa8968..9f635bcc 100644 --- a/src/private/cli/InvokeNovaCliInitCommand.ps1 +++ b/src/private/cli/InvokeNovaCliInitCommand.ps1 @@ -13,4 +13,3 @@ function Invoke-NovaCliInitCommand { $options = ConvertFrom-NovaInitCliArgument -Arguments $Arguments return Initialize-NovaModule @options @ForwardedParameters } - diff --git a/src/private/cli/InvokeNovaCliNotificationCommand.ps1 b/src/private/cli/InvokeNovaCliNotificationCommand.ps1 index 2c222dea..9a259900 100644 --- a/src/private/cli/InvokeNovaCliNotificationCommand.ps1 +++ b/src/private/cli/InvokeNovaCliNotificationCommand.ps1 @@ -20,4 +20,3 @@ function Invoke-NovaCliNotificationCommand { } } } - diff --git a/src/private/package/AddNovaZipFileEntry.ps1 b/src/private/package/AddNovaZipFileEntry.ps1 index 5c083af3..559b853d 100644 --- a/src/private/package/AddNovaZipFileEntry.ps1 +++ b/src/private/package/AddNovaZipFileEntry.ps1 @@ -17,4 +17,3 @@ function Add-NovaZipFileEntry { $entryStream.Dispose() } } - diff --git a/src/private/package/AddNovaZipTextEntry.ps1 b/src/private/package/AddNovaZipTextEntry.ps1 index 4ab2afd2..6049a8a7 100644 --- a/src/private/package/AddNovaZipTextEntry.ps1 +++ b/src/private/package/AddNovaZipTextEntry.ps1 @@ -15,4 +15,3 @@ function Add-NovaZipTextEntry { $streamWriter.Dispose() } } - diff --git a/src/private/package/AssertNovaPackageMetadata.ps1 b/src/private/package/AssertNovaPackageMetadata.ps1 index d44b65ab..6c28d3b0 100644 --- a/src/private/package/AssertNovaPackageMetadata.ps1 +++ b/src/private/package/AssertNovaPackageMetadata.ps1 @@ -15,4 +15,3 @@ function Assert-NovaPackageMetadata { Stop-NovaOperation -Message 'Missing package metadata value: Authors' -ErrorId 'Nova.Configuration.PackageMetadataValueMissing' -Category InvalidData -TargetObject 'Authors' } } - diff --git a/src/private/package/AssertNovaPackageOutputDirectoryCanBeCleared.ps1 b/src/private/package/AssertNovaPackageOutputDirectoryCanBeCleared.ps1 index 83b40fc7..66951608 100644 --- a/src/private/package/AssertNovaPackageOutputDirectoryCanBeCleared.ps1 +++ b/src/private/package/AssertNovaPackageOutputDirectoryCanBeCleared.ps1 @@ -16,4 +16,3 @@ function Assert-NovaPackageOutputDirectoryCanBeCleared { } } } - diff --git a/src/private/package/GetNovaManifestValue.ps1 b/src/private/package/GetNovaManifestValue.ps1 index 9737b3e5..edab4bda 100644 --- a/src/private/package/GetNovaManifestValue.ps1 +++ b/src/private/package/GetNovaManifestValue.ps1 @@ -16,4 +16,3 @@ function Get-NovaManifestValue { return $property.Value } - diff --git a/src/private/package/GetNovaPackageArtifactPatternInfo.ps1 b/src/private/package/GetNovaPackageArtifactPatternInfo.ps1 index 3af589d8..b0c4a06a 100644 --- a/src/private/package/GetNovaPackageArtifactPatternInfo.ps1 +++ b/src/private/package/GetNovaPackageArtifactPatternInfo.ps1 @@ -20,4 +20,3 @@ function Get-NovaPackageArtifactPatternInfo { ExplicitPackageType = $explicitPackageType } } - diff --git a/src/private/package/GetNovaPackageArtifactSearchPattern.ps1 b/src/private/package/GetNovaPackageArtifactSearchPattern.ps1 index 0fecd8a0..4f8636d8 100644 --- a/src/private/package/GetNovaPackageArtifactSearchPattern.ps1 +++ b/src/private/package/GetNovaPackageArtifactSearchPattern.ps1 @@ -12,4 +12,3 @@ function Get-NovaPackageArtifactSearchPattern { return "$( $patternInfo.Pattern )$( Get-NovaPackageTypeExtension -PackageType $PackageType )" } - diff --git a/src/private/package/GetNovaPackageArtifactType.ps1 b/src/private/package/GetNovaPackageArtifactType.ps1 index 15bb37a8..adbe1772 100644 --- a/src/private/package/GetNovaPackageArtifactType.ps1 +++ b/src/private/package/GetNovaPackageArtifactType.ps1 @@ -17,4 +17,3 @@ function Get-NovaPackageArtifactType { Stop-NovaOperation -Message $errorMessage -ErrorId 'Nova.Validation.UnsupportedPackageUploadFileType' -Category InvalidArgument -TargetObject $PackagePath } } - diff --git a/src/private/package/GetNovaPackageAuthorList.ps1 b/src/private/package/GetNovaPackageAuthorList.ps1 index f80bd9f6..c6decff9 100644 --- a/src/private/package/GetNovaPackageAuthorList.ps1 +++ b/src/private/package/GetNovaPackageAuthorList.ps1 @@ -27,4 +27,3 @@ function Get-NovaPackageAuthorList { Select-Object -Unique ) } - diff --git a/src/private/package/GetNovaPackageContentItemList.ps1 b/src/private/package/GetNovaPackageContentItemList.ps1 index db40a2bb..94a33985 100644 --- a/src/private/package/GetNovaPackageContentItemList.ps1 +++ b/src/private/package/GetNovaPackageContentItemList.ps1 @@ -24,4 +24,3 @@ function Get-NovaPackageContentItemList { } ) } - diff --git a/src/private/package/GetNovaPackageFileName.ps1 b/src/private/package/GetNovaPackageFileName.ps1 index 26fd7004..71b7a6b1 100644 --- a/src/private/package/GetNovaPackageFileName.ps1 +++ b/src/private/package/GetNovaPackageFileName.ps1 @@ -69,4 +69,3 @@ function ConvertTo-NovaLatestPackageFileName { return $PackageFileName } - diff --git a/src/private/package/GetNovaPackageMetadata.ps1 b/src/private/package/GetNovaPackageMetadata.ps1 index 0cab1aa9..6c1fb5b1 100644 --- a/src/private/package/GetNovaPackageMetadata.ps1 +++ b/src/private/package/GetNovaPackageMetadata.ps1 @@ -58,4 +58,3 @@ function Get-NovaPackageMetadata { ContentRoot = $contentRoot } } - diff --git a/src/private/package/GetNovaPackageMetadataElement.ps1 b/src/private/package/GetNovaPackageMetadataElement.ps1 index ccec953c..3ddf1f6f 100644 --- a/src/private/package/GetNovaPackageMetadataElement.ps1 +++ b/src/private/package/GetNovaPackageMetadataElement.ps1 @@ -12,4 +12,3 @@ function Get-NovaPackageMetadataElement { $escapedValue = [System.Security.SecurityElement]::Escape($Value) return " <$Name>$escapedValue" } - diff --git a/src/private/package/GetNovaPackageOutputDirectory.ps1 b/src/private/package/GetNovaPackageOutputDirectory.ps1 index 54ec2231..170ffc1c 100644 --- a/src/private/package/GetNovaPackageOutputDirectory.ps1 +++ b/src/private/package/GetNovaPackageOutputDirectory.ps1 @@ -17,4 +17,3 @@ function Get-NovaPackageOutputDirectory { return [System.IO.Path]::Join($ProjectInfo.ProjectRoot, $outputDirectory) } - diff --git a/src/private/package/GetNovaPackageRepository.ps1 b/src/private/package/GetNovaPackageRepository.ps1 index ec8b4a57..b4e85c80 100644 --- a/src/private/package/GetNovaPackageRepository.ps1 +++ b/src/private/package/GetNovaPackageRepository.ps1 @@ -26,4 +26,3 @@ function Get-NovaPackageRepository { Stop-NovaOperation -Message "Package repository not found: $Repository. Define it under Package.Repositories in project.json or provide -Url." -ErrorId 'Nova.Configuration.PackageRepositoryNotFound' -Category InvalidData -TargetObject $Repository } - diff --git a/src/private/package/GetNovaPackageSettingValue.ps1 b/src/private/package/GetNovaPackageSettingValue.ps1 index addfd99e..46841817 100644 --- a/src/private/package/GetNovaPackageSettingValue.ps1 +++ b/src/private/package/GetNovaPackageSettingValue.ps1 @@ -23,4 +23,3 @@ function Get-NovaPackageSettingValue { return $null } - diff --git a/src/private/package/GetNovaPackageTypeExtension.ps1 b/src/private/package/GetNovaPackageTypeExtension.ps1 index e21179d1..47f2a9ea 100644 --- a/src/private/package/GetNovaPackageTypeExtension.ps1 +++ b/src/private/package/GetNovaPackageTypeExtension.ps1 @@ -11,4 +11,3 @@ function Get-NovaPackageTypeExtension { return '.nupkg' } - diff --git a/src/private/package/GetNovaPackageUploadArtifact.ps1 b/src/private/package/GetNovaPackageUploadArtifact.ps1 index d5c31308..0b6ff268 100644 --- a/src/private/package/GetNovaPackageUploadArtifact.ps1 +++ b/src/private/package/GetNovaPackageUploadArtifact.ps1 @@ -15,4 +15,3 @@ function Get-NovaPackageUploadArtifact { UploadUrl = Join-NovaPackageUploadUrl -Url $UploadTarget.Url -UploadPath $UploadTarget.UploadPath -PackageFileName $PackageFileInfo.PackageFileName } } - diff --git a/src/private/package/GetNovaPackageUploadAuthHeaderName.ps1 b/src/private/package/GetNovaPackageUploadAuthHeaderName.ps1 index 39e925fc..48bd2864 100644 --- a/src/private/package/GetNovaPackageUploadAuthHeaderName.ps1 +++ b/src/private/package/GetNovaPackageUploadAuthHeaderName.ps1 @@ -11,4 +11,3 @@ function Get-NovaPackageUploadAuthHeaderName { return "$headerName".Trim() } - diff --git a/src/private/package/GetNovaPackageUploadAuthHeaderValue.ps1 b/src/private/package/GetNovaPackageUploadAuthHeaderValue.ps1 index 1c0f0bd2..dfeece34 100644 --- a/src/private/package/GetNovaPackageUploadAuthHeaderValue.ps1 +++ b/src/private/package/GetNovaPackageUploadAuthHeaderValue.ps1 @@ -24,4 +24,3 @@ function Get-NovaPackageUploadAuthHeaderValue { return "$("$scheme".Trim() ) $Token" } - diff --git a/src/private/package/GetNovaPackageUploadFileList.ps1 b/src/private/package/GetNovaPackageUploadFileList.ps1 index e1fbb868..088635f2 100644 --- a/src/private/package/GetNovaPackageUploadFileList.ps1 +++ b/src/private/package/GetNovaPackageUploadFileList.ps1 @@ -14,4 +14,3 @@ function Get-NovaPackageUploadFileList { return @(Resolve-NovaPackageUploadOutputFileList -ProjectInfo $ProjectInfo -PackageType $PackageType) } - diff --git a/src/private/package/GetNovaPackageUploadPath.ps1 b/src/private/package/GetNovaPackageUploadPath.ps1 index d1f0fbcf..7f680477 100644 --- a/src/private/package/GetNovaPackageUploadPath.ps1 +++ b/src/private/package/GetNovaPackageUploadPath.ps1 @@ -14,4 +14,3 @@ function Get-NovaPackageUploadPath { return "$( $resolvedUploadPath )".Trim() } - diff --git a/src/private/package/GetNovaPackageUploadStatusCode.ps1 b/src/private/package/GetNovaPackageUploadStatusCode.ps1 index e2be076c..fe0af0e4 100644 --- a/src/private/package/GetNovaPackageUploadStatusCode.ps1 +++ b/src/private/package/GetNovaPackageUploadStatusCode.ps1 @@ -14,4 +14,3 @@ function Get-NovaPackageUploadStatusCode { return $null } - diff --git a/src/private/package/GetNovaPackageUploadTargetSettingBundle.ps1 b/src/private/package/GetNovaPackageUploadTargetSettingBundle.ps1 index 0868d236..c5a0c693 100644 --- a/src/private/package/GetNovaPackageUploadTargetSettingBundle.ps1 +++ b/src/private/package/GetNovaPackageUploadTargetSettingBundle.ps1 @@ -11,4 +11,3 @@ function Get-NovaPackageUploadTargetSettingBundle { Auth = Merge-NovaPackageSettingTable -BaseSettings (Get-NovaPackageSettingValue -InputObject $PackageSettings -Name 'Auth') -OverrideSettings (Get-NovaPackageSettingValue -InputObject $RepositorySettings -Name 'Auth') } } - diff --git a/src/private/package/GetNovaPackageUploadTargetUrl.ps1 b/src/private/package/GetNovaPackageUploadTargetUrl.ps1 index c109035b..5d001d1e 100644 --- a/src/private/package/GetNovaPackageUploadTargetUrl.ps1 +++ b/src/private/package/GetNovaPackageUploadTargetUrl.ps1 @@ -18,4 +18,3 @@ function Get-NovaPackageUploadTargetUrl { return "$resolvedUrl".Trim() } - diff --git a/src/private/package/GetNovaPackageUploadToken.ps1 b/src/private/package/GetNovaPackageUploadToken.ps1 index 0b2391e1..3b3d3864 100644 --- a/src/private/package/GetNovaPackageUploadToken.ps1 +++ b/src/private/package/GetNovaPackageUploadToken.ps1 @@ -13,4 +13,3 @@ function Get-NovaPackageUploadToken { ConfiguredValue = Get-NovaPackageSettingValue -InputObject $AuthSettings -Name 'Token' }) } - diff --git a/src/private/package/GetNovaPackageUploadWorkflowContext.ps1 b/src/private/package/GetNovaPackageUploadWorkflowContext.ps1 index 3e7fd2b9..3dc1a24c 100644 --- a/src/private/package/GetNovaPackageUploadWorkflowContext.ps1 +++ b/src/private/package/GetNovaPackageUploadWorkflowContext.ps1 @@ -29,4 +29,3 @@ function Get-NovaPackageUploadWorkflowContext { Operation = Get-NovaPackageUploadWorkflowOperation -UploadArtifactList $uploadArtifactList } } - diff --git a/src/private/package/GetNovaPackageUploadWorkflowOperation.ps1 b/src/private/package/GetNovaPackageUploadWorkflowOperation.ps1 index 4a05df0d..8664fa99 100644 --- a/src/private/package/GetNovaPackageUploadWorkflowOperation.ps1 +++ b/src/private/package/GetNovaPackageUploadWorkflowOperation.ps1 @@ -10,4 +10,3 @@ function Get-NovaPackageUploadWorkflowOperation { return "Upload $( $UploadArtifactList.Count ) package artifacts" } - diff --git a/src/private/package/GetNovaPackageUploadWorkflowTarget.ps1 b/src/private/package/GetNovaPackageUploadWorkflowTarget.ps1 index ddd80066..67f69e88 100644 --- a/src/private/package/GetNovaPackageUploadWorkflowTarget.ps1 +++ b/src/private/package/GetNovaPackageUploadWorkflowTarget.ps1 @@ -6,4 +6,3 @@ function Get-NovaPackageUploadWorkflowTarget { return ($UploadArtifactList | ForEach-Object {$_.UploadUrl}) -join ', ' } - diff --git a/src/private/package/JoinNovaPackageUploadUrl.ps1 b/src/private/package/JoinNovaPackageUploadUrl.ps1 index e0981b8d..3e9c0f94 100644 --- a/src/private/package/JoinNovaPackageUploadUrl.ps1 +++ b/src/private/package/JoinNovaPackageUploadUrl.ps1 @@ -14,4 +14,3 @@ function Join-NovaPackageUploadUrl { $urlPartList += [System.Uri]::EscapeDataString($PackageFileName) return $urlPartList -join '/' } - diff --git a/src/private/package/NewNovaPackageContentTypesXml.ps1 b/src/private/package/NewNovaPackageContentTypesXml.ps1 index 30ccd59e..fce1fd98 100644 --- a/src/private/package/NewNovaPackageContentTypesXml.ps1 +++ b/src/private/package/NewNovaPackageContentTypesXml.ps1 @@ -38,4 +38,3 @@ function New-NovaPackageContentTypesXml { $xmlLines += '' return $xmlLines -join [Environment]::NewLine } - diff --git a/src/private/package/NewNovaPackageCorePropertiesXml.ps1 b/src/private/package/NewNovaPackageCorePropertiesXml.ps1 index b4f8f98b..4b35ef68 100644 --- a/src/private/package/NewNovaPackageCorePropertiesXml.ps1 +++ b/src/private/package/NewNovaPackageCorePropertiesXml.ps1 @@ -23,4 +23,3 @@ function New-NovaPackageCorePropertiesXml { '' ) -join [Environment]::NewLine } - diff --git a/src/private/package/NewNovaPackageNuspecXml.ps1 b/src/private/package/NewNovaPackageNuspecXml.ps1 index 8889a0af..5476271b 100644 --- a/src/private/package/NewNovaPackageNuspecXml.ps1 +++ b/src/private/package/NewNovaPackageNuspecXml.ps1 @@ -25,4 +25,3 @@ function New-NovaPackageNuspecXml { '' ) -join [Environment]::NewLine } - diff --git a/src/private/package/NewNovaPackageRelationshipsXml.ps1 b/src/private/package/NewNovaPackageRelationshipsXml.ps1 index d803ec36..669e9ad6 100644 --- a/src/private/package/NewNovaPackageRelationshipsXml.ps1 +++ b/src/private/package/NewNovaPackageRelationshipsXml.ps1 @@ -14,4 +14,3 @@ function New-NovaPackageRelationshipsXml { '' ) -join [Environment]::NewLine } - diff --git a/src/private/package/ResolveNovaPackageUploadAuthHeaderEntry.ps1 b/src/private/package/ResolveNovaPackageUploadAuthHeaderEntry.ps1 index 747d9c34..ec4e381e 100644 --- a/src/private/package/ResolveNovaPackageUploadAuthHeaderEntry.ps1 +++ b/src/private/package/ResolveNovaPackageUploadAuthHeaderEntry.ps1 @@ -16,4 +16,3 @@ function Resolve-NovaPackageUploadAuthHeaderEntry { Value = Get-NovaPackageUploadAuthHeaderValue -AuthSettings $AuthSettings -AuthenticationScheme $UploadOption.AuthenticationScheme -HeaderName $headerName -Token $resolvedToken } } - diff --git a/src/private/package/ResolveNovaPackageUploadHeaders.ps1 b/src/private/package/ResolveNovaPackageUploadHeaders.ps1 index ad7e4805..e0bec25d 100644 --- a/src/private/package/ResolveNovaPackageUploadHeaders.ps1 +++ b/src/private/package/ResolveNovaPackageUploadHeaders.ps1 @@ -15,4 +15,3 @@ function Resolve-NovaPackageUploadHeaders { $resolvedHeaders[$authHeaderEntry.Name] = $authHeaderEntry.Value return $resolvedHeaders } - diff --git a/src/private/package/ResolveNovaPackageUploadTarget.ps1 b/src/private/package/ResolveNovaPackageUploadTarget.ps1 index 5fb1eeba..b5c22a60 100644 --- a/src/private/package/ResolveNovaPackageUploadTarget.ps1 +++ b/src/private/package/ResolveNovaPackageUploadTarget.ps1 @@ -21,4 +21,3 @@ function Resolve-NovaPackageUploadTarget { Auth = $targetSettings.Auth } } - diff --git a/src/private/package/ResolveNovaPackageUploadTypeList.ps1 b/src/private/package/ResolveNovaPackageUploadTypeList.ps1 index 143ba6f0..23599503 100644 --- a/src/private/package/ResolveNovaPackageUploadTypeList.ps1 +++ b/src/private/package/ResolveNovaPackageUploadTypeList.ps1 @@ -48,4 +48,3 @@ function Resolve-NovaRequestedPackageUploadTypeList { Stop-NovaOperation -Message "Package.FileNamePattern '$( $PatternInfo.Pattern )' resolves to type '$( $PatternInfo.ExplicitPackageType )', but requested PackageType values are: $( $resolvedTypeList -join ', ' )." -ErrorId 'Nova.Validation.PackageUploadPatternConflict' -Category InvalidArgument -TargetObject $PatternInfo.Pattern } - diff --git a/src/private/package/TestNovaPathContainsPath.ps1 b/src/private/package/TestNovaPathContainsPath.ps1 index 4f0dd813..5ee10ec3 100644 --- a/src/private/package/TestNovaPathContainsPath.ps1 +++ b/src/private/package/TestNovaPathContainsPath.ps1 @@ -13,4 +13,3 @@ function Test-NovaPathContainsPath { return $normalizedChildPath.StartsWith("$normalizedParentPath$( [System.IO.Path]::DirectorySeparatorChar )", [System.StringComparison]::OrdinalIgnoreCase) } - diff --git a/src/private/quality/GetNovaTestWorkflowContext.ps1 b/src/private/quality/GetNovaTestWorkflowContext.ps1 index ea52c9c6..c334c519 100644 --- a/src/private/quality/GetNovaTestWorkflowContext.ps1 +++ b/src/private/quality/GetNovaTestWorkflowContext.ps1 @@ -60,7 +60,3 @@ function Get-NovaTestOptionValue { return $null } - - - - diff --git a/src/private/quality/InvokeNovaTestWorkflow.ps1 b/src/private/quality/InvokeNovaTestWorkflow.ps1 index 65135410..fd280b06 100644 --- a/src/private/quality/InvokeNovaTestWorkflow.ps1 +++ b/src/private/quality/InvokeNovaTestWorkflow.ps1 @@ -77,5 +77,3 @@ function Initialize-NovaPesterArtifactDirectory { $null = New-Item -ItemType Directory -Path $WorkflowContext.TestResultDirectory -Force } - - diff --git a/src/private/quality/NewNovaTestDynamicParameterDictionary.ps1 b/src/private/quality/NewNovaTestDynamicParameterDictionary.ps1 index 2bb73fe4..31c021d3 100644 --- a/src/private/quality/NewNovaTestDynamicParameterDictionary.ps1 +++ b/src/private/quality/NewNovaTestDynamicParameterDictionary.ps1 @@ -9,4 +9,3 @@ function New-NovaTestDynamicParameterDictionary { $dictionary.Add('Build',[System.Management.Automation.RuntimeDefinedParameter]::new('Build', [switch],$attributeCollection)) return $dictionary } - diff --git a/src/private/release/GetNovaVersionUpdateCiActivatedCommand.ps1 b/src/private/release/GetNovaVersionUpdateCiActivatedCommand.ps1 index 3c35d05a..b1ad62d8 100644 --- a/src/private/release/GetNovaVersionUpdateCiActivatedCommand.ps1 +++ b/src/private/release/GetNovaVersionUpdateCiActivatedCommand.ps1 @@ -15,4 +15,3 @@ function Get-NovaVersionUpdateCiActivatedCommand { $importedModule = Import-NovaBuiltModuleForCi -ProjectInfo $projectInfo return $importedModule.ExportedCommands['Update-NovaModuleVersion'] } - diff --git a/src/private/release/WriteNovaPublishWorkflowContext.ps1 b/src/private/release/WriteNovaPublishWorkflowContext.ps1 index a4d2bd60..f40b5cbf 100644 --- a/src/private/release/WriteNovaPublishWorkflowContext.ps1 +++ b/src/private/release/WriteNovaPublishWorkflowContext.ps1 @@ -7,4 +7,3 @@ function Write-NovaPublishWorkflowContext { Write-NovaLocalWorkflowMode -WorkflowName $WorkflowContext.WorkflowName -LocalRequested:$WorkflowContext.LocalRequested Write-NovaResolvedLocalPublishTarget -PublishInvocation $WorkflowContext.PublishInvocation } - diff --git a/src/private/shared/ConvertToNovaPackageType.ps1 b/src/private/shared/ConvertToNovaPackageType.ps1 index 96cf4312..a20d32cb 100644 --- a/src/private/shared/ConvertToNovaPackageType.ps1 +++ b/src/private/shared/ConvertToNovaPackageType.ps1 @@ -22,4 +22,3 @@ function ConvertTo-NovaPackageType { } } } - diff --git a/src/private/shared/GetNovaEnvironmentVariableValue.ps1 b/src/private/shared/GetNovaEnvironmentVariableValue.ps1 index 9cfb4ed4..5a253d86 100644 --- a/src/private/shared/GetNovaEnvironmentVariableValue.ps1 +++ b/src/private/shared/GetNovaEnvironmentVariableValue.ps1 @@ -10,4 +10,3 @@ function Get-NovaEnvironmentVariableValue { return [System.Environment]::GetEnvironmentVariable($Name.Trim()) } - diff --git a/src/private/shared/GetNovaProjectInfoContext.ps1 b/src/private/shared/GetNovaProjectInfoContext.ps1 index 482d7d9b..032cf408 100644 --- a/src/private/shared/GetNovaProjectInfoContext.ps1 +++ b/src/private/shared/GetNovaProjectInfoContext.ps1 @@ -16,4 +16,3 @@ function Get-NovaProjectInfoContext { JsonData = Read-ProjectJsonData -ProjectJsonPath $projectJson } } - diff --git a/src/private/shared/GetNovaProjectPackageOutputDirectorySettingsTable.ps1 b/src/private/shared/GetNovaProjectPackageOutputDirectorySettingsTable.ps1 index ce71357c..2ec0618f 100644 --- a/src/private/shared/GetNovaProjectPackageOutputDirectorySettingsTable.ps1 +++ b/src/private/shared/GetNovaProjectPackageOutputDirectorySettingsTable.ps1 @@ -20,4 +20,3 @@ function Get-NovaProjectPackageOutputDirectorySettingsTable { Path = $outputDirectoryValue } } - diff --git a/src/private/shared/GetNovaProjectPackageSettingsTable.ps1 b/src/private/shared/GetNovaProjectPackageSettingsTable.ps1 index 7a42f39d..03aef579 100644 --- a/src/private/shared/GetNovaProjectPackageSettingsTable.ps1 +++ b/src/private/shared/GetNovaProjectPackageSettingsTable.ps1 @@ -18,4 +18,3 @@ function Get-NovaProjectPackageSettingsTable { return $packageSettings } - diff --git a/src/private/shared/GetNovaResolvedProjectManifestSettings.ps1 b/src/private/shared/GetNovaResolvedProjectManifestSettings.ps1 index 397af272..c38b1c1e 100644 --- a/src/private/shared/GetNovaResolvedProjectManifestSettings.ps1 +++ b/src/private/shared/GetNovaResolvedProjectManifestSettings.ps1 @@ -11,4 +11,3 @@ function Get-NovaResolvedProjectManifestSettings { return [ordered]@{} } - diff --git a/src/private/shared/GetNovaResolvedProjectPackageOutputDirectorySettings.ps1 b/src/private/shared/GetNovaResolvedProjectPackageOutputDirectorySettings.ps1 index fbdfada0..8b783dec 100644 --- a/src/private/shared/GetNovaResolvedProjectPackageOutputDirectorySettings.ps1 +++ b/src/private/shared/GetNovaResolvedProjectPackageOutputDirectorySettings.ps1 @@ -16,4 +16,3 @@ function Get-NovaResolvedProjectPackageOutputDirectorySettings { $outputDirectorySettings['Clean'] = [bool]$outputDirectorySettings['Clean'] return $outputDirectorySettings } - diff --git a/src/private/shared/GetNovaResolvedProjectPackageSettings.ps1 b/src/private/shared/GetNovaResolvedProjectPackageSettings.ps1 index 8cf6c23e..9b6552b0 100644 --- a/src/private/shared/GetNovaResolvedProjectPackageSettings.ps1 +++ b/src/private/shared/GetNovaResolvedProjectPackageSettings.ps1 @@ -30,4 +30,3 @@ function Get-NovaResolvedProjectPackageSettings { return $packageSettings } - diff --git a/src/private/shared/GetNovaResolvedProjectPackageTypeList.ps1 b/src/private/shared/GetNovaResolvedProjectPackageTypeList.ps1 index 0fbd9b71..284e4bca 100644 --- a/src/private/shared/GetNovaResolvedProjectPackageTypeList.ps1 +++ b/src/private/shared/GetNovaResolvedProjectPackageTypeList.ps1 @@ -30,4 +30,3 @@ function Get-NovaResolvedProjectPackageTypeList { return $resolvedTypeList } - diff --git a/src/private/shared/GetNovaSettingsDirectoryPath.ps1 b/src/private/shared/GetNovaSettingsDirectoryPath.ps1 index ee1f07e5..d7a5b773 100644 --- a/src/private/shared/GetNovaSettingsDirectoryPath.ps1 +++ b/src/private/shared/GetNovaSettingsDirectoryPath.ps1 @@ -27,4 +27,3 @@ function Get-NovaSettingsRootPath { return Join-Path $HOME '.config' } - diff --git a/src/private/shared/ImportNovaBuiltModuleForCi.ps1 b/src/private/shared/ImportNovaBuiltModuleForCi.ps1 index 4c504e6e..665fe60b 100644 --- a/src/private/shared/ImportNovaBuiltModuleForCi.ps1 +++ b/src/private/shared/ImportNovaBuiltModuleForCi.ps1 @@ -37,4 +37,3 @@ function Import-NovaBuiltModuleForCi { Get-Module -Name $resolvedProjectInfo.ProjectName -All | Remove-Module -Force -ErrorAction SilentlyContinue return Import-Module -Name $moduleManifestPath -Force -Global -PassThru -ErrorAction Stop } - diff --git a/src/private/shared/InvokeNovaBuildValidation.ps1 b/src/private/shared/InvokeNovaBuildValidation.ps1 index 55b66122..cf976dab 100644 --- a/src/private/shared/InvokeNovaBuildValidation.ps1 +++ b/src/private/shared/InvokeNovaBuildValidation.ps1 @@ -14,5 +14,3 @@ function Invoke-NovaBuildValidation { Write-Verbose 'Skipping Test-NovaBuild because SkipTests was requested for this workflow.' } - - diff --git a/src/private/shared/NewNovaDynamicSkipTestsParameterDictionary.ps1 b/src/private/shared/NewNovaDynamicSkipTestsParameterDictionary.ps1 index 6dd968a0..a44d009f 100644 --- a/src/private/shared/NewNovaDynamicSkipTestsParameterDictionary.ps1 +++ b/src/private/shared/NewNovaDynamicSkipTestsParameterDictionary.ps1 @@ -20,4 +20,3 @@ function Get-NovaDynamicDeliveryParameterDictionary { Add-NovaDynamicSwitchParameter -ParameterDictionary $parameterDictionary -Name 'ContinuousIntegration' return $parameterDictionary } - diff --git a/src/private/shared/SetNovaPackageSettingDefault.ps1 b/src/private/shared/SetNovaPackageSettingDefault.ps1 index 3b801bbc..020e702b 100644 --- a/src/private/shared/SetNovaPackageSettingDefault.ps1 +++ b/src/private/shared/SetNovaPackageSettingDefault.ps1 @@ -17,4 +17,3 @@ function Set-NovaPackageSettingDefault { $null = $PackageSettings[$Name] = $Value } } - diff --git a/src/private/shared/Write-ProjectJsonData.ps1 b/src/private/shared/Write-ProjectJsonData.ps1 index bae51fae..4fcab88b 100644 --- a/src/private/shared/Write-ProjectJsonData.ps1 +++ b/src/private/shared/Write-ProjectJsonData.ps1 @@ -8,4 +8,3 @@ function Write-ProjectJsonData { $projectJsonContent = $Data | ConvertTo-Json -Depth 20 Set-Content -LiteralPath $ProjectJsonPath -Value $projectJsonContent -Encoding utf8 } - diff --git a/src/public/DeployNovaPackage.ps1 b/src/public/DeployNovaPackage.ps1 index c3c91719..f81e6771 100644 --- a/src/public/DeployNovaPackage.ps1 +++ b/src/public/DeployNovaPackage.ps1 @@ -25,4 +25,3 @@ function Deploy-NovaPackage { return @(Invoke-NovaPackageUploadWorkflow -WorkflowContext $workflowContext -UploadArtifactList $workflowContext.UploadArtifactList) } } - diff --git a/src/public/InitializeNovaModule.ps1 b/src/public/InitializeNovaModule.ps1 index 23dd24ca..62fe23c2 100644 --- a/src/public/InitializeNovaModule.ps1 +++ b/src/public/InitializeNovaModule.ps1 @@ -13,4 +13,3 @@ function Initialize-NovaModule { Invoke-NovaModuleInitializationWorkflow -WorkflowContext $workflowContext } - diff --git a/src/resources/cli/help/build.psd1 b/src/resources/cli/help/build.psd1 index 7eaef765..7c78395c 100644 --- a/src/resources/cli/help/build.psd1 +++ b/src/resources/cli/help/build.psd1 @@ -49,4 +49,3 @@ } ) } - diff --git a/src/resources/cli/help/bump.psd1 b/src/resources/cli/help/bump.psd1 index b8eead71..45a908fd 100644 --- a/src/resources/cli/help/bump.psd1 +++ b/src/resources/cli/help/bump.psd1 @@ -55,4 +55,3 @@ } ) } - diff --git a/src/resources/cli/help/deploy.psd1 b/src/resources/cli/help/deploy.psd1 index 55c2209e..5422be42 100644 --- a/src/resources/cli/help/deploy.psd1 +++ b/src/resources/cli/help/deploy.psd1 @@ -93,4 +93,3 @@ } ) } - diff --git a/src/resources/cli/help/info.psd1 b/src/resources/cli/help/info.psd1 index f79ebabf..231ef22a 100644 --- a/src/resources/cli/help/info.psd1 +++ b/src/resources/cli/help/info.psd1 @@ -16,4 +16,3 @@ } ) } - diff --git a/src/resources/cli/help/init.psd1 b/src/resources/cli/help/init.psd1 index 0ee6a862..d6408ccd 100644 --- a/src/resources/cli/help/init.psd1 +++ b/src/resources/cli/help/init.psd1 @@ -37,4 +37,3 @@ } ) } - diff --git a/src/resources/cli/help/notification.psd1 b/src/resources/cli/help/notification.psd1 index 115f51a7..485a2445 100644 --- a/src/resources/cli/help/notification.psd1 +++ b/src/resources/cli/help/notification.psd1 @@ -55,4 +55,3 @@ } ) } - diff --git a/src/resources/cli/help/package.psd1 b/src/resources/cli/help/package.psd1 index f6ef8b1f..d3455adc 100644 --- a/src/resources/cli/help/package.psd1 +++ b/src/resources/cli/help/package.psd1 @@ -50,4 +50,3 @@ } ) } - diff --git a/src/resources/cli/help/publish.psd1 b/src/resources/cli/help/publish.psd1 index be0f50e0..ef4454cc 100644 --- a/src/resources/cli/help/publish.psd1 +++ b/src/resources/cli/help/publish.psd1 @@ -84,4 +84,3 @@ } ) } - diff --git a/src/resources/cli/help/release.psd1 b/src/resources/cli/help/release.psd1 index 15485ccc..4f916585 100644 --- a/src/resources/cli/help/release.psd1 +++ b/src/resources/cli/help/release.psd1 @@ -84,4 +84,3 @@ } ) } - diff --git a/src/resources/cli/help/test.psd1 b/src/resources/cli/help/test.psd1 index 392735cb..184dc67f 100644 --- a/src/resources/cli/help/test.psd1 +++ b/src/resources/cli/help/test.psd1 @@ -50,4 +50,3 @@ } ) } - diff --git a/src/resources/cli/help/update.psd1 b/src/resources/cli/help/update.psd1 index 2f21bc41..42c258a8 100644 --- a/src/resources/cli/help/update.psd1 +++ b/src/resources/cli/help/update.psd1 @@ -39,4 +39,3 @@ } ) } - diff --git a/src/resources/cli/help/version.psd1 b/src/resources/cli/help/version.psd1 index 5c04df03..9051edf9 100644 --- a/src/resources/cli/help/version.psd1 +++ b/src/resources/cli/help/version.psd1 @@ -27,4 +27,3 @@ } ) } - diff --git a/tests/CoverageGaps.BuildInternals.Tests.ps1 b/tests/CoverageGaps.BuildInternals.Tests.ps1 index 10f039c6..dd644288 100644 --- a/tests/CoverageGaps.BuildInternals.Tests.ps1 +++ b/tests/CoverageGaps.BuildInternals.Tests.ps1 @@ -515,5 +515,3 @@ function Second { } } } - - diff --git a/tests/CoverageGaps.Cli.TestSupport.ps1 b/tests/CoverageGaps.Cli.TestSupport.ps1 index c443065f..a58c4f0d 100644 --- a/tests/CoverageGaps.Cli.TestSupport.ps1 +++ b/tests/CoverageGaps.Cli.TestSupport.ps1 @@ -124,4 +124,3 @@ function Get-TestNovaCliSyntaxGuidanceCaseList { @{Argument = '-continuousintegration'; Message = "Unsupported CLI option syntax: -continuousintegration. Use '--continuous-integration' or '-i' instead."} ) } - diff --git a/tests/NovaCommandModel.PackageUpload.TestSupport.ps1 b/tests/NovaCommandModel.PackageUpload.TestSupport.ps1 index 4cc44188..42a8234d 100644 --- a/tests/NovaCommandModel.PackageUpload.TestSupport.ps1 +++ b/tests/NovaCommandModel.PackageUpload.TestSupport.ps1 @@ -360,4 +360,3 @@ function Get-TestNovaPackageUploadFailureCases { } ) } - diff --git a/tests/NovaCommandModel.TestSupport.ps1 b/tests/NovaCommandModel.TestSupport.ps1 index 53f7a937..349c5369 100644 --- a/tests/NovaCommandModel.TestSupport.ps1 +++ b/tests/NovaCommandModel.TestSupport.ps1 @@ -16,4 +16,3 @@ function Initialize-NovaCommandModelTestSupport { } . Initialize-NovaCommandModelTestSupport - diff --git a/tests/NovaCommandModel.TestSupport/Assertions.ps1 b/tests/NovaCommandModel.TestSupport/Assertions.ps1 index 529f0fe5..469cc5c5 100644 --- a/tests/NovaCommandModel.TestSupport/Assertions.ps1 +++ b/tests/NovaCommandModel.TestSupport/Assertions.ps1 @@ -356,4 +356,3 @@ function Assert-TestNovaCliPublishConfirmationResult { $Result.Text | Should -Match 'Operation cancelled\.' } - diff --git a/tests/NovaCommandModel.TestSupport/CliProjectSupport.ps1 b/tests/NovaCommandModel.TestSupport/CliProjectSupport.ps1 index 4baa9a69..8052b65e 100644 --- a/tests/NovaCommandModel.TestSupport/CliProjectSupport.ps1 +++ b/tests/NovaCommandModel.TestSupport/CliProjectSupport.ps1 @@ -184,4 +184,3 @@ function Get-TestNovaCliContinuousIntegrationForwardingCaseList { @{CommandName = 'release'; ActionCommand = 'Invoke-NovaRelease'; UsesPublishOption = $true; Arguments = @('--repository', 'PSGallery', '--api-key', 'key123', '--continuous-integration')} ) } - diff --git a/tests/NovaCommandModel.TestSupport/ModuleSupport.ps1 b/tests/NovaCommandModel.TestSupport/ModuleSupport.ps1 index 1bcc7d69..3b2ae4c1 100644 --- a/tests/NovaCommandModel.TestSupport/ModuleSupport.ps1 +++ b/tests/NovaCommandModel.TestSupport/ModuleSupport.ps1 @@ -79,4 +79,3 @@ function Initialize-TestModuleContext { return $context } - diff --git a/tests/NovaCommandModel.TestSupport/PesterSupport.ps1 b/tests/NovaCommandModel.TestSupport/PesterSupport.ps1 index 72189ee4..13c89762 100644 --- a/tests/NovaCommandModel.TestSupport/PesterSupport.ps1 +++ b/tests/NovaCommandModel.TestSupport/PesterSupport.ps1 @@ -29,4 +29,3 @@ function New-TestPesterConfigStub { return [pscustomobject]$config } - diff --git a/tests/NovaCommandModel.TestSupport/TextAndHelp.ps1 b/tests/NovaCommandModel.TestSupport/TextAndHelp.ps1 index aba5ae63..f58f4822 100644 --- a/tests/NovaCommandModel.TestSupport/TextAndHelp.ps1 +++ b/tests/NovaCommandModel.TestSupport/TextAndHelp.ps1 @@ -123,4 +123,3 @@ function Assert-TestPowerShellHelpExcludesCliSyntax { $Text | Should -Not -Match $forbiddenPattern.Pattern -Because "$Subject $( $forbiddenPattern.Reason )" } } - diff --git a/tests/RemainingCommandCoverage.TestSupport.ps1 b/tests/RemainingCommandCoverage.TestSupport.ps1 index 7ea25267..a9a4280a 100644 --- a/tests/RemainingCommandCoverage.TestSupport.ps1 +++ b/tests/RemainingCommandCoverage.TestSupport.ps1 @@ -78,5 +78,3 @@ function Get-TestNovaPesterReportWriter { $global:reportWasWritten = $null -ne $TestResult -and $OutputPath -eq $ExpectedOutputPath }.GetNewClosure() } - - diff --git a/tests/RemainingHelperCoverage.TestSupport.ps1 b/tests/RemainingHelperCoverage.TestSupport.ps1 index 7589eb87..f3a48097 100644 --- a/tests/RemainingHelperCoverage.TestSupport.ps1 +++ b/tests/RemainingHelperCoverage.TestSupport.ps1 @@ -127,4 +127,3 @@ function Get-TestNovaPackageProjectInfo { } } } -