@sentry/browser
Advanced tools
Comparing version 0.4.0-beta.7 to 0.4.0
@@ -1,2 +0,2 @@ | ||
export * from './lib/backend'; | ||
export * from './lib/frontend'; | ||
export { BrowserBackend, BrowserOptions } from './lib/backend'; | ||
export { BrowserFrontend, SentryClient } from './lib/frontend'; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var core = require('@sentry/core'); | ||
var utils = require('@sentry/utils'); | ||
var async = require('@sentry/utils/dist/lib/async'); | ||
@@ -106,3 +106,4 @@ /*! ***************************************************************************** | ||
// tslint:disable-next-line:variable-name | ||
var Raven = RavenJS; | ||
var Raven = (RavenJS__default || | ||
RavenJS); | ||
@@ -123,2 +124,15 @@ /** Original raven send function. */ | ||
} | ||
/** | ||
* Prepares an event so it can be send with raven-js. | ||
* @param event | ||
* @returns | ||
*/ | ||
function prepareEventForRaven(event) { | ||
var ravenEvent = event; | ||
if (event.exception) { | ||
// tslint:disable-next-line:no-unsafe-any | ||
ravenEvent.exception = { values: event.exception }; | ||
} | ||
return ravenEvent; | ||
} | ||
/** The Sentry Browser SDK Backend. */ | ||
@@ -151,3 +165,3 @@ var BrowserBackend = /** @class */ (function () { | ||
Raven.setBreadcrumbCallback(function (breadcrumb) { | ||
utils.forget(_this.frontend.addBreadcrumb(breadcrumb)); | ||
async.forget(_this.frontend.addBreadcrumb(breadcrumb)); | ||
return false; | ||
@@ -159,3 +173,3 @@ }); | ||
Raven._sendProcessedPayload = function (event) { | ||
utils.forget(_this.frontend.captureEvent(normalizeRavenEvent(event))); | ||
async.forget(_this.frontend.captureEvent(normalizeRavenEvent(event))); | ||
}; | ||
@@ -238,3 +252,3 @@ return [2 /*return*/, true]; | ||
return [2 /*return*/, new Promise(function (resolve) { | ||
sendRavenEvent(event, function (error) { | ||
sendRavenEvent(prepareEventForRaven(event), function (error) { | ||
// TODO: Check the response status code | ||
@@ -241,0 +255,0 @@ resolve(error ? 500 : 200); |
{ | ||
"name": "@sentry/browser", | ||
"version": "0.4.0-beta.7", | ||
"version": "0.4.0", | ||
"description": "Offical Sentry SDK for browsers", | ||
@@ -17,4 +17,4 @@ "repository": "https://github.com/getsentry/raven-js", | ||
"dependencies": { | ||
"@sentry/core": "^0.4.0-beta.7", | ||
"@sentry/utils": "^0.4.0-beta.7", | ||
"@sentry/core": "0.4.0", | ||
"@sentry/utils": "0.4.0", | ||
"raven-js": "^3.23.1" | ||
@@ -21,0 +21,0 @@ }, |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
22720
517
1
+ Added@sentry/core@0.4.0(transitive)
+ Added@sentry/utils@0.4.0(transitive)
- Removed@sentry/core@0.4.2(transitive)
- Removed@sentry/utils@0.4.2(transitive)
Updated@sentry/core@0.4.0
Updated@sentry/utils@0.4.0