posthog-js-lite 3.0.1 → 3.0.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 +10 -0
- package/lib/index.cjs.js +3 -3
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.esm.js +3 -3
- package/lib/index.esm.js.map +1 -1
- package/lib/posthog-core/src/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/storage.ts +1 -1
- package/test/posthog-web.spec.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# 3.0.2 - 2024-06-15
|
|
2
|
+
|
|
3
|
+
## Fixed
|
|
4
|
+
|
|
5
|
+
1. Fixed and error that prevented localstorage from ever being used and instead falling back to sessionstorage for persistence
|
|
6
|
+
|
|
7
|
+
## Changed
|
|
8
|
+
|
|
9
|
+
1. chore: change host to new address.
|
|
10
|
+
|
|
1
11
|
# 3.0.1 - 2024-04-25
|
|
2
12
|
|
|
3
13
|
1. Prevent double JSON parsing of feature flag payloads, which would convert the payload [1] into 1.
|
package/lib/index.cjs.js
CHANGED
|
@@ -956,7 +956,7 @@ class PostHogCoreStateless {
|
|
|
956
956
|
this._isInitialized = false;
|
|
957
957
|
assert(apiKey, "You must pass your PostHog project's api key.");
|
|
958
958
|
this.apiKey = apiKey;
|
|
959
|
-
this.host = removeTrailingSlash(options?.host || 'https://
|
|
959
|
+
this.host = removeTrailingSlash(options?.host || 'https://us.i.posthog.com');
|
|
960
960
|
this.flushAt = options?.flushAt ? Math.max(options?.flushAt, 1) : 20;
|
|
961
961
|
this.maxBatchSize = Math.max(this.flushAt, options?.maxBatchSize ?? 100);
|
|
962
962
|
this.maxQueueSize = Math.max(this.flushAt, options?.maxQueueSize ?? 1000);
|
|
@@ -1840,7 +1840,7 @@ class PostHogCore extends PostHogCoreStateless {
|
|
|
1840
1840
|
}
|
|
1841
1841
|
}
|
|
1842
1842
|
|
|
1843
|
-
var version = "3.0.
|
|
1843
|
+
var version = "3.0.2";
|
|
1844
1844
|
|
|
1845
1845
|
function getContext(window) {
|
|
1846
1846
|
let context = {};
|
|
@@ -2172,7 +2172,7 @@ const createMemoryStorage = () => {
|
|
|
2172
2172
|
|
|
2173
2173
|
const getStorage = (type, window) => {
|
|
2174
2174
|
if (window) {
|
|
2175
|
-
if (!
|
|
2175
|
+
if (!localStore) {
|
|
2176
2176
|
const _localStore = createStorageLike(window.localStorage);
|
|
2177
2177
|
|
|
2178
2178
|
localStore = checkStoreIsSupported(_localStore) ? _localStore : undefined;
|