diff --git a/CHANGELOG.md b/CHANGELOG.md index 73c0b4d..b3455b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.7.0-beta1] - 2026-10-07 + ### Added - npm-style lock files. `Update-PSDependLock` resolves supported Dependencies diff --git a/PSDepend/PSDepend.psd1 b/PSDepend/PSDepend.psd1 index bab808c..6a6bc87 100644 --- a/PSDepend/PSDepend.psd1 +++ b/PSDepend/PSDepend.psd1 @@ -4,7 +4,7 @@ RootModule = 'PSDepend.psm1' # Version number of this module. - ModuleVersion = '0.6.0' + ModuleVersion = '0.7.0' # ID used to uniquely identify this module GUID = '63ea9e2a-320d-43ff-a11a-4930ca03cce6' @@ -110,7 +110,7 @@ ReleaseNotes = 'https://github.com/PowerShellOrg/PSDepend/blob/main/CHANGELOG.md' # Prerelease string (e.g. 'beta1', 'rc2'). Empty string = stable release. - Prerelease = '' + Prerelease = 'beta1' } # End of PSData hashtable diff --git a/Tests/Manifest.tests.ps1 b/Tests/Manifest.tests.ps1 index af7effe..2bbcefd 100644 --- a/Tests/Manifest.tests.ps1 +++ b/Tests/Manifest.tests.ps1 @@ -12,8 +12,20 @@ BeforeAll { $manifestData = Test-ModuleManifest -Path $outputManifestPath -Verbose:$false -ErrorAction Stop -WarningAction SilentlyContinue $changelogPath = Join-Path -Path $env:BHProjectPath -ChildPath 'CHANGELOG.md' - $changelogLine = Get-Content -Path $changelogPath | Where-Object { $_ -match "^##\s\[(?(\d+\.){1,3}\d+)\]" } | Select-Object -First 1 - $changelogVersion = if ($changelogLine -and ($changelogLine -match "^##\s\[(?(\d+\.){1,3}\d+)\]")) { $matches.Version } else { $null } + $versionPattern = '(?(?(\d+\.){2}\d+)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?)' + $changelogLine = Get-Content -Path $changelogPath | + Where-Object { $_ -match "^##\s\[$versionPattern\]" } | + Select-Object -First 1 + $changelogVersion = if ($changelogLine -and ($changelogLine -match "^##\s\[$versionPattern\]")) { + $matches.Version + } + else { + $null + } + $manifestVersion = $manifestData.Version.ToString() + if ($manifestData.PrivateData.PSData.Prerelease) { + $manifestVersion += "-$($manifestData.PrivateData.PSData.Prerelease)" + } $script:manifest = $null } @@ -55,11 +67,11 @@ Describe 'Module manifest' { It 'Has a valid version in the changelog' { $changelogVersion | Should -Not -BeNullOrEmpty - $changelogVersion -as [Version] | Should -Not -BeNullOrEmpty + ($changelogVersion -split '-', 2)[0] -as [Version] | Should -Not -BeNullOrEmpty } It 'Changelog and manifest versions are the same' { - $changelogVersion -as [Version] | Should -Be ( $manifestData.Version -as [Version] ) + $changelogVersion | Should -Be $manifestVersion } } }