posthog-node 3.1.2 → 3.1.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/CHANGELOG.md +4 -0
- package/lib/index.cjs.js +18 -15
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.esm.js +18 -15
- package/lib/index.esm.js.map +1 -1
- package/lib/posthog-core/src/types.d.ts +3 -1
- package/package.json +2 -2
- package/src/feature-flags.ts +2 -3
|
@@ -31,7 +31,9 @@ export declare enum PostHogPersistedProperty {
|
|
|
31
31
|
SessionId = "session_id",
|
|
32
32
|
SessionLastTimestamp = "session_timestamp",
|
|
33
33
|
PersonProperties = "person_properties",
|
|
34
|
-
GroupProperties = "group_properties"
|
|
34
|
+
GroupProperties = "group_properties",
|
|
35
|
+
InstalledAppBuild = "installed_app_build",
|
|
36
|
+
InstalledAppVersion = "installed_app_version"
|
|
35
37
|
}
|
|
36
38
|
export declare type PostHogFetchOptions = {
|
|
37
39
|
method: 'GET' | 'POST' | 'PUT' | 'PATCH';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "posthog-node",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3",
|
|
4
4
|
"description": "PostHog Node.js integration",
|
|
5
5
|
"repository": "PostHog/posthog-node",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"module": "lib/index.esm.js",
|
|
20
20
|
"types": "lib/index.d.ts",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"axios": "^
|
|
22
|
+
"axios": "^1.6.0",
|
|
23
23
|
"rusha": "^0.8.14"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
package/src/feature-flags.ts
CHANGED
|
@@ -424,8 +424,6 @@ class FeatureFlagsPoller {
|
|
|
424
424
|
|
|
425
425
|
try {
|
|
426
426
|
return await this.fetch(url, options)
|
|
427
|
-
} catch (err) {
|
|
428
|
-
throw err
|
|
429
427
|
} finally {
|
|
430
428
|
clearTimeout(abortTimeout)
|
|
431
429
|
}
|
|
@@ -487,13 +485,14 @@ function matchProperty(
|
|
|
487
485
|
case 'lte':
|
|
488
486
|
return typeof overrideValue == typeof value && overrideValue <= value
|
|
489
487
|
case 'is_date_after':
|
|
490
|
-
case 'is_date_before':
|
|
488
|
+
case 'is_date_before': {
|
|
491
489
|
const parsedDate = convertToDateTime(value)
|
|
492
490
|
const overrideDate = convertToDateTime(overrideValue)
|
|
493
491
|
if (operator === 'is_date_before') {
|
|
494
492
|
return overrideDate < parsedDate
|
|
495
493
|
}
|
|
496
494
|
return overrideDate > parsedDate
|
|
495
|
+
}
|
|
497
496
|
default:
|
|
498
497
|
console.error(`Unknown operator: ${operator}`)
|
|
499
498
|
return false
|