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

mixpanel

Package Overview
Dependencies
Maintainers
9
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.10.0 to 0.10.1

4

history.md

@@ -0,1 +1,5 @@

0.10.1 / 2018-12-03
==================
* support configurable API path (thanks CameronDiver)
0.9.2 / 2018-05-22

@@ -2,0 +6,0 @@ ==================

5

lib/mixpanel-node.js

@@ -47,3 +47,4 @@ /*

host: 'api.mixpanel.com',
protocol: 'https'
protocol: 'https',
path: '',
};

@@ -114,3 +115,3 @@

request_options.path = endpoint + "?" + querystring.stringify(query_params);
request_options.path = metrics.config.path + endpoint + "?" + querystring.stringify(query_params);

@@ -117,0 +118,0 @@ request = request_lib.request(request_options, function(res) {

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

],
"version": "0.10.0",
"version": "0.10.1",
"homepage": "https://github.com/mixpanel/mixpanel-node",

@@ -31,3 +31,3 @@ "author": "Carl Sverre",

"devDependencies": {
"nodeunit": "^0.9.1",
"nodeunit": "^0.11.3",
"proxyquire": "^1.7.11",

@@ -34,0 +34,0 @@ "sinon": "^7.1.1"

@@ -240,2 +240,3 @@ Mixpanel-node

- [Marko Klopets](https://github.com/mklopets)
- [Cameron Diver](https://github.com/CameronDiver)

@@ -242,0 +243,0 @@ License

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

host: 'api.mixpanel.com',
protocol: 'https'
protocol: 'https',
path: ''
}, "default config is incorrect");

@@ -18,0 +19,0 @@ test.done();

@@ -172,2 +172,38 @@ var Mixpanel,

"uses correct path": function(test) {
var host = 'testhost.fakedomain';
var customPath = '/mypath';
var customHostnameMixpanel = Mixpanel.init('token', {
host,
path: customPath,
});
var expected_http_request = {
host,
path: '/mypath?ip=0&verbose=0&data=e30%3D',
};
customHostnameMixpanel.send_request({endpoint: "", data: {}});
test.ok(https.request.calledWithMatch(expected_http_request), "send_request didn't call https.request with correct hostname and port");
test.done();
},
"combines custom path and endpoint": function(test) {
var host = 'testhost.fakedomain';
var customPath = '/mypath';
var customHostnameMixpanel = Mixpanel.init('token', {
host,
path: customPath,
});
var expected_http_request = {
host,
path: '/mypath/track?ip=0&verbose=0&data=e30%3D',
};
customHostnameMixpanel.send_request({endpoint: '/track', data: {}});
test.ok(https.request.calledWithMatch(expected_http_request), "send_request didn't call https.request with correct hostname and port");
test.done();
},
"uses HTTP_PROXY if set": function(test) {

@@ -174,0 +210,0 @@ HttpsProxyAgent.reset(); // Mixpanel is instantiated in setup, need to reset callcount

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