Socket
Socket
Sign inDemoInstall

@segment/analytics-node

Package Overview
Dependencies
Maintainers
284
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@segment/analytics-node - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

20

dist/cjs/app/analytics-node.js

@@ -111,3 +111,3 @@ "use strict";

*/
alias({ userId, previousId, context, timestamp, integrations }, callback) {
alias({ userId, previousId, context, timestamp, integrations, messageId, }, callback) {
const segmentEvent = this._eventFactory.alias(userId, previousId, {

@@ -117,2 +117,3 @@ context,

timestamp,
messageId,
});

@@ -125,3 +126,3 @@ this._dispatch(segmentEvent, callback);

*/
group({ timestamp, groupId, userId, anonymousId, traits = {}, context, integrations, }, callback) {
group({ timestamp, groupId, userId, anonymousId, traits = {}, context, integrations, messageId, }, callback) {
const segmentEvent = this._eventFactory.group(groupId, traits, {

@@ -133,2 +134,3 @@ context,

integrations,
messageId,
});

@@ -141,3 +143,3 @@ this._dispatch(segmentEvent, callback);

*/
identify({ userId, anonymousId, traits = {}, context, timestamp, integrations, }, callback) {
identify({ userId, anonymousId, traits = {}, context, timestamp, integrations, messageId, }, callback) {
const segmentEvent = this._eventFactory.identify(userId, traits, {

@@ -149,2 +151,3 @@ context,

integrations,
messageId,
});

@@ -157,4 +160,4 @@ this._dispatch(segmentEvent, callback);

*/
page({ userId, anonymousId, category, name, properties, context, timestamp, integrations, }, callback) {
const segmentEvent = this._eventFactory.page(category ?? null, name ?? null, properties, { context, anonymousId, userId, timestamp, integrations });
page({ userId, anonymousId, category, name, properties, context, timestamp, integrations, messageId, }, callback) {
const segmentEvent = this._eventFactory.page(category ?? null, name ?? null, properties, { context, anonymousId, userId, timestamp, integrations, messageId });
this._dispatch(segmentEvent, callback);

@@ -168,4 +171,4 @@ }

*/
screen({ userId, anonymousId, category, name, properties, context, timestamp, integrations, }, callback) {
const segmentEvent = this._eventFactory.screen(category ?? null, name ?? null, properties, { context, anonymousId, userId, timestamp, integrations });
screen({ userId, anonymousId, category, name, properties, context, timestamp, integrations, messageId, }, callback) {
const segmentEvent = this._eventFactory.screen(category ?? null, name ?? null, properties, { context, anonymousId, userId, timestamp, integrations, messageId });
this._dispatch(segmentEvent, callback);

@@ -177,3 +180,3 @@ }

*/
track({ userId, anonymousId, event, properties, context, timestamp, integrations, }, callback) {
track({ userId, anonymousId, event, properties, context, timestamp, integrations, messageId, }, callback) {
const segmentEvent = this._eventFactory.track(event, properties, {

@@ -185,2 +188,3 @@ context,

integrations,
messageId,
});

@@ -187,0 +191,0 @@ this._dispatch(segmentEvent, callback);

2

dist/cjs/generated/version.js

@@ -5,3 +5,3 @@ "use strict";

// This file is generated.
exports.version = '2.0.0';
exports.version = '2.1.0';
//# sourceMappingURL=version.js.map

@@ -108,3 +108,3 @@ import { bindAll, pTimeout } from '@segment/analytics-core';

*/
alias({ userId, previousId, context, timestamp, integrations }, callback) {
alias({ userId, previousId, context, timestamp, integrations, messageId, }, callback) {
const segmentEvent = this._eventFactory.alias(userId, previousId, {

@@ -114,2 +114,3 @@ context,

timestamp,
messageId,
});

@@ -122,3 +123,3 @@ this._dispatch(segmentEvent, callback);

*/
group({ timestamp, groupId, userId, anonymousId, traits = {}, context, integrations, }, callback) {
group({ timestamp, groupId, userId, anonymousId, traits = {}, context, integrations, messageId, }, callback) {
const segmentEvent = this._eventFactory.group(groupId, traits, {

@@ -130,2 +131,3 @@ context,

integrations,
messageId,
});

@@ -138,3 +140,3 @@ this._dispatch(segmentEvent, callback);

*/
identify({ userId, anonymousId, traits = {}, context, timestamp, integrations, }, callback) {
identify({ userId, anonymousId, traits = {}, context, timestamp, integrations, messageId, }, callback) {
const segmentEvent = this._eventFactory.identify(userId, traits, {

@@ -146,2 +148,3 @@ context,

integrations,
messageId,
});

@@ -154,4 +157,4 @@ this._dispatch(segmentEvent, callback);

*/
page({ userId, anonymousId, category, name, properties, context, timestamp, integrations, }, callback) {
const segmentEvent = this._eventFactory.page(category ?? null, name ?? null, properties, { context, anonymousId, userId, timestamp, integrations });
page({ userId, anonymousId, category, name, properties, context, timestamp, integrations, messageId, }, callback) {
const segmentEvent = this._eventFactory.page(category ?? null, name ?? null, properties, { context, anonymousId, userId, timestamp, integrations, messageId });
this._dispatch(segmentEvent, callback);

@@ -165,4 +168,4 @@ }

*/
screen({ userId, anonymousId, category, name, properties, context, timestamp, integrations, }, callback) {
const segmentEvent = this._eventFactory.screen(category ?? null, name ?? null, properties, { context, anonymousId, userId, timestamp, integrations });
screen({ userId, anonymousId, category, name, properties, context, timestamp, integrations, messageId, }, callback) {
const segmentEvent = this._eventFactory.screen(category ?? null, name ?? null, properties, { context, anonymousId, userId, timestamp, integrations, messageId });
this._dispatch(segmentEvent, callback);

@@ -174,3 +177,3 @@ }

*/
track({ userId, anonymousId, event, properties, context, timestamp, integrations, }, callback) {
track({ userId, anonymousId, event, properties, context, timestamp, integrations, messageId, }, callback) {
const segmentEvent = this._eventFactory.track(event, properties, {

@@ -182,2 +185,3 @@ context,

integrations,
messageId,
});

@@ -184,0 +188,0 @@ this._dispatch(segmentEvent, callback);

// This file is generated.
export const version = '2.0.0';
export const version = '2.1.0';
//# sourceMappingURL=version.js.map

@@ -34,3 +34,3 @@ import { CoreAnalytics } from '@segment/analytics-core';

*/
alias({ userId, previousId, context, timestamp, integrations }: AliasParams, callback?: Callback): void;
alias({ userId, previousId, context, timestamp, integrations, messageId, }: AliasParams, callback?: Callback): void;
/**

@@ -40,3 +40,3 @@ * Associates an identified user with a collective.

*/
group({ timestamp, groupId, userId, anonymousId, traits, context, integrations, }: GroupParams, callback?: Callback): void;
group({ timestamp, groupId, userId, anonymousId, traits, context, integrations, messageId, }: GroupParams, callback?: Callback): void;
/**

@@ -46,3 +46,3 @@ * Includes a unique userId and (maybe anonymousId) and any optional traits you know about them.

*/
identify({ userId, anonymousId, traits, context, timestamp, integrations, }: IdentifyParams, callback?: Callback): void;
identify({ userId, anonymousId, traits, context, timestamp, integrations, messageId, }: IdentifyParams, callback?: Callback): void;
/**

@@ -52,3 +52,3 @@ * The page method lets you record page views on your website, along with optional extra information about the page being viewed.

*/
page({ userId, anonymousId, category, name, properties, context, timestamp, integrations, }: PageParams, callback?: Callback): void;
page({ userId, anonymousId, category, name, properties, context, timestamp, integrations, messageId, }: PageParams, callback?: Callback): void;
/**

@@ -60,3 +60,3 @@ * Records screen views on your app, along with optional extra information

*/
screen({ userId, anonymousId, category, name, properties, context, timestamp, integrations, }: PageParams, callback?: Callback): void;
screen({ userId, anonymousId, category, name, properties, context, timestamp, integrations, messageId, }: PageParams, callback?: Callback): void;
/**

@@ -66,3 +66,3 @@ * Records actions your users perform.

*/
track({ userId, anonymousId, event, properties, context, timestamp, integrations, }: TrackParams, callback?: Callback): void;
track({ userId, anonymousId, event, properties, context, timestamp, integrations, messageId, }: TrackParams, callback?: Callback): void;
/**

@@ -69,0 +69,0 @@ * Registers one or more plugins to augment Analytics functionality.

@@ -25,2 +25,7 @@ import type { GroupTraits, UserTraits, CoreExtraContext, EventProperties, Integrations, Timestamp } from '@segment/analytics-core';

integrations?: Integrations;
/**
* Override the default messageId for the purposes of deduping events. Using a uuid library is strongly encouraged.
* @link https://segment.com/docs/partners/faqs/#does-segment-de-dupe-messages
*/
messageId?: string;
};

@@ -38,2 +43,7 @@ export type GroupParams = {

integrations?: Integrations;
/**
* Override the default messageId for the purposes of deduping events. Using a uuid library is strongly encouraged.
* @link https://segment.com/docs/partners/faqs/#does-segment-de-dupe-messages
*/
messageId?: string;
} & IdentityOptions;

@@ -50,2 +60,7 @@ export type IdentifyParams = {

integrations?: Integrations;
/**
* Override the default messageId for the purposes of deduping events. Using a uuid library is strongly encouraged.
* @link https://segment.com/docs/partners/faqs/#does-segment-de-dupe-messages
*/
messageId?: string;
} & IdentityOptions;

@@ -59,2 +74,7 @@ export type PageParams = {

integrations?: Integrations;
/**
* Override the default messageId for the purposes of deduping events. Using a uuid library is strongly encouraged.
* @link https://segment.com/docs/partners/faqs/#does-segment-de-dupe-messages
*/
messageId?: string;
} & IdentityOptions;

@@ -67,2 +87,7 @@ export type TrackParams = {

integrations?: Integrations;
/**
* Override the default messageId for the purposes of deduping events. Using a uuid library is strongly encouraged.
* @link https://segment.com/docs/partners/faqs/#does-segment-de-dupe-messages
*/
messageId?: string;
} & IdentityOptions;

@@ -69,0 +94,0 @@ export type FlushParams = {

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

export declare const version = "2.0.0";
export declare const version = "2.1.0";
//# sourceMappingURL=version.d.ts.map
{
"name": "@segment/analytics-node",
"version": "2.0.0",
"version": "2.1.0",
"main": "./dist/cjs/index.js",

@@ -39,4 +39,4 @@ "module": "./dist/esm/index.js",

"@lukeed/uuid": "^2.0.0",
"@segment/analytics-core": "1.4.1",
"@segment/analytics-generic-utils": "1.1.1",
"@segment/analytics-core": "1.5.0",
"@segment/analytics-generic-utils": "1.2.0",
"buffer": "^6.0.3",

@@ -43,0 +43,0 @@ "jose": "^5.1.0",

@@ -13,7 +13,7 @@ # @segment/analytics-node

## Runtime Support
- Node.js >= 14
- Node.js >= 18
- AWS Lambda
- Cloudflare Workers
- Vercel Edge Functions
- Web Workers (experimental)
- Web Workers / Browser (no device mode destination support)

@@ -20,0 +20,0 @@ ## Quick Start

@@ -151,3 +151,10 @@ import { CoreAnalytics, bindAll, pTimeout } from '@segment/analytics-core'

alias(
{ userId, previousId, context, timestamp, integrations }: AliasParams,
{
userId,
previousId,
context,
timestamp,
integrations,
messageId,
}: AliasParams,
callback?: Callback

@@ -159,2 +166,3 @@ ): void {

timestamp,
messageId,
})

@@ -177,2 +185,3 @@ this._dispatch(segmentEvent, callback)

integrations,
messageId,
}: GroupParams,

@@ -187,2 +196,3 @@ callback?: Callback

integrations,
messageId,
})

@@ -205,2 +215,3 @@

integrations,
messageId,
}: IdentifyParams,

@@ -215,2 +226,3 @@ callback?: Callback

integrations,
messageId,
})

@@ -234,2 +246,3 @@ this._dispatch(segmentEvent, callback)

integrations,
messageId,
}: PageParams,

@@ -242,3 +255,3 @@ callback?: Callback

properties,
{ context, anonymousId, userId, timestamp, integrations }
{ context, anonymousId, userId, timestamp, integrations, messageId }
)

@@ -264,2 +277,3 @@ this._dispatch(segmentEvent, callback)

integrations,
messageId,
}: PageParams,

@@ -272,3 +286,3 @@ callback?: Callback

properties,
{ context, anonymousId, userId, timestamp, integrations }
{ context, anonymousId, userId, timestamp, integrations, messageId }
)

@@ -292,2 +306,3 @@

integrations,
messageId,
}: TrackParams,

@@ -302,2 +317,3 @@ callback?: Callback

integrations,
messageId,
})

@@ -304,0 +320,0 @@

@@ -33,2 +33,7 @@ import type {

integrations?: Integrations
/**
* Override the default messageId for the purposes of deduping events. Using a uuid library is strongly encouraged.
* @link https://segment.com/docs/partners/faqs/#does-segment-de-dupe-messages
*/
messageId?: string
}

@@ -47,2 +52,7 @@

integrations?: Integrations
/**
* Override the default messageId for the purposes of deduping events. Using a uuid library is strongly encouraged.
* @link https://segment.com/docs/partners/faqs/#does-segment-de-dupe-messages
*/
messageId?: string
} & IdentityOptions

@@ -60,2 +70,7 @@

integrations?: Integrations
/**
* Override the default messageId for the purposes of deduping events. Using a uuid library is strongly encouraged.
* @link https://segment.com/docs/partners/faqs/#does-segment-de-dupe-messages
*/
messageId?: string
} & IdentityOptions

@@ -73,2 +88,7 @@

integrations?: Integrations
/**
* Override the default messageId for the purposes of deduping events. Using a uuid library is strongly encouraged.
* @link https://segment.com/docs/partners/faqs/#does-segment-de-dupe-messages
*/
messageId?: string
} & IdentityOptions

@@ -82,2 +102,7 @@

integrations?: Integrations
/**
* Override the default messageId for the purposes of deduping events. Using a uuid library is strongly encouraged.
* @link https://segment.com/docs/partners/faqs/#does-segment-de-dupe-messages
*/
messageId?: string
} & IdentityOptions

@@ -84,0 +109,0 @@

// This file is generated.
export const version = '2.0.0'
export const version = '2.1.0'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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