New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/browser

Package Overview
Dependencies
Maintainers
10
Versions
572
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 8.52.0 to 8.52.1

34

build/npm/cjs/tracing/request.js

@@ -141,33 +141,2 @@ Object.defineProperty(exports, '__esModule', { value: true });

/**
* Converts ALPN protocol ids to name and version.
*
* (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)
* @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol
*/
function extractNetworkProtocol(nextHopProtocol) {
let name = 'unknown';
let version = 'unknown';
let _name = '';
for (const char of nextHopProtocol) {
// http/1.1 etc.
if (char === '/') {
[name, version] = nextHopProtocol.split('/') ;
break;
}
// h2, h3 etc.
if (!isNaN(Number(char))) {
name = _name === 'h' ? 'http' : _name;
version = nextHopProtocol.split(_name)[1] ;
break;
}
_name += char;
}
if (_name === nextHopProtocol) {
// webrtc, ftp, etc.
name = _name;
}
return { name, version };
}
function getAbsoluteTime(time = 0) {

@@ -178,3 +147,3 @@ return ((core.browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000;

function resourceTimingEntryToSpanData(resourceTiming) {
const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);
const { name, version } = browserUtils.extractNetworkProtocol(resourceTiming.nextHopProtocol);

@@ -362,3 +331,2 @@ const timingSpanData = [];

exports.defaultRequestInstrumentationOptions = defaultRequestInstrumentationOptions;
exports.extractNetworkProtocol = extractNetworkProtocol;
exports.instrumentOutgoingRequests = instrumentOutgoingRequests;

@@ -365,0 +333,0 @@ exports.shouldAttachHeaders = shouldAttachHeaders;

2

build/npm/esm/package.json

@@ -1,1 +0,1 @@

{"type":"module","version":"8.52.0","sideEffects":false}
{"type":"module","version":"8.52.1","sideEffects":false}

@@ -1,2 +0,2 @@

import { addXhrInstrumentationHandler, addPerformanceInstrumentationHandler, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils';
import { addXhrInstrumentationHandler, addPerformanceInstrumentationHandler, extractNetworkProtocol, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils';
import { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, instrumentFetchRequest, parseUrl, spanToJSON, browserPerformanceTimeOrigin, hasTracingEnabled, setHttpStatus, getActiveSpan, startInactiveSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SentryNonRecordingSpan, getTraceData, stringMatchesSomePattern } from '@sentry/core';

@@ -139,33 +139,2 @@ import { WINDOW } from '../helpers.js';

/**
* Converts ALPN protocol ids to name and version.
*
* (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)
* @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol
*/
function extractNetworkProtocol(nextHopProtocol) {
let name = 'unknown';
let version = 'unknown';
let _name = '';
for (const char of nextHopProtocol) {
// http/1.1 etc.
if (char === '/') {
[name, version] = nextHopProtocol.split('/') ;
break;
}
// h2, h3 etc.
if (!isNaN(Number(char))) {
name = _name === 'h' ? 'http' : _name;
version = nextHopProtocol.split(_name)[1] ;
break;
}
_name += char;
}
if (_name === nextHopProtocol) {
// webrtc, ftp, etc.
name = _name;
}
return { name, version };
}
function getAbsoluteTime(time = 0) {

@@ -358,3 +327,3 @@ return ((browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000;

export { defaultRequestInstrumentationOptions, extractNetworkProtocol, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback };
export { defaultRequestInstrumentationOptions, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback };
//# sourceMappingURL=request.js.map

@@ -72,12 +72,2 @@ import { Client, HandlerDataXhr, Span } from '@sentry/core';

/**
* Converts ALPN protocol ids to name and version.
*
* (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)
* @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol
*/
export declare function extractNetworkProtocol(nextHopProtocol: string): {
name: string;
version: string;
};
/**
* A function that determines whether to attach tracing headers to a request.

@@ -84,0 +74,0 @@ * We only export this function for testing purposes.

@@ -72,12 +72,2 @@ import type { Client, HandlerDataXhr, Span } from '@sentry/core';

/**
* Converts ALPN protocol ids to name and version.
*
* (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)
* @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol
*/
export declare function extractNetworkProtocol(nextHopProtocol: string): {
name: string;
version: string;
};
/**
* A function that determines whether to attach tracing headers to a request.

@@ -84,0 +74,0 @@ * We only export this function for testing purposes.

{
"name": "@sentry/browser",
"version": "8.52.0",
"version": "8.52.1",
"description": "Official Sentry SDK for browsers",

@@ -42,10 +42,10 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry-internal/browser-utils": "8.52.0",
"@sentry-internal/feedback": "8.52.0",
"@sentry-internal/replay": "8.52.0",
"@sentry-internal/replay-canvas": "8.52.0",
"@sentry/core": "8.52.0"
"@sentry-internal/browser-utils": "8.52.1",
"@sentry-internal/feedback": "8.52.1",
"@sentry-internal/replay": "8.52.1",
"@sentry-internal/replay-canvas": "8.52.1",
"@sentry/core": "8.52.1"
},
"devDependencies": {
"@sentry-internal/integration-shims": "8.52.0",
"@sentry-internal/integration-shims": "8.52.1",
"fake-indexeddb": "^4.0.1"

@@ -52,0 +52,0 @@ },

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