@posthog/convex 2.1.6 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "2.1.
|
|
1
|
+
export declare const version = "2.1.7";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = "2.1.
|
|
1
|
+
export const version = "2.1.7";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"url": "https://github.com/PostHog/posthog-js/issues"
|
|
12
12
|
},
|
|
13
13
|
"author": "PostHog Inc.",
|
|
14
|
-
"version": "2.1.
|
|
14
|
+
"version": "2.1.7",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"keywords": [
|
|
17
17
|
"convex",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"types": "./dist/client/index.d.ts",
|
|
50
50
|
"module": "./dist/client/index.js",
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@posthog/core": "^1.59.
|
|
53
|
-
"posthog-node": "^5.56.
|
|
52
|
+
"@posthog/core": "^1.59.3",
|
|
53
|
+
"posthog-node": "^5.56.4"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@edge-runtime/vm": "^5.0.0",
|
|
@@ -60,6 +60,27 @@ describe('LocalFeatureFlagEvaluator', () => {
|
|
|
60
60
|
expect(await evaluator.getFeatureFlag('pp-flag', 'user', {}, { plan: 'free' })).toBe(false)
|
|
61
61
|
})
|
|
62
62
|
|
|
63
|
+
test.each(['not_icontains', 'not_starts_with', 'not_ends_with', 'not_regex', 'is_not', 'exact', 'gt'])(
|
|
64
|
+
'returns undefined for an unresolved property with %s',
|
|
65
|
+
async (operator) => {
|
|
66
|
+
const evaluator = new LocalFeatureFlagEvaluator(
|
|
67
|
+
definitions([
|
|
68
|
+
makeFlag('unresolved', {
|
|
69
|
+
filters: {
|
|
70
|
+
groups: [
|
|
71
|
+
{
|
|
72
|
+
properties: [{ key: 'plan', value: 'pro', operator, type: 'person' }],
|
|
73
|
+
rollout_percentage: 100,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
}),
|
|
78
|
+
])
|
|
79
|
+
)
|
|
80
|
+
expect(await evaluator.getFeatureFlag('unresolved', 'user', {}, { plan: undefined })).toBeUndefined()
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
|
|
63
84
|
test('returns variant key for multivariate flags', async () => {
|
|
64
85
|
const evaluator = new LocalFeatureFlagEvaluator(
|
|
65
86
|
definitions([
|
|
@@ -123,9 +123,9 @@ describe('matchProperty — starts_with / ends_with', () => {
|
|
|
123
123
|
['not_starts_with', true],
|
|
124
124
|
['ends_with', false],
|
|
125
125
|
['not_ends_with', true],
|
|
126
|
-
] as const)('%s matches null as a string
|
|
126
|
+
] as const)('%s matches null as a string and keeps undefined inconclusive', (op, expected) => {
|
|
127
127
|
expect(matchProperty(prop(op, 'Val'), { k: null })).toBe(expected)
|
|
128
|
-
expect(matchProperty(prop(op, 'Val'), { k: undefined })).
|
|
128
|
+
expect(() => matchProperty(prop(op, 'Val'), { k: undefined })).toThrow(InconclusiveMatchError)
|
|
129
129
|
})
|
|
130
130
|
})
|
|
131
131
|
|
package/src/component/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "2.1.
|
|
1
|
+
export const version = "2.1.7"
|