posthog-node 2.5.2 → 2.5.3

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/lib/index.d.ts CHANGED
@@ -174,6 +174,7 @@ interface GroupIdentifyMessage {
174
174
  groupType: string;
175
175
  groupKey: string;
176
176
  properties?: Record<string | number, any>;
177
+ distinctId?: string;
177
178
  }
178
179
  declare type PostHogNodeV1 = {
179
180
  /**
@@ -357,7 +358,7 @@ declare class PostHog extends PostHogCoreStateless implements PostHogNodeV1 {
357
358
  groupProperties?: Record<string, Record<string, string>>;
358
359
  onlyEvaluateLocally?: boolean;
359
360
  }): Promise<PosthogFlagsAndPayloadsResponse>;
360
- groupIdentify({ groupType, groupKey, properties }: GroupIdentifyMessage): void;
361
+ groupIdentify({ groupType, groupKey, properties, distinctId }: GroupIdentifyMessage): void;
361
362
  reloadFeatureFlags(): Promise<void>;
362
363
  shutdown(): void;
363
364
  shutdownAsync(): Promise<void>;
package/lib/index.esm.js CHANGED
@@ -155,7 +155,7 @@ function __spreadArray(to, from, pack) {
155
155
  return to.concat(ar || Array.prototype.slice.call(from));
156
156
  }
157
157
 
158
- var version = "2.5.2";
158
+ var version = "2.5.3";
159
159
 
160
160
  var PostHogPersistedProperty;
161
161
  (function (PostHogPersistedProperty) {
@@ -2347,12 +2347,19 @@ function (_super) {
2347
2347
  var _b = _a[_i],
2348
2348
  feature = _b[0],
2349
2349
  variant = _b[1];
2350
- featureVariantProperties["$feature/".concat(feature)] = variant;
2350
+
2351
+ if (variant !== false) {
2352
+ featureVariantProperties["$feature/".concat(feature)] = variant;
2353
+ }
2351
2354
  }
2352
2355
  }
2353
2356
 
2357
+ var activeFlags = Object.keys(flags || {}).filter(function (flag) {
2358
+ return (flags === null || flags === void 0 ? void 0 : flags[flag]) !== false;
2359
+ });
2360
+
2354
2361
  var flagProperties = __assign({
2355
- $active_feature_flags: flags ? Object.keys(flags) : undefined
2362
+ $active_feature_flags: activeFlags || undefined
2356
2363
  }, featureVariantProperties);
2357
2364
 
2358
2365
  _capture(__assign(__assign(__assign({}, properties), {
@@ -2639,9 +2646,10 @@ function (_super) {
2639
2646
  PostHog.prototype.groupIdentify = function (_a) {
2640
2647
  var groupType = _a.groupType,
2641
2648
  groupKey = _a.groupKey,
2642
- properties = _a.properties;
2649
+ properties = _a.properties,
2650
+ distinctId = _a.distinctId;
2643
2651
 
2644
- _super.prototype.groupIdentifyStateless.call(this, groupType, groupKey, properties);
2652
+ _super.prototype.groupIdentifyStateless.call(this, groupType, groupKey, properties, undefined, distinctId);
2645
2653
  };
2646
2654
 
2647
2655
  PostHog.prototype.reloadFeatureFlags = function () {