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.
@@ -915,7 +915,7 @@ function setupExpressErrorHandler(_posthog, app) {
915
915
  });
916
916
  }
917
917
 
918
- var version = "5.5.0";
918
+ var version = "5.5.1";
919
919
 
920
920
  var PostHogPersistedProperty;
921
921
  (function (PostHogPersistedProperty) {
@@ -2210,7 +2210,7 @@ class FeatureFlagsPoller {
2210
2210
  }
2211
2211
  } catch (e) {
2212
2212
  if (e instanceof InconclusiveMatchError) {
2213
- this.onError?.(new Error(`Unable to compute flag locally: ${flag.key} - ${e.message}`));
2213
+ this.logMsgIfDebug(() => console.debug(`InconclusiveMatchError when computing flag locally: ${flag.key}: ${e}`));
2214
2214
  } else if (e instanceof Error) {
2215
2215
  this.onError?.(new Error(`Error computing flag locally: ${flag.key}: ${e}`));
2216
2216
  }
@@ -2307,6 +2307,9 @@ class FeatureFlagsPoller {
2307
2307
  let matches = false;
2308
2308
  if (propertyType === 'cohort') {
2309
2309
  matches = matchCohort(prop, properties, this.cohorts, this.debugMode);
2310
+ } else if (propertyType === 'flag') {
2311
+ 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'}'`));
2312
+ continue;
2310
2313
  } else {
2311
2314
  matches = matchProperty(prop, properties, warnFunction);
2312
2315
  }
@@ -2644,6 +2647,11 @@ function matchPropertyGroup(propertyGroup, propertyValues, cohortProperties, deb
2644
2647
  let matches;
2645
2648
  if (prop.type === 'cohort') {
2646
2649
  matches = matchCohort(prop, propertyValues, cohortProperties, debugMode);
2650
+ } else if (prop.type === 'flag') {
2651
+ if (debugMode) {
2652
+ console.warn(`[FEATURE FLAGS] Flag dependency filters are not supported in local evaluation. ` + `Skipping condition with dependency on flag '${prop.key || 'unknown'}'`);
2653
+ }
2654
+ continue;
2647
2655
  } else {
2648
2656
  matches = matchProperty(prop, propertyValues);
2649
2657
  }