Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Plaster/Plaster.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
6 changes: 3 additions & 3 deletions Plaster/Private/Write-PlasterLog.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions tests/Manifest.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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\[(?<Version>(\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\[(?<Version>(\d+\.){2}\d+)(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?\]"

$moduleName = $env:BHProjectName
$manifest = Import-PowerShellDataFile -Path $env:BHPSModuleManifest
Expand Down
Loading