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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
any `IDictionary` instead of only exact `System.Collections.Hashtable`, so
configuration built via `ConvertFrom-Json -AsHashtable` (which returns an
`OrderedHashtable`) and other ordered/generic dictionaries bind correctly.
- `PropertySetTransformAttribute` no longer calls the broken, argument-less
`Read-PropertySet` when `-PropertySet` is omitted (that call could never
bind and always threw). `-PropertySet` is now a mandatory parameter on
`Test-FeatureFlag`, matching `Test-Condition`, so the missing value is
reported with a clear mandatory-parameter error instead. (#84)

## [1.0.0] 2026-06-05

Expand Down Expand Up @@ -73,7 +78,7 @@
constraints now correctly returns `$false` instead of continuing
evaluation.
- `PropertyValidation` threshold fields (`Minimum`, `Maximum`,
`MinLength`, `MaxLength`) changed to `Nullable[int]` so an unconfigured

Check warning on line 81 in CHANGELOG.md

View workflow job for this annotation

GitHub Actions / Continuous Integration / Run Linters

Unknown word (unconfigured) Suggestions: (unconfined, unconfused, unconfirmed, unconsidered)
constraint is no longer treated as zero.
- `PropertyValidation.ToHashtable` now omits null/unset fields to
prevent invalid entries in serialized JSON during Save/FromFile
Expand Down Expand Up @@ -144,7 +149,7 @@
### Changed

- `Test-Condition` function now accepts `ConditionGroup` objects instead of
hashtables for the Condition parameter, providing stronger type safety.

Check warning on line 152 in CHANGELOG.md

View workflow job for this annotation

GitHub Actions / Continuous Integration / Run Linters

Unknown word (hashtables) Suggestions: (hashables, hashtable, hashable, hatable, hashtags)
- `Test-Condition` function now accepts `PropertySet` objects instead of a
generic Properties hashtable for the Properties parameter.
- Internal condition evaluation logic updated to use null checks on
Expand Down
2 changes: 1 addition & 1 deletion Gatekeeper/Classes/Property.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class PropertySetTransformAttribute : System.Management.Automation.ArgumentTrans

[object] Transform([System.Management.Automation.EngineIntrinsics]$engineIntrinsics, [object] $inputData) {
if ($null -eq $inputData) {
return $(Read-PropertySet)
return $null
}
if ($inputData -is [PropertySet]) {
return $inputData
Expand Down
2 changes: 2 additions & 0 deletions Gatekeeper/Public/Test-FeatureFlag.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
[FeatureFlag]
[FeatureFlagTransformAttribute()]
$FeatureFlag,
[Parameter(Mandatory)]
[ValidateNotNull()]
[PropertySet]
[PropertySetTransformAttribute()]
$PropertySet,
Expand Down
4 changes: 2 additions & 2 deletions docs/en-US/Test-FeatureFlag.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## SYNTAX

```
Test-FeatureFlag [-FeatureFlag] <FeatureFlag> [[-PropertySet] <PropertySet>] [-Context] <Hashtable>
Test-FeatureFlag [-FeatureFlag] <FeatureFlag> [-PropertySet] <PropertySet> [-Context] <Hashtable>
[-ProgressAction <ActionPreference>] [<CommonParameters>]
```

Expand Down Expand Up @@ -60,7 +60,7 @@
Parameter Sets: (All)
Aliases:

Required: False
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Expand Down Expand Up @@ -88,7 +88,7 @@
```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Check warning on line 91 in docs/en-US/Test-FeatureFlag.md

View workflow job for this annotation

GitHub Actions / Continuous Integration / Run Linters

Unknown word (proga) Suggestions: (proa, prog, progs, Prog, prgo)

Required: False
Position: Named
Expand Down
Loading