posthog-node 4.10.1 → 4.11.0
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 +20 -6
- package/lib/index.cjs.js +437 -114
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +323 -26
- package/lib/index.esm.js +419 -114
- package/lib/index.esm.js.map +1 -1
- package/lib/posthog-core/src/featureFlagUtils.d.ts +34 -0
- package/lib/posthog-core/src/index.d.ts +32 -7
- package/lib/posthog-core/src/types.d.ts +109 -18
- package/lib/posthog-node/src/crypto-helpers.d.ts +3 -0
- package/lib/posthog-node/src/crypto.d.ts +2 -0
- package/lib/posthog-node/src/feature-flags.d.ts +10 -10
- package/lib/posthog-node/src/lazy.d.ts +23 -0
- package/lib/posthog-node/src/posthog-node.d.ts +5 -4
- package/lib/posthog-node/src/types.d.ts +3 -3
- package/lib/posthog-node/test/test-utils.d.ts +4 -1
- package/package.json +1 -1
- package/src/crypto-helpers.ts +36 -0
- package/src/crypto.ts +22 -0
- package/src/feature-flags.ts +119 -91
- package/src/lazy.ts +55 -0
- package/src/posthog-node.ts +44 -27
- package/src/types.ts +3 -3
- package/test/crypto.spec.ts +36 -0
- package/test/feature-flags.decide.spec.ts +293 -0
- package/test/feature-flags.spec.ts +2 -2
- package/test/lazy.spec.ts +71 -0
- package/test/posthog-node.spec.ts +49 -18
- package/test/test-utils.ts +27 -1
- package/benchmarks/rusha-vs-native.mjs +0 -70
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,32 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 4.11.0 - 2025-03-28
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Added
|
|
4
|
+
|
|
5
|
+
1. `$feature_flag_called` event now includes additional properties such as `feature_flag_id`, `feature_flag_version`, `feature_flag_reason`, and `feature_flag_request_id`.
|
|
6
|
+
|
|
7
|
+
## Fixed
|
|
8
|
+
|
|
9
|
+
1. apiKey cannot be empty.
|
|
10
|
+
|
|
11
|
+
# 4.10.2 - 2025-03-06
|
|
12
|
+
|
|
13
|
+
1. Add: log error message when feature flags have computation errors.
|
|
14
|
+
|
|
15
|
+
# 4.10.1 – 2025-03-06
|
|
4
16
|
|
|
5
17
|
1. Fix: only set `platform` on PostHog exception frame properties
|
|
18
|
+
1. Fix: prevent fetch floods when rate-limited.
|
|
19
|
+
|
|
6
20
|
|
|
7
|
-
# 4.10.0 –
|
|
21
|
+
# 4.10.0 – 2025-03-06
|
|
8
22
|
|
|
9
23
|
1. Attach requestId to $feature_flag_called if present in /decide response
|
|
10
24
|
|
|
11
|
-
# 4.9.0 –
|
|
25
|
+
# 4.9.0 – 2025-03-04
|
|
12
26
|
|
|
13
27
|
1. Allow feature flags to be evaluated individually when local evaluation is not being used
|
|
14
28
|
|
|
15
|
-
# 4.8.1 –
|
|
29
|
+
# 4.8.1 – 2025-02-26
|
|
16
30
|
|
|
17
31
|
1. Supports gracefully handling quotaLimited responses from the PostHog API for feature flag evaluation
|
|
18
32
|
|
|
@@ -295,4 +309,4 @@ Breaking changes:
|
|
|
295
309
|
What's new:
|
|
296
310
|
|
|
297
311
|
1. You can now evaluate feature flags locally (i.e. without sending a request to your PostHog servers) by setting a personal API key, and passing in groups and person properties to `isFeatureEnabled` and `getFeatureFlag` calls.
|
|
298
|
-
2. Introduces a `getAllFlags` method that returns all feature flags. This is useful for when you want to seed your frontend with some initial flags, given a user ID.
|
|
312
|
+
2. Introduces a `getAllFlags` method that returns all feature flags. This is useful for when you want to seed your frontend with some initial flags, given a user ID.
|