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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "posthog-node",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "description": "PostHog Node.js integration",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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 { generateUUID } from 'posthog-core/src/utils'
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 = generateUUID()
197
+ const uuid = randomUUID()
198
198
  posthog.capture({ event: 'custom-time', distinctId: '123', uuid })
199
199
  await waitForPromises()
200
200
  jest.runOnlyPendingTimers()