posthog-node 5.5.0 → 5.5.1
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.
- package/CHANGELOG.md +4 -0
- package/lib/edge/index.cjs +10 -2
- package/lib/edge/index.cjs.map +1 -1
- package/lib/edge/index.mjs +10 -2
- package/lib/edge/index.mjs.map +1 -1
- package/lib/node/index.cjs +10 -2
- package/lib/node/index.cjs.map +1 -1
- package/lib/node/index.mjs +10 -2
- package/lib/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Next
|
|
2
2
|
|
|
3
|
+
# 5.5.1 – 2025-07-15
|
|
4
|
+
|
|
5
|
+
1. wrap `InconclusiveMatchError`s in `logMsgIfDebug` for local flag evaluations on `sendFeatureFlags`
|
|
6
|
+
|
|
3
7
|
# 5.5.0 – 2025-07-10
|
|
4
8
|
|
|
5
9
|
1. feat: make the `sendFeatureFlags` parameter more declarative and ergonomic. Implementation notes below:
|
package/lib/edge/index.cjs
CHANGED
|
@@ -937,7 +937,7 @@ function setupExpressErrorHandler(_posthog, app) {
|
|
|
937
937
|
});
|
|
938
938
|
}
|
|
939
939
|
|
|
940
|
-
var version = "5.5.
|
|
940
|
+
var version = "5.5.1";
|
|
941
941
|
|
|
942
942
|
var PostHogPersistedProperty;
|
|
943
943
|
(function (PostHogPersistedProperty) {
|
|
@@ -2232,7 +2232,7 @@ class FeatureFlagsPoller {
|
|
|
2232
2232
|
}
|
|
2233
2233
|
} catch (e) {
|
|
2234
2234
|
if (e instanceof InconclusiveMatchError) {
|
|
2235
|
-
this.
|
|
2235
|
+
this.logMsgIfDebug(() => console.debug(`InconclusiveMatchError when computing flag locally: ${flag.key}: ${e}`));
|
|
2236
2236
|
} else if (e instanceof Error) {
|
|
2237
2237
|
this.onError?.(new Error(`Error computing flag locally: ${flag.key}: ${e}`));
|
|
2238
2238
|
}
|
|
@@ -2329,6 +2329,9 @@ class FeatureFlagsPoller {
|
|
|
2329
2329
|
let matches = false;
|
|
2330
2330
|
if (propertyType === 'cohort') {
|
|
2331
2331
|
matches = matchCohort(prop, properties, this.cohorts, this.debugMode);
|
|
2332
|
+
} else if (propertyType === 'flag') {
|
|
2333
|
+
this.logMsgIfDebug(() => console.warn(`[FEATURE FLAGS] Flag dependency filters are not supported in local evaluation. ` + `Skipping condition for flag '${flag.key}' with dependency on flag '${prop.key || 'unknown'}'`));
|
|
2334
|
+
continue;
|
|
2332
2335
|
} else {
|
|
2333
2336
|
matches = matchProperty(prop, properties, warnFunction);
|
|
2334
2337
|
}
|
|
@@ -2666,6 +2669,11 @@ function matchPropertyGroup(propertyGroup, propertyValues, cohortProperties, deb
|
|
|
2666
2669
|
let matches;
|
|
2667
2670
|
if (prop.type === 'cohort') {
|
|
2668
2671
|
matches = matchCohort(prop, propertyValues, cohortProperties, debugMode);
|
|
2672
|
+
} else if (prop.type === 'flag') {
|
|
2673
|
+
if (debugMode) {
|
|
2674
|
+
console.warn(`[FEATURE FLAGS] Flag dependency filters are not supported in local evaluation. ` + `Skipping condition with dependency on flag '${prop.key || 'unknown'}'`);
|
|
2675
|
+
}
|
|
2676
|
+
continue;
|
|
2669
2677
|
} else {
|
|
2670
2678
|
matches = matchProperty(prop, propertyValues);
|
|
2671
2679
|
}
|