From 0d2d3ae846ad2b5fa88273c39d4782c0348ff5ce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:56:43 +0000 Subject: [PATCH 1/4] Initial plan From 54b85006de1c6e1c837e7af9ab8619c46706855f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Feb 2026 17:02:55 +0000 Subject: [PATCH 2/4] Fix null-coalescing operator for PS5.1 compatibility Co-authored-by: HeyItsGilbert <615265+HeyItsGilbert@users.noreply.github.com> --- Plaster/Private/Write-PlasterLog.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Plaster/Private/Write-PlasterLog.ps1 b/Plaster/Private/Write-PlasterLog.ps1 index 39d337c..d4ea57b 100644 --- a/Plaster/Private/Write-PlasterLog.ps1 +++ b/Plaster/Private/Write-PlasterLog.ps1 @@ -49,9 +49,9 @@ function Write-PlasterLog { 'Debug' = 4 } - $currentLogLevel = $script:LogLevel ?? 'Information' - $currentLevelValue = $logLevels[$currentLogLevel] ?? 2 - $messageLevelValue = $logLevels[$Level] ?? 2 + $currentLogLevel = if ($null -ne $script:LogLevel) { $script:LogLevel } else { 'Information' } + $currentLevelValue = if ($null -ne $logLevels[$currentLogLevel]) { $logLevels[$currentLogLevel] } else { 2 } + $messageLevelValue = if ($null -ne $logLevels[$Level]) { $logLevels[$Level] } else { 2 } if ($messageLevelValue -gt $currentLevelValue) { return From ae6afe2132769ef4b8b09530790b45f295d2fc3f Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Thu, 12 Feb 2026 09:18:57 -0800 Subject: [PATCH 3/4] chore(release): 2.0.0-alpha.1 --- CHANGELOG.md | 10 +++++++++- Plaster/Plaster.psd1 | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5473a97..9affe34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [2.0.0] 2025-06-18 +## [2.0.0-alpha.1] 2026-02-12 + +### Fixed + +- Null-coalescing operators replaced with PS5.1-compatible syntax in + Write-PlasterLog to fix PowerShell 5.1 compatibility + ([#442](https://github.com/PowerShellOrg/Plaster/issues/442)) + +## [2.0.0-alpha] 2025-06-18 ### Added diff --git a/Plaster/Plaster.psd1 b/Plaster/Plaster.psd1 index 0e40228..8b5932c 100644 --- a/Plaster/Plaster.psd1 +++ b/Plaster/Plaster.psd1 @@ -15,7 +15,7 @@ # PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ - Prerelease = 'alpha' + Prerelease = 'alpha.1' # Tags applied to this module. These help with module discovery in online galleries. Tags = @('Plaster', 'CodeGenerator', 'Scaffold', 'Template', 'JSON', 'PowerShell7') From e019b4133103ccd40e5f4da2a79ed72ee4292e52 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Thu, 12 Feb 2026 09:28:41 -0800 Subject: [PATCH 4/4] refactor(tests): update regex patterns to support semver pre-release and build metadata --- tests/Manifest.tests.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/Manifest.tests.ps1 b/tests/Manifest.tests.ps1 index 4792558..6d6ae56 100644 --- a/tests/Manifest.tests.ps1 +++ b/tests/Manifest.tests.ps1 @@ -4,8 +4,10 @@ BeforeAll { . $path -Task Build } # NEW: Pre-Specify RegEx Matching Patterns - $gitTagMatchRegEx = 'tag:\s?.(\d+(\.\d+)*)' # NOTE - was 'tag:\s*(\d+(?:\.\d+)*)' previously - $changelogTagMatchRegEx = "^##\s\[(?(\d+\.){1,3}\d+)\]" + # Matches semantic versioning with optional pre-release and build metadata + # Examples: 1.0.0, 2.0.0-alpha, 2.0.0-alpha.1, 2.0.0+build.123 + $gitTagMatchRegEx = 'tag:\s?.(\d+(?:\.\d+)*)(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?' + $changelogTagMatchRegEx = "^##\s\[(?(\d+\.){2}\d+)(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?\]" $moduleName = $env:BHProjectName $manifest = Import-PowerShellDataFile -Path $env:BHPSModuleManifest