diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f09ac7..9a6b61a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [2.1.1] - 2026-05-25 + +### Fixed + +- `Import-Module Plaster` fails on PowerShell 7.4 with "not a valid + PowerShell module manifest file" error — the module called + `Test-ModuleManifest` on its own manifest during initialization, + causing a re-entrant validation loop that PS 7.4's stricter guards + reject. Replaced with `$MyInvocation.MyCommand.Module.Version` + ([#454](https://github.com/PowerShellOrg/Plaster/issues/454)) + ## [2.1.0] - 2026-05-25 ### Added diff --git a/Plaster/Plaster.psd1 b/Plaster/Plaster.psd1 index 6d99e62..4058217 100644 --- a/Plaster/Plaster.psd1 +++ b/Plaster/Plaster.psd1 @@ -6,7 +6,7 @@ GUID = 'cfce3c5e-402f-412a-a83a-7b7ee9832ff4' # Version number of this module. - ModuleVersion = '2.1.0' + ModuleVersion = '2.1.1' # Supported PSEditions CompatiblePSEditions = @('Desktop', 'Core') diff --git a/Plaster/Plaster.psm1 b/Plaster/Plaster.psm1 index 2dd3e8c..eed1807 100644 --- a/Plaster/Plaster.psm1 +++ b/Plaster/Plaster.psm1 @@ -77,7 +77,7 @@ try { # Module variables with proper scoping and type safety [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')] -$PlasterVersion = (Test-ModuleManifest -Path (Join-Path $PSScriptRoot 'Plaster.psd1')).Version +$PlasterVersion = (Import-PowerShellDataFile -Path (Join-Path $PSScriptRoot 'Plaster.psd1')).ModuleVersion [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')] $JsonSchemaPath = Join-Path $PSScriptRoot "Schema\plaster-manifest-v2.json"