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/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare type PostHogCoreOptions = {
|
|
2
|
-
/** PostHog API host, usually 'https://
|
|
2
|
+
/** PostHog API host, usually 'https://us.i.posthog.com' or 'https://eu.i.posthog.com' */
|
|
3
3
|
host?: string;
|
|
4
4
|
/** The number of events to queue before sending to PostHog (flushing) */
|
|
5
5
|
flushAt?: number;
|
package/lib/index.esm.js
CHANGED
|
@@ -952,7 +952,7 @@ class PostHogCoreStateless {
|
|
|
952
952
|
this._isInitialized = false;
|
|
953
953
|
assert(apiKey, "You must pass your PostHog project's api key.");
|
|
954
954
|
this.apiKey = apiKey;
|
|
955
|
-
this.host = removeTrailingSlash(options?.host || 'https://
|
|
955
|
+
this.host = removeTrailingSlash(options?.host || 'https://us.i.posthog.com');
|
|
956
956
|
this.flushAt = options?.flushAt ? Math.max(options?.flushAt, 1) : 20;
|
|
957
957
|
this.maxBatchSize = Math.max(this.flushAt, options?.maxBatchSize ?? 100);
|
|
958
958
|
this.maxQueueSize = Math.max(this.flushAt, options?.maxQueueSize ?? 1000);
|
|
@@ -1836,7 +1836,7 @@ class PostHogCore extends PostHogCoreStateless {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
}
|
|
1838
1838
|
|
|
1839
|
-
var version = "3.0.
|
|
1839
|
+
var version = "3.0.2";
|
|
1840
1840
|
|
|
1841
1841
|
function getContext(window) {
|
|
1842
1842
|
let context = {};
|
|
@@ -2168,7 +2168,7 @@ const createMemoryStorage = () => {
|
|
|
2168
2168
|
|
|
2169
2169
|
const getStorage = (type, window) => {
|
|
2170
2170
|
if (window) {
|
|
2171
|
-
if (!
|
|
2171
|
+
if (!localStore) {
|
|
2172
2172
|
const _localStore = createStorageLike(window.localStorage);
|
|
2173
2173
|
|
|
2174
2174
|
localStore = checkStoreIsSupported(_localStore) ? _localStore : undefined;
|