Skip to content

Commit 6881ef7

Browse files
committed
feat: treat "null" strings as null
1 parent 820cdcc commit 6881ef7

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

packages/flag-evaluation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bucketco/flag-evaluation",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"license": "MIT",
55
"repository": {
66
"type": "git",

packages/flag-evaluation/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,9 @@ export function evaluate(
359359
: fieldValueDate <= valueDate;
360360
}
361361
case "SET":
362-
return fieldValue !== "";
362+
return fieldValue !== "" && fieldValue !== "null";
363363
case "NOT_SET":
364-
return fieldValue === "";
364+
return fieldValue === "" || fieldValue === "null";
365365
case "IS":
366366
return fieldValue === value;
367367
case "IS_NOT":

packages/node-sdk/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bucketco/node-sdk",
3-
"version": "1.9.3",
3+
"version": "1.9.4",
44
"license": "MIT",
55
"repository": {
66
"type": "git",
@@ -44,6 +44,6 @@
4444
"vitest": "~1.6.0"
4545
},
4646
"dependencies": {
47-
"@bucketco/flag-evaluation": "0.2.1"
47+
"@bucketco/flag-evaluation": "0.2.2"
4848
}
4949
}

packages/openfeature-node-provider/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"vitest": "~1.6.0"
5151
},
5252
"dependencies": {
53-
"@bucketco/node-sdk": "1.9.3"
53+
"@bucketco/node-sdk": "1.9.4"
5454
},
5555
"peerDependencies": {
5656
"@openfeature/server-sdk": ">=1.16.1"

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ __metadata:
782782
languageName: unknown
783783
linkType: soft
784784

785-
"@bucketco/flag-evaluation@npm:0.2.1, @bucketco/flag-evaluation@workspace:packages/flag-evaluation":
785+
"@bucketco/flag-evaluation@npm:0.2.2, @bucketco/flag-evaluation@workspace:packages/flag-evaluation":
786786
version: 0.0.0-use.local
787787
resolution: "@bucketco/flag-evaluation@workspace:packages/flag-evaluation"
788788
dependencies:
@@ -798,13 +798,13 @@ __metadata:
798798
languageName: unknown
799799
linkType: soft
800800

801-
"@bucketco/node-sdk@npm:1.9.3, @bucketco/node-sdk@workspace:packages/node-sdk":
801+
"@bucketco/node-sdk@npm:1.9.4, @bucketco/node-sdk@workspace:packages/node-sdk":
802802
version: 0.0.0-use.local
803803
resolution: "@bucketco/node-sdk@workspace:packages/node-sdk"
804804
dependencies:
805805
"@babel/core": "npm:~7.24.7"
806806
"@bucketco/eslint-config": "npm:~0.0.2"
807-
"@bucketco/flag-evaluation": "npm:0.2.1"
807+
"@bucketco/flag-evaluation": "npm:0.2.2"
808808
"@bucketco/tsconfig": "npm:~0.0.2"
809809
"@types/node": "npm:^22.12.0"
810810
"@vitest/coverage-v8": "npm:~1.6.0"
@@ -848,7 +848,7 @@ __metadata:
848848
dependencies:
849849
"@babel/core": "npm:~7.24.7"
850850
"@bucketco/eslint-config": "npm:~0.0.2"
851-
"@bucketco/node-sdk": "npm:1.9.3"
851+
"@bucketco/node-sdk": "npm:1.9.4"
852852
"@bucketco/tsconfig": "npm:~0.0.2"
853853
"@openfeature/core": "npm:^1.5.0"
854854
"@openfeature/server-sdk": "npm:>=1.16.1"

0 commit comments

Comments
 (0)