New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@segment/analytics.js-integration-segmentio

Package Overview
Dependencies
Maintainers
108
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@segment/analytics.js-integration-segmentio - npm Package Compare versions

Comparing version 3.9.0 to 4.0.0

5

HISTORY.md
4.0.0 / 2019-03-08
==================
* [New](https://github.com/segment-integrations/analytics.js-integration-segmentio/pull/55): Stop Generating MessageId.
3.9.0 / 2019-01-14

@@ -3,0 +8,0 @@ ==================

3

lib/index.js

@@ -15,3 +15,2 @@ 'use strict';

var localstorage = require('yields-store');
var md5 = require('spark-md5').hash;
var protocol = require('@segment/protocol');

@@ -316,4 +315,2 @@ var send = require('@segment/send-json');

}
// add some randomness to the messageId checksum
msg.messageId = 'ajs-' + md5(json.stringify(msg) + uuid());
this.debug('normalized %o', msg);

@@ -320,0 +317,0 @@ this.ampId(ctx);

{
"name": "@segment/analytics.js-integration-segmentio",
"description": "The Segmentio analytics.js integration.",
"version": "3.9.0",
"version": "4.0.0",
"keywords": [

@@ -39,3 +39,2 @@ "analytics.js",

"json3": "^3.3.2",
"spark-md5": "^2.0.2",
"uuid": "^2.0.2",

@@ -45,3 +44,3 @@ "yields-store": "^1.0.2"

"devDependencies": {
"@segment/analytics.js-core": "^3.1.3",
"@segment/analytics.js-core": "^3.8.0",
"@segment/analytics.js-integration-tester": "^2.0.0",

@@ -48,0 +47,0 @@ "@segment/clear-env": "^2.0.0",

@@ -178,17 +178,2 @@ 'use strict';

it('should add .messageId', function() {
segment.normalize(object);
analytics.assert(object.messageId.length === 36);
});
it('should properly randomize .messageId', function() {
var set = {};
var count = 1000;
for (var i = 0; i < count; i++) {
var id = segment.normalize(object).messageId;
set[id] = true;
}
analytics.assert(Object.keys(set).length === count);
});
it('should add .library', function() {

@@ -429,2 +414,9 @@ segment.normalize(object);

});
it('should pick up messageId from AJS', function() {
object = analytics.normalize(object); // ajs core generates the message ID here
var messageId = object.messageId;
segment.normalize(object);
assert.equal(object.messageId, messageId);
});
});

@@ -431,0 +423,0 @@ });

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