Skip to content

Commit

Permalink
bump version and rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
xinghengwang committed Feb 26, 2021
1 parent aab9712 commit 64d0cb1
Showing 11 changed files with 91 additions and 24 deletions.
13 changes: 12 additions & 1 deletion build/moesif.amd.js
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ define(function () { 'use strict';

var Config = {
DEBUG: false,
LIB_VERSION: '1.8.1'
LIB_VERSION: '1.8.2'
};

// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
@@ -3291,6 +3291,17 @@ define(function () { 'use strict';
this._companyId = getFromPersistence(STORAGE_CONSTANTS.STORED_COMPANY_ID, ops);
this._anonymousId = getAnonymousId(this._persist, ops);
this._campaign = getCampaignData(this._persist, ops);

// try to save campaign data on anonymous id
// if there is no userId saved, means it is still anonymous.
// later on, when identifyUser is called with real user id,
// the campaigne data will be resent with that again.
if (this._campaign && !this._userId) {
var anonUserObject = {};
anonUserObject['anonymous_id'] = this._anonymousId;
anonUserObject['campaign'] = this._campaign;
this.updateUser(anonUserObject, this._options.applicationId, this._options.host, this._options.callback);
}
} catch(err) {
console.error('error loading saved data from local storage but continue');
}
13 changes: 12 additions & 1 deletion build/moesif.cjs.js
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

var Config = {
DEBUG: false,
LIB_VERSION: '1.8.1'
LIB_VERSION: '1.8.2'
};

// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
@@ -3291,6 +3291,17 @@ function moesifCreator () {
this._companyId = getFromPersistence(STORAGE_CONSTANTS.STORED_COMPANY_ID, ops);
this._anonymousId = getAnonymousId(this._persist, ops);
this._campaign = getCampaignData(this._persist, ops);

// try to save campaign data on anonymous id
// if there is no userId saved, means it is still anonymous.
// later on, when identifyUser is called with real user id,
// the campaigne data will be resent with that again.
if (this._campaign && !this._userId) {
var anonUserObject = {};
anonUserObject['anonymous_id'] = this._anonymousId;
anonUserObject['campaign'] = this._campaign;
this.updateUser(anonUserObject, this._options.applicationId, this._options.host, this._options.callback);
}
} catch(err) {
console.error('error loading saved data from local storage but continue');
}
13 changes: 12 additions & 1 deletion build/moesif.globals.js
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

var Config = {
DEBUG: false,
LIB_VERSION: '1.8.1'
LIB_VERSION: '1.8.2'
};

// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
@@ -3292,6 +3292,17 @@
this._companyId = getFromPersistence(STORAGE_CONSTANTS.STORED_COMPANY_ID, ops);
this._anonymousId = getAnonymousId(this._persist, ops);
this._campaign = getCampaignData(this._persist, ops);

// try to save campaign data on anonymous id
// if there is no userId saved, means it is still anonymous.
// later on, when identifyUser is called with real user id,
// the campaigne data will be resent with that again.
if (this._campaign && !this._userId) {
var anonUserObject = {};
anonUserObject['anonymous_id'] = this._anonymousId;
anonUserObject['campaign'] = this._campaign;
this.updateUser(anonUserObject, this._options.applicationId, this._options.host, this._options.callback);
}
} catch(err) {
console.error('error loading saved data from local storage but continue');
}
13 changes: 12 additions & 1 deletion build/moesif.umd.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

var Config = {
DEBUG: false,
LIB_VERSION: '1.8.1'
LIB_VERSION: '1.8.2'
};

// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
@@ -3295,6 +3295,17 @@
this._companyId = getFromPersistence(STORAGE_CONSTANTS.STORED_COMPANY_ID, ops);
this._anonymousId = getAnonymousId(this._persist, ops);
this._campaign = getCampaignData(this._persist, ops);

// try to save campaign data on anonymous id
// if there is no userId saved, means it is still anonymous.
// later on, when identifyUser is called with real user id,
// the campaigne data will be resent with that again.
if (this._campaign && !this._userId) {
var anonUserObject = {};
anonUserObject['anonymous_id'] = this._anonymousId;
anonUserObject['campaign'] = this._campaign;
this.updateUser(anonUserObject, this._options.applicationId, this._options.host, this._options.callback);
}
} catch(err) {
console.error('error loading saved data from local storage but continue');
}
13 changes: 12 additions & 1 deletion examples/commonjs-browserify/bundle.js
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

var Config = {
DEBUG: false,
LIB_VERSION: '1.8.1'
LIB_VERSION: '1.8.2'
};

// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
@@ -3292,6 +3292,17 @@ function moesifCreator () {
this._companyId = getFromPersistence(STORAGE_CONSTANTS.STORED_COMPANY_ID, ops);
this._anonymousId = getAnonymousId(this._persist, ops);
this._campaign = getCampaignData(this._persist, ops);

// try to save campaign data on anonymous id
// if there is no userId saved, means it is still anonymous.
// later on, when identifyUser is called with real user id,
// the campaigne data will be resent with that again.
if (this._campaign && !this._userId) {
var anonUserObject = {};
anonUserObject['anonymous_id'] = this._anonymousId;
anonUserObject['campaign'] = this._campaign;
this.updateUser(anonUserObject, this._options.applicationId, this._options.host, this._options.callback);
}
} catch(err) {
console.error('error loading saved data from local storage but continue');
}
13 changes: 12 additions & 1 deletion examples/es2015-babelify/bundle.js
Original file line number Diff line number Diff line change
@@ -578,7 +578,7 @@ Object.defineProperty(exports, '__esModule', {
});
var Config = {
DEBUG: false,
LIB_VERSION: '1.8.1'
LIB_VERSION: '1.8.2'
};

exports['default'] = Config;
@@ -840,6 +840,17 @@ exports['default'] = function () {
this._companyId = (0, _persistence.getFromPersistence)(_persistence.STORAGE_CONSTANTS.STORED_COMPANY_ID, ops);
this._anonymousId = (0, _anonymousId.getAnonymousId)(this._persist, ops);
this._campaign = (0, _campaign2['default'])(this._persist, ops);

// try to save campaign data on anonymous id
// if there is no userId saved, means it is still anonymous.
// later on, when identifyUser is called with real user id,
// the campaigne data will be resent with that again.
if (this._campaign && !this._userId) {
var anonUserObject = {};
anonUserObject['anonymous_id'] = this._anonymousId;
anonUserObject['campaign'] = this._campaign;
this.updateUser(anonUserObject, this._options.applicationId, this._options.host, this._options.callback);
}
} catch (err) {
_utils.console.error('error loading saved data from local storage but continue');
}
2 changes: 1 addition & 1 deletion examples/umd-webpack/dist/main.js

Large diffs are not rendered by default.

Loading

0 comments on commit 64d0cb1

Please sign in to comment.