posthog-js-lite 2.0.0-alpha2 → 2.0.0-alpha3
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.cjs.js +6 -8
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +6 -8
- package/lib/index.esm.js.map +1 -1
- package/package.json +6 -2
- package/src/posthog-web.ts +3 -3
- package/src/storage.ts +2 -3
package/lib/index.esm.js
CHANGED
|
@@ -1311,7 +1311,7 @@ var cookieStore = {
|
|
|
1311
1311
|
var cdomain = '',
|
|
1312
1312
|
expires = '',
|
|
1313
1313
|
secure = '';
|
|
1314
|
-
var new_cookie_val = key + '=' + encodeURIComponent(
|
|
1314
|
+
var new_cookie_val = key + '=' + encodeURIComponent(value) + expires + '; path=/' + cdomain + secure;
|
|
1315
1315
|
document.cookie = new_cookie_val;
|
|
1316
1316
|
} catch (err) {
|
|
1317
1317
|
return;
|
|
@@ -1351,7 +1351,7 @@ var createStorageLike = function (store) {
|
|
|
1351
1351
|
return store.getItem(key);
|
|
1352
1352
|
},
|
|
1353
1353
|
setItem: function (key, value) {
|
|
1354
|
-
store.setItem(key,
|
|
1354
|
+
store.setItem(key, value);
|
|
1355
1355
|
},
|
|
1356
1356
|
removeItem: function (key) {
|
|
1357
1357
|
store.removeItem(key);
|
|
@@ -1401,7 +1401,7 @@ var checkStoreIsSupported = function (storage, key) {
|
|
|
1401
1401
|
var localStore = checkStoreIsSupported(_localStore) ? _localStore : undefined;
|
|
1402
1402
|
var sessionStorage = checkStoreIsSupported(_sessionStore) ? _sessionStore : undefined;
|
|
1403
1403
|
|
|
1404
|
-
var version = "2.0.0-
|
|
1404
|
+
var version = "2.0.0-alpha3";
|
|
1405
1405
|
|
|
1406
1406
|
var PostHog =
|
|
1407
1407
|
/** @class */
|
|
@@ -1432,13 +1432,11 @@ function (_super) {
|
|
|
1432
1432
|
|
|
1433
1433
|
if (value === null) {
|
|
1434
1434
|
delete this._storageCache[key];
|
|
1435
|
-
|
|
1436
|
-
this._storage.removeItem(this._storageKey);
|
|
1437
1435
|
} else {
|
|
1438
1436
|
this._storageCache[key] = value;
|
|
1439
|
-
|
|
1440
|
-
this._storage.setItem(this._storageKey, JSON.stringify(this._storageCache));
|
|
1441
1437
|
}
|
|
1438
|
+
|
|
1439
|
+
this._storage.setItem(this._storageKey, JSON.stringify(this._storageCache));
|
|
1442
1440
|
};
|
|
1443
1441
|
|
|
1444
1442
|
PostHog.prototype.fetch = function (url, options) {
|
|
@@ -1446,7 +1444,7 @@ function (_super) {
|
|
|
1446
1444
|
};
|
|
1447
1445
|
|
|
1448
1446
|
PostHog.prototype.getLibraryId = function () {
|
|
1449
|
-
return 'posthog-
|
|
1447
|
+
return 'posthog-js-lite';
|
|
1450
1448
|
};
|
|
1451
1449
|
|
|
1452
1450
|
PostHog.prototype.getLibraryVersion = function () {
|