Update to v2.0.8 and backport two fixes (#130)

This commit is contained in:
Steve Lee
2025-12-04 13:13:30 -08:00
committed by GitHub
parent 79d47ceed9
commit 820ac1a06e
3 changed files with 9 additions and 7 deletions
+5
View File
@@ -1,5 +1,10 @@
# v2 Changelog
## [v2.0.8]
- Fixed an issue with array parameters is key-value pairs (#128).
- ConvertTo-MOFInstance: Include resource properties with empty array value (#127)
## [v2.0.7]
### Main changes
@@ -9,7 +9,7 @@
RootModule = 'PSDesiredStateConfiguration.psm1'
# Version number of this module.
moduleVersion = '2.0.7'
moduleVersion = '2.0.8'
# Supported PSEditions
CompatiblePSEditions = @('Core')
@@ -509,7 +509,7 @@ function ConvertTo-MOFInstance
$targetTypeName = $PropertyTypes[$p.Name].TypeConstraint
# see if the target type is an array
$asArray = $p.Name -eq 'DependsOn' -or $targetTypeName -match 'Array'
$asArray = $p.Name -eq 'DependsOn' -or $targetTypeName -match 'Array' -or ((-not [string]::IsNullOrEmpty($targetTypeName)) -and $targetTypeName.EndsWith('[]'))
# Convert the CIM typename to the appropriate .NET type to use
# to convert the input object into an appropriately encoded string
@@ -671,10 +671,7 @@ function ConvertTo-MOFInstance
}
else
{
if ($targetTypeName -notmatch 'Array' -or $p.Value.Count)
{
$p.Name + ' = ' + (stringify -value $p.Value -asArray $asArray -targetType $targetType ) + ";`n"
}
$p.Name + ' = ' + (stringify -value $p.Value -asArray $asArray -targetType $targetType ) + ";`n"
}
}
}
@@ -4211,7 +4208,7 @@ function GetResourceFromKeyword
Ascending = $true
}
$resource.UpdateProperties($updatedProperties)
$resource | Add-Member -MemberType NoteProperty -Name 'ImplementationDetail' -Value $implementationDetail
return $resource