Socket
Socket
Sign inDemoInstall

@segment/analytics-core

Package Overview
Dependencies
Maintainers
251
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@segment/analytics-core - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

6

CHANGELOG.md
# @segment/analytics-core
## 1.2.3
### Patch Changes
- [#805](https://github.com/segmentio/analytics-next/pull/805) [`afb027a`](https://github.com/segmentio/analytics-next/commit/afb027a5b6287fa520283172392b0c39a628a6ae) Thanks [@silesky](https://github.com/silesky)! - Upgrade typescript
## 1.2.2

@@ -4,0 +10,0 @@

4

dist/types/analytics/dispatch.d.ts

@@ -5,3 +5,3 @@ import { CoreContext } from '../context';

import { Emitter } from '../emitter';
export declare type DispatchOptions<Ctx extends CoreContext = CoreContext> = {
export type DispatchOptions<Ctx extends CoreContext = CoreContext> = {
timeout?: number;

@@ -11,3 +11,3 @@ debug?: boolean;

};
export declare const getDelay: (startTimeInEpochMS: number, timeoutInMS?: number | undefined) => number;
export declare const getDelay: (startTimeInEpochMS: number, timeoutInMS?: number) => number;
/**

@@ -14,0 +14,0 @@ * Push an event into the dispatch queue and invoke any callbacks.

@@ -1,4 +0,4 @@

declare type EventName = string;
declare type EventFnArgs = any[];
declare type EmitterContract = Record<EventName, EventFnArgs>;
type EventName = string;
type EventFnArgs = any[];
type EmitterContract = Record<EventName, EventFnArgs>;
/**

@@ -5,0 +5,0 @@ * Event Emitter that takes the expected contract as a generic

@@ -16,3 +16,3 @@ import { CoreContext } from '../context';

}
export declare type CoreEmitterContract<Ctx extends CoreContext, Err extends CoreEmittedError<Ctx> = CoreEmittedError<Ctx>> = {
export type CoreEmitterContract<Ctx extends CoreContext, Err extends CoreEmittedError<Ctx> = CoreEmittedError<Ctx>> = {
alias: [ctx: Ctx];

@@ -19,0 +19,0 @@ track: [ctx: Ctx];

import { CoreContext } from '../context';
import { ID } from '../user';
import { DeepNullable } from '../utils/ts-helpers';
export declare type Callback<Ctx extends CoreContext = CoreContext> = (ctx: Ctx) => Promise<unknown> | unknown;
export declare type SegmentEventType = 'track' | 'page' | 'identify' | 'group' | 'alias' | 'screen';
export declare type JSONPrimitive = string | number | boolean | null;
export declare type JSONValue = JSONPrimitive | JSONObject | JSONArray;
export declare type JSONObject = {
export type Callback<Ctx extends CoreContext = CoreContext> = (ctx: Ctx) => Promise<unknown> | unknown;
export type SegmentEventType = 'track' | 'page' | 'identify' | 'group' | 'alias' | 'screen';
export type JSONPrimitive = string | number | boolean | null;
export type JSONValue = JSONPrimitive | JSONObject | JSONArray;
export type JSONObject = {
[member: string]: JSONValue;
};
export declare type JSONArray = JSONValue[];
export declare type EventProperties = Record<string, any>;
export declare type Integrations = {
export type JSONArray = JSONValue[];
export type EventProperties = Record<string, any>;
export type Integrations = {
All?: boolean;

@@ -181,3 +181,3 @@ [integration: string]: boolean | JSONObject | undefined;

}
export declare type Timestamp = Date | string;
export type Timestamp = Date | string;
/**

@@ -207,4 +207,4 @@ * A Plan allows users to specify events and which destinations they would like them to be sent to

}
declare type DbId = string | number;
declare type PhoneNumber = string | number;
type DbId = string | number;
type PhoneNumber = string | number;
/**

@@ -215,3 +215,3 @@ * Traits are pieces of information you know about a group.

*/
declare type BaseGroupTraits = DeepNullable<{
type BaseGroupTraits = DeepNullable<{
/**

@@ -271,3 +271,3 @@ * Street address of a group.

*/
declare type BaseUserTraits = DeepNullable<{
type BaseUserTraits = DeepNullable<{
/**

@@ -370,3 +370,3 @@ * Unique ID in your database for a user

*/
export declare type GroupTraits = BaseGroupTraits & {
export type GroupTraits = BaseGroupTraits & {
[customTrait: string]: any;

@@ -379,3 +379,3 @@ };

*/
export declare type UserTraits = BaseUserTraits & {
export type UserTraits = BaseUserTraits & {
[customTrait: string]: any;

@@ -386,4 +386,4 @@ };

*/
export declare type Traits = UserTraits | GroupTraits;
export type Traits = UserTraits | GroupTraits;
export {};
//# sourceMappingURL=interfaces.d.ts.map

@@ -1,3 +0,3 @@

export declare type LogLevel = 'debug' | 'info' | 'warn' | 'error';
export declare type LogMessage = {
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
export type LogMessage = {
level: LogLevel;

@@ -4,0 +4,0 @@ message: string;

@@ -7,3 +7,3 @@ import type { CoreAnalytics } from '../analytics';

}
export declare type PluginType = 'before' | 'after' | 'destination' | 'enrichment' | 'utility';
export type PluginType = 'before' | 'after' | 'destination' | 'enrichment' | 'utility';
export interface CorePlugin<Ctx extends CoreContext = CoreContext, Analytics extends CoreAnalytics = any> {

@@ -10,0 +10,0 @@ name: string;

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

declare type BackoffParams = {
type BackoffParams = {
/** The number of milliseconds before starting the first retry. Default is 500 */

@@ -3,0 +3,0 @@ minTimeout?: number;

@@ -7,3 +7,3 @@ import { CoreAnalytics } from '../analytics';

import { TaskGroup } from '../task/task-group';
export declare type EventQueueEmitterContract<Ctx extends CoreContext> = {
export type EventQueueEmitterContract<Ctx extends CoreContext> = {
message_delivered: [ctx: Ctx];

@@ -10,0 +10,0 @@ message_enriched: [ctx: Ctx, plugin: CorePlugin<Ctx>];

@@ -1,3 +0,3 @@

declare type CompactMetricType = 'g' | 'c';
export declare type CoreMetricType = 'gauge' | 'counter';
type CompactMetricType = 'g' | 'c';
export type CoreMetricType = 'gauge' | 'counter';
export interface CoreMetric {

@@ -4,0 +4,0 @@ metric: string;

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

export declare type TaskGroup = {
export type TaskGroup = {
done: () => Promise<void>;

@@ -3,0 +3,0 @@ run: <Operation extends (...args: any[]) => any>(op: Operation) => ReturnType<Operation>;

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

export declare type ID = string | null | undefined;
export type ID = string | null | undefined;
export interface User {

@@ -3,0 +3,0 @@ id(): ID;

@@ -1,4 +0,4 @@

declare type Grouper<T> = (obj: T) => string | number;
type Grouper<T> = (obj: T) => string | number;
export declare function groupBy<T>(collection: T[], grouper: keyof T | Grouper<T>): Record<string, T[]>;
export {};
//# sourceMappingURL=group-by.d.ts.map

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

export declare const pickBy: <T, K extends keyof T>(obj: T, fn: (key: K, v: T[K]) => boolean) => Partial<T>;
export declare const pickBy: <T extends object, K extends keyof T>(obj: T, fn: (key: K, v: T[K]) => boolean) => Partial<T>;
//# sourceMappingURL=pick.d.ts.map
/**
* Remove Index Signature
*/
export declare type RemoveIndexSignature<T> = {
export type RemoveIndexSignature<T> = {
[K in keyof T as {} extends Record<K, 1> ? never : K]: T[K];

@@ -10,5 +10,5 @@ };

*/
export declare type DeepNullable<T> = {
export type DeepNullable<T> = {
[K in keyof T]: T[K] extends object ? DeepNullable<T[K]> | null : T[K] | null;
};
//# sourceMappingURL=ts-helpers.d.ts.map
{
"name": "@segment/analytics-core",
"version": "1.2.2",
"version": "1.2.3",
"repository": {

@@ -33,3 +33,3 @@ "type": "git",

},
"packageManager": "yarn@3.2.1",
"packageManager": "yarn@3.4.1",
"dependencies": {

@@ -36,0 +36,0 @@ "@lukeed/uuid": "^2.0.0",

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

export const pickBy = <T, K extends keyof T>(
export const pickBy = <T extends object, K extends keyof T>(
obj: T,

@@ -3,0 +3,0 @@ fn: (key: K, v: T[K]) => boolean

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

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

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

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