posthog-node 2.5.1 → 2.5.2

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 CHANGED
@@ -1,10 +1,16 @@
1
+ # 2.5.2 - 2023-02-17
2
+
3
+ 1. Fix issue where properties passed to `.identify` were not set correctly
4
+
1
5
  # 2.5.1 - 2023-02-16
2
6
 
3
7
  1. Make sure shutdown waits for pending promises to resolve. Fixes a problem with using PostHog Node in serverless environments.
8
+
4
9
  # 2.5.0 - 2023-02-15
5
10
 
6
11
  1. Removes shared client from `posthog-node`, getting rid of some race condition bugs when capturing events.
7
12
  2. Sets minimum version of node.js to 15
13
+
8
14
  # 2.4.0 - 2023-02-02
9
15
 
10
16
  1. Adds support for overriding timestamp of capture events
package/lib/index.cjs.js CHANGED
@@ -163,7 +163,7 @@ function __spreadArray(to, from, pack) {
163
163
  return to.concat(ar || Array.prototype.slice.call(from));
164
164
  }
165
165
 
166
- var version = "2.5.1";
166
+ var version = "2.5.2";
167
167
 
168
168
  var PostHogPersistedProperty;
169
169
  (function (PostHogPersistedProperty) {
@@ -2376,9 +2376,13 @@ function (_super) {
2376
2376
 
2377
2377
  PostHog.prototype.identify = function (_a) {
2378
2378
  var distinctId = _a.distinctId,
2379
- properties = _a.properties;
2379
+ properties = _a.properties; // Catch properties passed as $set and move them to the top level
2380
+
2381
+ var personProperties = (properties === null || properties === void 0 ? void 0 : properties.$set) || properties;
2380
2382
 
2381
- _super.prototype.identifyStateless.call(this, distinctId, properties);
2383
+ _super.prototype.identifyStateless.call(this, distinctId, {
2384
+ $set: personProperties
2385
+ });
2382
2386
  };
2383
2387
 
2384
2388
  PostHog.prototype.alias = function (data) {