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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export 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/package.json
CHANGED
package/src/storage.ts
CHANGED
|
@@ -145,7 +145,7 @@ const createMemoryStorage = (): PostHogStorage => {
|
|
|
145
145
|
|
|
146
146
|
export const getStorage = (type: PostHogOptions['persistence'], window: Window | undefined): PostHogStorage => {
|
|
147
147
|
if (window) {
|
|
148
|
-
if (!
|
|
148
|
+
if (!localStore) {
|
|
149
149
|
const _localStore = createStorageLike(window.localStorage)
|
|
150
150
|
localStore = checkStoreIsSupported(_localStore) ? _localStore : undefined
|
|
151
151
|
}
|
package/test/posthog-web.spec.ts
CHANGED
|
@@ -61,7 +61,7 @@ describe('PostHogWeb', () => {
|
|
|
61
61
|
|
|
62
62
|
await waitForPromises()
|
|
63
63
|
|
|
64
|
-
expect(fetch).toHaveBeenCalledWith('https://
|
|
64
|
+
expect(fetch).toHaveBeenCalledWith('https://us.i.posthog.com/decide/?v=3', {
|
|
65
65
|
body: JSON.stringify({
|
|
66
66
|
token: 'TEST_API_KEY',
|
|
67
67
|
distinct_id: posthog.getDistinctId(),
|