@mparticle/web-sdk
Advanced tools
Comparing version 2.9.4-rc.3 to 2.9.5-rc.1
## Releases | ||
-- | ||
#### 2.9.5 - 2019-07-01 | ||
* Bugfix - set isInitialized in both web and webview contexts | ||
* Feature: log error custom attributes | ||
* Update build parameters | ||
#### 2.9.4 - 2019-06-25 | ||
@@ -5,0 +10,0 @@ * Modify files for self hosting |
{ | ||
"name": "@mparticle/web-sdk", | ||
"version": "2.9.4-rc.3", | ||
"version": "2.9.5-rc.1", | ||
"description": "mParticle core SDK for web applications", | ||
@@ -20,8 +20,8 @@ "license": "Apache-2.0", | ||
"testKarma": "node test/test-karma.js", | ||
"build": "browserify src/main.js -v -o -s mParticle > build/mParticle-dev.js", | ||
"buildTest": "browserify test/src/tests-main.js -v -o test/test-bundle.js", | ||
"build": "browserify src/main.js -v -o build/mParticle-dev.js", | ||
"buildTest": "browserify test/src/tests-main.js -v -o test/test-bundle.js --debug", | ||
"buildDocs": "yuidoc src/", | ||
"buildSnippet": "uglifyjs snippet.js -nm -o snippet.min.js", | ||
"testBrowser": "karma start --single-run --browsers=$BROWSER test/karma.config.js", | ||
"watch": "watchify src/main.js -v -s mParticle -o build/mParticle-dev.js --debug", | ||
"watch": "watchify src/main.js -v -o build/mParticle-dev.js --debug", | ||
"watchTests": "watchify test/src/tests-main.js -v -o test/test-bundle.js --debug", | ||
@@ -28,0 +28,0 @@ "lint": "eslint src/ test/src/" |
@@ -1,2 +0,2 @@ | ||
var sdkVersion = '2.9.4', | ||
var sdkVersion = '2.9.5', | ||
sdkVendor = 'mparticle', | ||
@@ -3,0 +3,0 @@ platform = 'web', |
@@ -283,4 +283,5 @@ // | ||
* @param {String or Object} error The name of the error (string), or an object formed as follows {name: 'exampleName', message: 'exampleMessage', stack: 'exampleStack'} | ||
* @param {Object} [attrs] Custom attrs to be passed along with the error event; values must be string, number, or boolean | ||
*/ | ||
logError: function(error) { | ||
logError: function(error, attrs) { | ||
SessionManager.resetSessionTimer(); | ||
@@ -297,9 +298,18 @@ if (!error) { | ||
var data = { | ||
m: error.message ? error.message : error, | ||
s: 'Error', | ||
t: error.stack | ||
}; | ||
if (attrs) { | ||
var sanitized = Helpers.sanitizeAttributes(attrs); | ||
for (var prop in sanitized) { | ||
data[prop] = sanitized[prop]; | ||
} | ||
} | ||
Events.logEvent(Types.MessageType.CrashReport, | ||
error.name ? error.name : 'Error', | ||
{ | ||
m: error.message ? error.message : error, | ||
s: 'Error', | ||
t: error.stack | ||
}, | ||
data, | ||
Types.EventType.Other); | ||
@@ -828,21 +838,21 @@ }, | ||
Events.logAST(); | ||
// Call any functions that are waiting for the library to be initialized | ||
if (mParticle.preInit.readyQueue && mParticle.preInit.readyQueue.length) { | ||
mParticle.preInit.readyQueue.forEach(function (readyQueueItem) { | ||
if (Validators.isFunction(readyQueueItem)) { | ||
readyQueueItem(); | ||
} else if (Array.isArray(readyQueueItem)) { | ||
processPreloadedItem(readyQueueItem); | ||
} | ||
}); | ||
mParticle.preInit.readyQueue = []; | ||
} | ||
mParticle.Store.isInitialized = true; | ||
if (mParticle.Store.isFirstRun) { | ||
mParticle.Store.isFirstRun = false; | ||
} | ||
} | ||
// Call any functions that are waiting for the library to be initialized | ||
if (mParticle.preInit.readyQueue && mParticle.preInit.readyQueue.length) { | ||
mParticle.preInit.readyQueue.forEach(function (readyQueueItem) { | ||
if (Validators.isFunction(readyQueueItem)) { | ||
readyQueueItem(); | ||
} else if (Array.isArray(readyQueueItem)) { | ||
processPreloadedItem(readyQueueItem); | ||
} | ||
}); | ||
mParticle.preInit.readyQueue = []; | ||
} | ||
mParticle.Store.isInitialized = true; | ||
if (mParticle.Store.isFirstRun) { | ||
mParticle.Store.isFirstRun = false; | ||
} | ||
} | ||
@@ -884,5 +894,6 @@ | ||
} | ||
module.exports = mParticle; | ||
window.mParticle = mParticle; | ||
module.exports = mParticle; | ||
})(window); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
307494
6518
2