Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/browser

Package Overview
Dependencies
Maintainers
9
Versions
559
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/browser - npm Package Compare versions

Comparing version 4.6.4 to 4.6.5

3

dist/integrations/breadcrumbs.d.ts

@@ -13,3 +13,2 @@ import { Breadcrumb, Integration, SentryBreadcrumbHint } from '@sentry/types';

interface BreadcrumbIntegrations {
beacon?: boolean;
console?: boolean;

@@ -39,4 +38,2 @@ dom?: boolean;

/** JSDoc */
private instrumentBeacon;
/** JSDoc */
private instrumentConsole;

@@ -43,0 +40,0 @@ /** JSDoc */

export { BaseTransport } from './base';
export { FetchTransport } from './fetch';
export { XHRTransport } from './xhr';
export { BeaconTransport } from './beacon';

2

dist/version.d.ts
export declare const SDK_NAME = "sentry.javascript.browser";
export declare const SDK_VERSION = "4.6.4";
export declare const SDK_VERSION = "4.6.5";
import { BaseBackend, SentryError } from '@sentry/core/esm';
import { Severity } from '@sentry/types/esm';
import { isDOMError, isDOMException, isError, isErrorEvent, isPlainObject } from '@sentry/utils/esm/is';
import { supportsBeacon, supportsFetch } from '@sentry/utils/esm/supports';
import { supportsFetch } from '@sentry/utils/esm/supports';
import { addExceptionTypeValue, eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';
import { computeStackTrace } from './tracekit';
import { BeaconTransport, FetchTransport, XHRTransport } from './transports';
import { FetchTransport, XHRTransport } from './transports';
/** The Sentry Browser SDK Backend. */

@@ -36,5 +36,2 @@ export class BrowserBackend extends BaseBackend {

}
else if (supportsBeacon()) {
return new BeaconTransport(transportOptions);
}
else if (supportsFetch()) {

@@ -41,0 +38,0 @@ return new FetchTransport(transportOptions);

@@ -13,3 +13,2 @@ import { Breadcrumb, Integration, SentryBreadcrumbHint } from '@sentry/types/esm';

interface BreadcrumbIntegrations {
beacon?: boolean;
console?: boolean;

@@ -39,4 +38,2 @@ dom?: boolean;

/** JSDoc */
private instrumentBeacon;
/** JSDoc */
private instrumentConsole;

@@ -43,0 +40,0 @@ /** JSDoc */

@@ -8,3 +8,3 @@ import { API, getCurrentHub } from '@sentry/core/esm';

import { includes, safeJoin } from '@sentry/utils/esm/string';
import { supportsBeacon, supportsHistory, supportsNativeFetch } from '@sentry/utils/esm/supports';
import { supportsHistory, supportsNativeFetch } from '@sentry/utils/esm/supports';
import { breadcrumbEventHandler, keypressEventHandler, wrap } from './helpers';

@@ -24,3 +24,2 @@ const global = getGlobalObject();

this.options = {
beacon: true,
console: true,

@@ -36,44 +35,2 @@ dom: true,

/** JSDoc */
instrumentBeacon() {
if (!supportsBeacon()) {
return;
}
/** JSDoc */
function beaconReplacementFunction(originalBeaconFunction) {
return function (...args) {
const url = args[0];
const data = args[1];
// If the browser successfully queues the request for delivery, the method returns "true" and returns "false" otherwise.
// https://developer.mozilla.org/en-US/docs/Web/API/Beacon_API/Using_the_Beacon_API
const result = originalBeaconFunction.apply(this, args);
const client = getCurrentHub().getClient();
const dsn = client && client.getDsn();
if (dsn) {
const filterUrl = new API(dsn).getStoreEndpoint();
// if Sentry key appears in URL, don't capture it as a request
// but rather as our own 'sentry' type breadcrumb
if (filterUrl && includes(url, filterUrl)) {
addSentryBreadcrumb(data);
return result;
}
}
// What is wrong with you TypeScript...
const breadcrumbData = {
category: 'beacon',
data,
type: 'http',
};
if (!result) {
breadcrumbData.level = Severity.Error;
}
Breadcrumbs.addBreadcrumb(breadcrumbData, {
input: args,
result,
});
return result;
};
}
fill(global.navigator, 'sendBeacon', beaconReplacementFunction);
}
/** JSDoc */
instrumentConsole() {

@@ -386,5 +343,2 @@ if (!('console' in global)) {

}
if (this.options.beacon) {
this.instrumentBeacon();
}
if (this.options.history) {

@@ -391,0 +345,0 @@ this.instrumentHistory();

export { BaseTransport } from './base';
export { FetchTransport } from './fetch';
export { XHRTransport } from './xhr';
export { BeaconTransport } from './beacon';
export { BaseTransport } from './base';
export { FetchTransport } from './fetch';
export { XHRTransport } from './xhr';
export { BeaconTransport } from './beacon';
//# sourceMappingURL=index.js.map
export declare const SDK_NAME = "sentry.javascript.browser";
export declare const SDK_VERSION = "4.6.4";
export declare const SDK_VERSION = "4.6.5";
export const SDK_NAME = 'sentry.javascript.browser';
export const SDK_VERSION = '4.6.4';
export const SDK_VERSION = '4.6.5';
//# sourceMappingURL=version.js.map
{
"name": "@sentry/browser",
"version": "4.6.4",
"version": "4.6.5",
"description": "Offical Sentry SDK for browsers",

@@ -18,5 +18,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/core": "4.6.4",
"@sentry/core": "4.6.5",
"@sentry/types": "4.5.3",
"@sentry/utils": "4.6.4",
"@sentry/utils": "4.6.5",
"tslib": "^1.9.3"

@@ -23,0 +23,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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