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

posthog-js

Package Overview
Dependencies
Maintainers
1
Versions
621
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

posthog-js - npm Package Compare versions

Comparing version 1.157.2 to 1.158.0

4

dist/lib/src/extensions/segment-integration.d.ts

@@ -28,3 +28,3 @@ /**

};
interface SegmentContext {
export interface SegmentContext {
event: {

@@ -38,3 +38,3 @@ event: string;

type SegmentFunction = (ctx: SegmentContext) => Promise<SegmentContext> | SegmentContext;
interface SegmentPlugin {
export interface SegmentPlugin {
name: string;

@@ -41,0 +41,0 @@ version: string;

{
"name": "posthog-js",
"version": "1.157.2",
"version": "1.158.0",
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.",

@@ -71,3 +71,3 @@ "repository": "https://github.com/PostHog/posthog-js",

"compare-versions": "^6.1.0",
"cypress": "13.13.2",
"cypress": "13.6.3",
"cypress-localstorage-commands": "^2.2.6",

@@ -74,0 +74,0 @@ "date-fns": "^3.6.0",

@@ -28,3 +28,3 @@ /**

};
interface SegmentContext {
export interface SegmentContext {
event: {

@@ -38,3 +38,3 @@ event: string;

type SegmentFunction = (ctx: SegmentContext) => Promise<SegmentContext> | SegmentContext;
interface SegmentPlugin {
export interface SegmentPlugin {
name: string;

@@ -41,0 +41,0 @@ version: string;

@@ -16,9 +16,8 @@ import { logger } from '../utils/logger';

// This is our only way of detecting that segment's analytics.reset() has been called so we also call it
logger.info('Segment integration does not have a userId set, resetting PostHog');
posthog.reset();
}
if (ctx.event.userId && ctx.event.userId !== posthog.get_distinct_id()) {
posthog.register({
distinct_id: ctx.event.userId,
});
posthog.reloadFeatureFlags();
logger.info('Segment integration has a userId set, identifying with PostHog');
posthog.identify(ctx.event.userId);
}

@@ -25,0 +24,0 @@ var additionalProperties = posthog._calculate_event_properties(eventName, (_a = ctx.event.properties) !== null && _a !== void 0 ? _a : {}, new Date());

{
"name": "posthog-js",
"version": "1.157.2",
"version": "1.158.0",
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.",

@@ -71,3 +71,3 @@ "repository": "https://github.com/PostHog/posthog-js",

"compare-versions": "^6.1.0",
"cypress": "13.13.2",
"cypress": "13.6.3",
"cypress-localstorage-commands": "^2.2.6",

@@ -74,0 +74,0 @@ "date-fns": "^3.6.0",

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

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

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