Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

posthog-js-lite

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

posthog-js-lite - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 2.6.0 - 2024-01-18
1. Adds support for overriding the event `uuid` via capture options
# 2.5.0 - 2023-12-04

@@ -2,0 +6,0 @@

28

lib/index.d.ts

@@ -47,3 +47,6 @@ declare type PosthogCoreOptions = {

};
declare type PosthogCaptureOptions = {
declare type PostHogCaptureOptions = {
/** If provided overrides the auto-generated event ID */
uuid?: string;
/** If provided overrides the auto-generated timestamp */
timestamp?: Date;

@@ -117,5 +120,5 @@ disableGeoip?: boolean;

private debugMode;
private pendingPromises;
private disableGeoip;
private _optoutOverride;
private pendingPromises;
protected _events: SimpleEventEmitter;

@@ -138,16 +141,17 @@ protected _flushTimer?: any;

private buildPayload;
protected addPendingPromise(promise: Promise<any>): void;
/***
*** TRACKING
***/
protected identifyStateless(distinctId: string, properties?: PostHogEventProperties, options?: PosthogCaptureOptions): this;
protected identifyStateless(distinctId: string, properties?: PostHogEventProperties, options?: PostHogCaptureOptions): this;
protected captureStateless(distinctId: string, event: string, properties?: {
[key: string]: any;
}, options?: PosthogCaptureOptions): this;
}, options?: PostHogCaptureOptions): this;
protected aliasStateless(alias: string, distinctId: string, properties?: {
[key: string]: any;
}, options?: PosthogCaptureOptions): this;
}, options?: PostHogCaptureOptions): this;
/***
*** GROUPS
***/
protected groupIdentifyStateless(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PosthogCaptureOptions, distinctId?: string, eventProperties?: PostHogEventProperties): this;
protected groupIdentifyStateless(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PostHogCaptureOptions, distinctId?: string, eventProperties?: PostHogEventProperties): this;
/***

@@ -169,3 +173,3 @@ *** FEATURE FLAGS

***/
protected enqueue(type: string, _message: any, options?: PosthogCaptureOptions): void;
protected enqueue(type: string, _message: any, options?: PostHogCaptureOptions): void;
flushAsync(): Promise<any>;

@@ -208,8 +212,8 @@ flush(callback?: (err?: any, data?: any) => void): void;

***/
identify(distinctId?: string, properties?: PostHogEventProperties, options?: PosthogCaptureOptions): this;
identify(distinctId?: string, properties?: PostHogEventProperties, options?: PostHogCaptureOptions): this;
capture(event: string, properties?: {
[key: string]: any;
}, options?: PosthogCaptureOptions): this;
}, options?: PostHogCaptureOptions): this;
alias(alias: string): this;
autocapture(eventType: string, elements: PostHogAutocaptureElement[], properties?: PostHogEventProperties, options?: PosthogCaptureOptions): this;
autocapture(eventType: string, elements: PostHogAutocaptureElement[], properties?: PostHogEventProperties, options?: PostHogCaptureOptions): this;
/***

@@ -221,4 +225,4 @@ *** GROUPS

}): this;
group(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PosthogCaptureOptions): this;
groupIdentify(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PosthogCaptureOptions): this;
group(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PostHogCaptureOptions): this;
groupIdentify(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PostHogCaptureOptions): this;
/***

@@ -225,0 +229,0 @@ * PROPERTIES

@@ -1,2 +0,2 @@

import { PostHogFetchOptions, PostHogFetchResponse, PostHogAutocaptureElement, PostHogDecideResponse, PosthogCoreOptions, PostHogEventProperties, PostHogPersistedProperty, PosthogCaptureOptions, JsonType } from './types';
import { PostHogFetchOptions, PostHogFetchResponse, PostHogAutocaptureElement, PostHogDecideResponse, PosthogCoreOptions, PostHogEventProperties, PostHogPersistedProperty, PostHogCaptureOptions, JsonType } from './types';
import { RetriableOptions } from './utils';

@@ -15,5 +15,5 @@ export * as utils from './utils';

private debugMode;
private pendingPromises;
private disableGeoip;
private _optoutOverride;
private pendingPromises;
protected _events: SimpleEventEmitter;

@@ -36,16 +36,17 @@ protected _flushTimer?: any;

private buildPayload;
protected addPendingPromise(promise: Promise<any>): void;
/***
*** TRACKING
***/
protected identifyStateless(distinctId: string, properties?: PostHogEventProperties, options?: PosthogCaptureOptions): this;
protected identifyStateless(distinctId: string, properties?: PostHogEventProperties, options?: PostHogCaptureOptions): this;
protected captureStateless(distinctId: string, event: string, properties?: {
[key: string]: any;
}, options?: PosthogCaptureOptions): this;
}, options?: PostHogCaptureOptions): this;
protected aliasStateless(alias: string, distinctId: string, properties?: {
[key: string]: any;
}, options?: PosthogCaptureOptions): this;
}, options?: PostHogCaptureOptions): this;
/***
*** GROUPS
***/
protected groupIdentifyStateless(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PosthogCaptureOptions, distinctId?: string, eventProperties?: PostHogEventProperties): this;
protected groupIdentifyStateless(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PostHogCaptureOptions, distinctId?: string, eventProperties?: PostHogEventProperties): this;
/***

@@ -67,3 +68,3 @@ *** FEATURE FLAGS

***/
protected enqueue(type: string, _message: any, options?: PosthogCaptureOptions): void;
protected enqueue(type: string, _message: any, options?: PostHogCaptureOptions): void;
flushAsync(): Promise<any>;

@@ -106,8 +107,8 @@ flush(callback?: (err?: any, data?: any) => void): void;

***/
identify(distinctId?: string, properties?: PostHogEventProperties, options?: PosthogCaptureOptions): this;
identify(distinctId?: string, properties?: PostHogEventProperties, options?: PostHogCaptureOptions): this;
capture(event: string, properties?: {
[key: string]: any;
}, options?: PosthogCaptureOptions): this;
}, options?: PostHogCaptureOptions): this;
alias(alias: string): this;
autocapture(eventType: string, elements: PostHogAutocaptureElement[], properties?: PostHogEventProperties, options?: PosthogCaptureOptions): this;
autocapture(eventType: string, elements: PostHogAutocaptureElement[], properties?: PostHogEventProperties, options?: PostHogCaptureOptions): this;
/***

@@ -119,4 +120,4 @@ *** GROUPS

}): this;
group(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PosthogCaptureOptions): this;
groupIdentify(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PosthogCaptureOptions): this;
group(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PostHogCaptureOptions): this;
groupIdentify(groupType: string, groupKey: string | number, groupProperties?: PostHogEventProperties, options?: PostHogCaptureOptions): this;
/***

@@ -123,0 +124,0 @@ * PROPERTIES

@@ -47,3 +47,6 @@ export declare type PosthogCoreOptions = {

};
export declare type PosthogCaptureOptions = {
export declare type PostHogCaptureOptions = {
/** If provided overrides the auto-generated event ID */
uuid?: string;
/** If provided overrides the auto-generated timestamp */
timestamp?: Date;

@@ -50,0 +53,0 @@ disableGeoip?: boolean;

{
"name": "posthog-js-lite",
"version": "2.5.0",
"version": "2.6.0",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"types": "lib/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/PostHog/posthog-js-lite.git",
"directory": "posthog-web"
},
"scripts": {

@@ -8,0 +13,0 @@ "test": "jest -c jest.config.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc