Skip to content

Commit

Permalink
build version 2.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Kamens authored and zakj committed Jul 20, 2016
1 parent fb0e669 commit 40c158c
Show file tree
Hide file tree
Showing 11 changed files with 190 additions and 285 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
**2.9.3** (19 Jul 2016)
- Autotrack: small tweaks

**2.9.2** (19 Jul 2016)
- Autotrack: enabled by default for 100% of projects (still no automatic data collection however)

Expand Down
42 changes: 14 additions & 28 deletions build/mixpanel.amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ define(function () { 'use strict';

var Config = {
DEBUG: false,
LIB_VERSION: '2.9.2'
LIB_VERSION: '2.9.3'
};

// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
Expand Down Expand Up @@ -1996,7 +1996,7 @@ define(function () { 'use strict';
}
},

_editorParamsFromHash: function(instance, hash, updateHash) {
_editorParamsFromHash: function(instance, hash) {
var editorParams;
try {
var state = _.getHashParam(hash, 'state');
Expand All @@ -2014,14 +2014,12 @@ define(function () { 'use strict';
};
window.sessionStorage.setItem('editorParams', JSON.stringify(editorParams));

if (updateHash) {
if (state.desiredHash) {
window.location.hash = state.desiredHash;
} else if (window.history) {
history.replaceState('', document.title, window.location.pathname + window.location.search); // completely remove hash
} else {
window.location.hash = ''; // clear hash (but leaves # unfortunately)
}
if (state['desiredHash']) {
window.location.hash = state['desiredHash'];
} else if (window.history) {
history.replaceState('', document.title, window.location.pathname + window.location.search); // completely remove hash
} else {
window.location.hash = ''; // clear hash (but leaves # unfortunately)
}
} catch (e) {
console.error('Unable to parse data from hash', e);
Expand All @@ -2046,9 +2044,10 @@ define(function () { 'use strict';
var editorParams;

if (parseFromUrl) { // happens if they are initializing the editor using an old snippet
editorParams = this._editorParamsFromHash(instance, window.location.hash, true);
editorParams = this._editorParamsFromHash(instance, window.location.hash);
} else if (parseFromStorage) { // happens if they are initialized the editor and using the new snippet
editorParams = this._editorParamsFromHash(instance, window.sessionStorage.getItem('_mpcehash'), false);
editorParams = this._editorParamsFromHash(instance, window.sessionStorage.getItem('_mpcehash'));
window.sessionStorage.removeItem('_mpcehash');
} else { // get credentials from sessionStorage from a previous initialzation
editorParams = JSON.parse(window.sessionStorage.getItem('editorParams') || '{}');
}
Expand All @@ -2067,10 +2066,11 @@ define(function () { 'use strict';
if (!this._editorLoaded) {
this._editorLoaded = true;
var editorUrl;
var cacheBuster = '?_ts=' + (new Date()).getTime();
if (Config.DEBUG) {
editorUrl = instance.get_config('app_host') + '/site_media/compiled/reports/collect-everything/editor.js';
editorUrl = instance.get_config('app_host') + '/site_media/compiled/reports/collect-everything/editor.js' + cacheBuster;
} else {
editorUrl = instance.get_config('app_host') + '/site_media/bundle-webpack/reports/collect-everything/editor.min.js';
editorUrl = instance.get_config('app_host') + '/site_media/bundle-webpack/reports/collect-everything/editor.min.js' + cacheBuster;
}
this._loadScript(editorUrl, function() {
window['mp_load_editor'](editorParams);
Expand All @@ -2080,15 +2080,6 @@ define(function () { 'use strict';
return false;
},

closeEditor: function(redirectURL) {
window.sessionStorage.setItem('editorParams', '{}');
if (redirectURL) {
window.location = redirectURL;
} else {
window.location.reload(false);
}
},

// this is a mechanism to ramp up CE with no server-side interaction.
// when CE is active, every page load results in a decide request. we
// need to gently ramp this up so we don't overload decide. this decides
Expand Down Expand Up @@ -2850,10 +2841,6 @@ define(function () { 'use strict';
return instance;
};

MixpanelLib.prototype.close_editor = function(redirectURL) {
ce.closeEditor(redirectURL);
};

// Initialization methods

/**
Expand Down Expand Up @@ -5429,7 +5416,6 @@ define(function () { 'use strict';
MixpanelLib.prototype['toString'] = MixpanelLib.prototype.toString;
MixpanelLib.prototype['_check_and_handle_notifications'] = MixpanelLib.prototype._check_and_handle_notifications;
MixpanelLib.prototype['_show_notification'] = MixpanelLib.prototype._show_notification;
MixpanelLib.prototype['close_editor'] = MixpanelLib.prototype.close_editor;

// MixpanelPersistence Exports
MixpanelPersistence.prototype['properties'] = MixpanelPersistence.prototype.properties;
Expand Down
42 changes: 14 additions & 28 deletions build/mixpanel.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var Config = {
DEBUG: false,
LIB_VERSION: '2.9.2'
LIB_VERSION: '2.9.3'
};

// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
Expand Down Expand Up @@ -1996,7 +1996,7 @@ var ce = {
}
},

_editorParamsFromHash: function(instance, hash, updateHash) {
_editorParamsFromHash: function(instance, hash) {
var editorParams;
try {
var state = _.getHashParam(hash, 'state');
Expand All @@ -2014,14 +2014,12 @@ var ce = {
};
window.sessionStorage.setItem('editorParams', JSON.stringify(editorParams));

if (updateHash) {
if (state.desiredHash) {
window.location.hash = state.desiredHash;
} else if (window.history) {
history.replaceState('', document.title, window.location.pathname + window.location.search); // completely remove hash
} else {
window.location.hash = ''; // clear hash (but leaves # unfortunately)
}
if (state['desiredHash']) {
window.location.hash = state['desiredHash'];
} else if (window.history) {
history.replaceState('', document.title, window.location.pathname + window.location.search); // completely remove hash
} else {
window.location.hash = ''; // clear hash (but leaves # unfortunately)
}
} catch (e) {
console.error('Unable to parse data from hash', e);
Expand All @@ -2046,9 +2044,10 @@ var ce = {
var editorParams;

if (parseFromUrl) { // happens if they are initializing the editor using an old snippet
editorParams = this._editorParamsFromHash(instance, window.location.hash, true);
editorParams = this._editorParamsFromHash(instance, window.location.hash);
} else if (parseFromStorage) { // happens if they are initialized the editor and using the new snippet
editorParams = this._editorParamsFromHash(instance, window.sessionStorage.getItem('_mpcehash'), false);
editorParams = this._editorParamsFromHash(instance, window.sessionStorage.getItem('_mpcehash'));
window.sessionStorage.removeItem('_mpcehash');
} else { // get credentials from sessionStorage from a previous initialzation
editorParams = JSON.parse(window.sessionStorage.getItem('editorParams') || '{}');
}
Expand All @@ -2067,10 +2066,11 @@ var ce = {
if (!this._editorLoaded) {
this._editorLoaded = true;
var editorUrl;
var cacheBuster = '?_ts=' + (new Date()).getTime();
if (Config.DEBUG) {
editorUrl = instance.get_config('app_host') + '/site_media/compiled/reports/collect-everything/editor.js';
editorUrl = instance.get_config('app_host') + '/site_media/compiled/reports/collect-everything/editor.js' + cacheBuster;
} else {
editorUrl = instance.get_config('app_host') + '/site_media/bundle-webpack/reports/collect-everything/editor.min.js';
editorUrl = instance.get_config('app_host') + '/site_media/bundle-webpack/reports/collect-everything/editor.min.js' + cacheBuster;
}
this._loadScript(editorUrl, function() {
window['mp_load_editor'](editorParams);
Expand All @@ -2080,15 +2080,6 @@ var ce = {
return false;
},

closeEditor: function(redirectURL) {
window.sessionStorage.setItem('editorParams', '{}');
if (redirectURL) {
window.location = redirectURL;
} else {
window.location.reload(false);
}
},

// this is a mechanism to ramp up CE with no server-side interaction.
// when CE is active, every page load results in a decide request. we
// need to gently ramp this up so we don't overload decide. this decides
Expand Down Expand Up @@ -2850,10 +2841,6 @@ var create_mplib = function(token, config, name) {
return instance;
};

MixpanelLib.prototype.close_editor = function(redirectURL) {
ce.closeEditor(redirectURL);
};

// Initialization methods

/**
Expand Down Expand Up @@ -5429,7 +5416,6 @@ MixpanelLib.prototype['get_distinct_id'] = MixpanelLib.prototype
MixpanelLib.prototype['toString'] = MixpanelLib.prototype.toString;
MixpanelLib.prototype['_check_and_handle_notifications'] = MixpanelLib.prototype._check_and_handle_notifications;
MixpanelLib.prototype['_show_notification'] = MixpanelLib.prototype._show_notification;
MixpanelLib.prototype['close_editor'] = MixpanelLib.prototype.close_editor;

// MixpanelPersistence Exports
MixpanelPersistence.prototype['properties'] = MixpanelPersistence.prototype.properties;
Expand Down
42 changes: 14 additions & 28 deletions build/mixpanel.globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

var Config = {
DEBUG: false,
LIB_VERSION: '2.9.2'
LIB_VERSION: '2.9.3'
};

// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
Expand Down Expand Up @@ -1997,7 +1997,7 @@
}
},

_editorParamsFromHash: function(instance, hash, updateHash) {
_editorParamsFromHash: function(instance, hash) {
var editorParams;
try {
var state = _.getHashParam(hash, 'state');
Expand All @@ -2015,14 +2015,12 @@
};
window.sessionStorage.setItem('editorParams', JSON.stringify(editorParams));

if (updateHash) {
if (state.desiredHash) {
window.location.hash = state.desiredHash;
} else if (window.history) {
history.replaceState('', document.title, window.location.pathname + window.location.search); // completely remove hash
} else {
window.location.hash = ''; // clear hash (but leaves # unfortunately)
}
if (state['desiredHash']) {
window.location.hash = state['desiredHash'];
} else if (window.history) {
history.replaceState('', document.title, window.location.pathname + window.location.search); // completely remove hash
} else {
window.location.hash = ''; // clear hash (but leaves # unfortunately)
}
} catch (e) {
console.error('Unable to parse data from hash', e);
Expand All @@ -2047,9 +2045,10 @@
var editorParams;

if (parseFromUrl) { // happens if they are initializing the editor using an old snippet
editorParams = this._editorParamsFromHash(instance, window.location.hash, true);
editorParams = this._editorParamsFromHash(instance, window.location.hash);
} else if (parseFromStorage) { // happens if they are initialized the editor and using the new snippet
editorParams = this._editorParamsFromHash(instance, window.sessionStorage.getItem('_mpcehash'), false);
editorParams = this._editorParamsFromHash(instance, window.sessionStorage.getItem('_mpcehash'));
window.sessionStorage.removeItem('_mpcehash');
} else { // get credentials from sessionStorage from a previous initialzation
editorParams = JSON.parse(window.sessionStorage.getItem('editorParams') || '{}');
}
Expand All @@ -2068,10 +2067,11 @@
if (!this._editorLoaded) {
this._editorLoaded = true;
var editorUrl;
var cacheBuster = '?_ts=' + (new Date()).getTime();
if (Config.DEBUG) {
editorUrl = instance.get_config('app_host') + '/site_media/compiled/reports/collect-everything/editor.js';
editorUrl = instance.get_config('app_host') + '/site_media/compiled/reports/collect-everything/editor.js' + cacheBuster;
} else {
editorUrl = instance.get_config('app_host') + '/site_media/bundle-webpack/reports/collect-everything/editor.min.js';
editorUrl = instance.get_config('app_host') + '/site_media/bundle-webpack/reports/collect-everything/editor.min.js' + cacheBuster;
}
this._loadScript(editorUrl, function() {
window['mp_load_editor'](editorParams);
Expand All @@ -2081,15 +2081,6 @@
return false;
},

closeEditor: function(redirectURL) {
window.sessionStorage.setItem('editorParams', '{}');
if (redirectURL) {
window.location = redirectURL;
} else {
window.location.reload(false);
}
},

// this is a mechanism to ramp up CE with no server-side interaction.
// when CE is active, every page load results in a decide request. we
// need to gently ramp this up so we don't overload decide. this decides
Expand Down Expand Up @@ -2851,10 +2842,6 @@
return instance;
};

MixpanelLib.prototype.close_editor = function(redirectURL) {
ce.closeEditor(redirectURL);
};

// Initialization methods

/**
Expand Down Expand Up @@ -5430,7 +5417,6 @@
MixpanelLib.prototype['toString'] = MixpanelLib.prototype.toString;
MixpanelLib.prototype['_check_and_handle_notifications'] = MixpanelLib.prototype._check_and_handle_notifications;
MixpanelLib.prototype['_show_notification'] = MixpanelLib.prototype._show_notification;
MixpanelLib.prototype['close_editor'] = MixpanelLib.prototype.close_editor;

// MixpanelPersistence Exports
MixpanelPersistence.prototype['properties'] = MixpanelPersistence.prototype.properties;
Expand Down
Loading

0 comments on commit 40c158c

Please sign in to comment.