posthog-node 3.6.1 → 3.6.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 +5 -1
- package/README.md +1 -1
- package/lib/index.cjs.js +400 -25
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +400 -25
- package/lib/index.esm.js.map +1 -1
- package/lib/posthog-core/src/utils.d.ts +0 -1
- package/package.json +1 -1
- package/test/posthog-node.spec.ts +2 -2
|
@@ -6,7 +6,6 @@ export interface RetriableOptions {
|
|
|
6
6
|
retryCheck?: (err: any) => boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare function retriable<T>(fn: () => Promise<T>, props?: RetriableOptions): Promise<T>;
|
|
9
|
-
export declare function generateUUID(globalThis?: any): string;
|
|
10
9
|
export declare function currentTimestamp(): number;
|
|
11
10
|
export declare function currentISOTime(): string;
|
|
12
11
|
export declare function safeSetTimeout(fn: () => void, timeout: number): any;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ jest.mock('../src/fetch')
|
|
|
4
4
|
import fetch from '../src/fetch'
|
|
5
5
|
import { anyDecideCall, anyLocalEvalCall, apiImplementation } from './feature-flags.spec'
|
|
6
6
|
import { waitForPromises, wait } from '../../posthog-core/test/test-utils/test-utils'
|
|
7
|
-
import {
|
|
7
|
+
import { randomUUID } from 'crypto'
|
|
8
8
|
|
|
9
9
|
jest.mock('../package.json', () => ({ version: '1.2.3' }))
|
|
10
10
|
|
|
@@ -194,7 +194,7 @@ describe('PostHog Node.js', () => {
|
|
|
194
194
|
|
|
195
195
|
it('should allow overriding uuid', async () => {
|
|
196
196
|
expect(mockedFetch).toHaveBeenCalledTimes(0)
|
|
197
|
-
const uuid =
|
|
197
|
+
const uuid = randomUUID()
|
|
198
198
|
posthog.capture({ event: 'custom-time', distinctId: '123', uuid })
|
|
199
199
|
await waitForPromises()
|
|
200
200
|
jest.runOnlyPendingTimers()
|