Socket
Socket
Sign inDemoInstall

@segment/analytics-node

Package Overview
Dependencies
Maintainers
242
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 0.0.1-beta.13 to 0.0.1-beta.14

2

dist/cjs/generated/version.js

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

// This file is generated.
exports.version = '0.0.1-beta.13';
exports.version = '0.0.1-beta.14';
//# sourceMappingURL=version.js.map

@@ -11,5 +11,9 @@ "use strict";

}
// @ts-ignore
if (typeof WebSocketPair !== 'undefined') {
return 'cloudflare-worker';
}
if (
// @ts-ignore
typeof WorkerGlobalScope !== 'undefined' && // this may sometimes be available in a CF worker, so check for importScripts
typeof WorkerGlobalScope !== 'undefined' &&
// @ts-ignore

@@ -16,0 +20,0 @@ typeof importScripts === 'function') {

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

function normalizeEvent(ctx) {
ctx.updateEvent('context.library.name', 'AnalyticsNode');
ctx.updateEvent('context.library.name', '@segment/analytics-node');
ctx.updateEvent('context.library.version', version_1.version);

@@ -15,3 +15,3 @@ const runtime = (0, env_1.detectRuntime)();

}
ctx.updateEvent('_metadata.runtime', runtime);
ctx.updateEvent('_metadata.jsRuntime', runtime);
}

@@ -18,0 +18,0 @@ function createNodePlugin(publisher) {

// This file is generated.
export const version = '0.0.1-beta.13';
export const version = '0.0.1-beta.14';
//# sourceMappingURL=version.js.map

@@ -8,5 +8,9 @@ export const detectRuntime = () => {

}
// @ts-ignore
if (typeof WebSocketPair !== 'undefined') {
return 'cloudflare-worker';
}
if (
// @ts-ignore
typeof WorkerGlobalScope !== 'undefined' && // this may sometimes be available in a CF worker, so check for importScripts
typeof WorkerGlobalScope !== 'undefined' &&
// @ts-ignore

@@ -13,0 +17,0 @@ typeof importScripts === 'function') {

@@ -5,3 +5,3 @@ import { Publisher } from './publisher';

function normalizeEvent(ctx) {
ctx.updateEvent('context.library.name', 'AnalyticsNode');
ctx.updateEvent('context.library.name', '@segment/analytics-node');
ctx.updateEvent('context.library.version', version);

@@ -12,3 +12,3 @@ const runtime = detectRuntime();

}
ctx.updateEvent('_metadata.runtime', runtime);
ctx.updateEvent('_metadata.jsRuntime', runtime);
}

@@ -15,0 +15,0 @@ export function createNodePlugin(publisher) {

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

export declare const version = "0.0.1-beta.13";
export declare const version = "0.0.1-beta.14";
//# sourceMappingURL=version.d.ts.map

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

export declare type RuntimeEnv = 'node' | 'browser' | 'web-worker' | 'unknown';
export declare type RuntimeEnv = 'node' | 'browser' | 'web-worker' | 'cloudflare-worker' | 'unknown';
export declare const detectRuntime: () => RuntimeEnv;
//# sourceMappingURL=env.d.ts.map
{
"name": "@segment/analytics-node",
"version": "0.0.1-beta.13",
"version": "0.0.1-beta.14",
"main": "./dist/cjs/index.js",

@@ -5,0 +5,0 @@ "module": "./dist/esm/index.js",

// This file is generated.
export const version = '0.0.1-beta.13'
export const version = '0.0.1-beta.14'

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

export type RuntimeEnv = 'node' | 'browser' | 'web-worker' | 'unknown'
export type RuntimeEnv =
| 'node'
| 'browser'
| 'web-worker'
| 'cloudflare-worker'
| 'unknown'

@@ -12,5 +17,10 @@ export const detectRuntime = (): RuntimeEnv => {

// @ts-ignore
if (typeof WebSocketPair !== 'undefined') {
return 'cloudflare-worker'
}
if (
// @ts-ignore
typeof WorkerGlobalScope !== 'undefined' && // this may sometimes be available in a CF worker, so check for importScripts
typeof WorkerGlobalScope !== 'undefined' &&
// @ts-ignore

@@ -17,0 +27,0 @@ typeof importScripts === 'function'

@@ -9,3 +9,3 @@ import { Publisher, PublisherProps } from './publisher'

function normalizeEvent(ctx: Context) {
ctx.updateEvent('context.library.name', 'AnalyticsNode')
ctx.updateEvent('context.library.name', '@segment/analytics-node')
ctx.updateEvent('context.library.version', version)

@@ -16,3 +16,3 @@ const runtime = detectRuntime()

}
ctx.updateEvent('_metadata.runtime', runtime)
ctx.updateEvent('_metadata.jsRuntime', runtime)
}

@@ -19,0 +19,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

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