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

mixpanel

Package Overview
Dependencies
Maintainers
6
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mixpanel - npm Package Compare versions

Comparing version 0.15.0 to 0.16.0

5

history.md

@@ -0,1 +1,6 @@

0.16.0 / 2022-06-02
==================
* support automatic geolocation with `geolocate` option (thanks tmpvar)
* send library version as property with events (thanks ArsalImam)
0.15.0 / 2022-05-20

@@ -2,0 +7,0 @@ ==================

7

lib/mixpanel-node.js

@@ -16,2 +16,3 @@ /*

const url = require('url');
const packageInfo = require('../package.json')

@@ -30,2 +31,5 @@ const {async_all, ensure_timestamp} = require('./utils');

keepAlive: true,
// set this to true to automatically geolocate based on the client's ip.
// e.g., when running under electron
geolocate: false,
};

@@ -73,3 +77,3 @@

let query_params = {
'ip': 0,
'ip': metrics.config.geolocate ? 1 : 0,
'verbose': metrics.config.verbose ? 1 : 0

@@ -176,2 +180,3 @@ };

properties.mp_lib = "node";
properties.$lib_version = packageInfo.version;

@@ -178,0 +183,0 @@ var data = {

2

package.json

@@ -10,3 +10,3 @@ {

],
"version": "0.15.0",
"version": "0.16.0",
"homepage": "https://github.com/mixpanel/mixpanel-node",

@@ -13,0 +13,0 @@ "author": "Carl Sverre",

@@ -257,2 +257,4 @@ Mixpanel-node

- [Will Neild](https://github.com/wneild)
- [Elijah Insua](https://github.com/tmpvar)
- [Arsal Imam](https://github.com/ArsalImam)

@@ -259,0 +261,0 @@ License

@@ -18,2 +18,3 @@ var Mixpanel = require('../lib/mixpanel-node');

keepAlive: true,
geolocate: false,
}, "default config is incorrect");

@@ -20,0 +21,0 @@ test.done();

@@ -122,2 +122,12 @@ let Mixpanel;

"sets ip=1 when geolocate option is on": function(test) {
this.mixpanel.set_config({ geolocate: true });
this.mixpanel.send_request({ method: "get", endpoint: "/track", event: "test", data: {} });
test.ok(https.request.calledWithMatch({ path: Sinon.match('ip=1') }), "send_request didn't call http.get with correct request data");
test.done();
},
"handles mixpanel errors": function(test) {

@@ -124,0 +134,0 @@ test.expect(1);

@@ -1,6 +0,7 @@

var proxyquire = require('proxyquire'),
Sinon = require('sinon'),
https = require('https'),
events = require('events'),
Mixpanel = require('../lib/mixpanel-node');
var proxyquire = require('proxyquire'),
Sinon = require('sinon'),
https = require('https'),
events = require('events'),
Mixpanel = require('../lib/mixpanel-node'),
packageInfo = require('../package.json');

@@ -94,3 +95,4 @@ var mock_now_time = new Date(2016, 1, 1).getTime();

time: time.getTime() / 1000,
mp_lib: 'node'
mp_lib: 'node',
$lib_version: packageInfo.version
}

@@ -118,3 +120,4 @@ };

time: time,
mp_lib: 'node'
mp_lib: 'node',
$lib_version: packageInfo.version
}

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