@sentry/react
Advanced tools
Comparing version 8.9.2 to 8.10.0
@@ -115,6 +115,5 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
const branches = matchRoutes(allRoutes, pathname, matchPath); | ||
// eslint-disable-next-line @typescript-eslint/prefer-for-of | ||
for (let x = 0; x < branches.length; x++) { | ||
if (branches[x].match.isExact) { | ||
return [branches[x].match.path, 'route']; | ||
for (const branch of branches) { | ||
if (branch.match.isExact) { | ||
return [branch.match.path, 'route']; | ||
} | ||
@@ -172,3 +171,4 @@ } | ||
: branch.length | ||
? branch[branch.length - 1].match // use parent match | ||
? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
branch[branch.length - 1].match // use parent match | ||
: computeRootMatch(pathname); // use default "root" match | ||
@@ -175,0 +175,0 @@ |
@@ -115,2 +115,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
for (let x = routesWithPaths.length - 1; x >= 0; x--) { | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const route = routesWithPaths[x]; | ||
@@ -117,0 +118,0 @@ if (route.path && route.path.startsWith('/')) { |
@@ -119,5 +119,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
if (branches) { | ||
// eslint-disable-next-line @typescript-eslint/prefer-for-of | ||
for (let x = 0; x < branches.length; x++) { | ||
const branch = branches[x]; | ||
for (const branch of branches) { | ||
const route = branch.route; | ||
@@ -124,0 +122,0 @@ if (route) { |
@@ -5,2 +5,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
const core = require('@sentry/core'); | ||
const React = require('react'); | ||
@@ -16,3 +17,3 @@ /** | ||
core.applySdkMetadata(opts, 'react'); | ||
browser.setContext('react', { version: React.version }); | ||
browser.init(opts); | ||
@@ -19,0 +20,0 @@ } |
@@ -112,5 +112,5 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
const paramAttributes = {}; | ||
for (const key of Object.keys(match.params)) { | ||
paramAttributes[`url.path.params.${key}`] = match.params[key]; | ||
} | ||
Object.entries(match.params).forEach(([key, value]) => { | ||
paramAttributes[`url.path.params.${key}`] = value; | ||
}); | ||
@@ -117,0 +117,0 @@ return paramAttributes; |
@@ -109,6 +109,5 @@ import { jsx } from 'react/jsx-runtime'; | ||
const branches = matchRoutes(allRoutes, pathname, matchPath); | ||
// eslint-disable-next-line @typescript-eslint/prefer-for-of | ||
for (let x = 0; x < branches.length; x++) { | ||
if (branches[x].match.isExact) { | ||
return [branches[x].match.path, 'route']; | ||
for (const branch of branches) { | ||
if (branch.match.isExact) { | ||
return [branch.match.path, 'route']; | ||
} | ||
@@ -166,3 +165,4 @@ } | ||
: branch.length | ||
? branch[branch.length - 1].match // use parent match | ||
? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
branch[branch.length - 1].match // use parent match | ||
: computeRootMatch(pathname); // use default "root" match | ||
@@ -169,0 +169,0 @@ |
@@ -113,2 +113,3 @@ import { browserTracingIntegration, WINDOW, startBrowserTracingPageLoadSpan, startBrowserTracingNavigationSpan } from '@sentry/browser'; | ||
for (let x = routesWithPaths.length - 1; x >= 0; x--) { | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const route = routesWithPaths[x]; | ||
@@ -115,0 +116,0 @@ if (route.path && route.path.startsWith('/')) { |
@@ -113,5 +113,3 @@ import { jsx } from 'react/jsx-runtime'; | ||
if (branches) { | ||
// eslint-disable-next-line @typescript-eslint/prefer-for-of | ||
for (let x = 0; x < branches.length; x++) { | ||
const branch = branches[x]; | ||
for (const branch of branches) { | ||
const route = branch.route; | ||
@@ -118,0 +116,0 @@ if (route) { |
@@ -1,3 +0,4 @@ | ||
import { init as init$1 } from '@sentry/browser'; | ||
import { setContext, init as init$1 } from '@sentry/browser'; | ||
import { applySdkMetadata } from '@sentry/core'; | ||
import { version } from 'react'; | ||
@@ -13,3 +14,3 @@ /** | ||
applySdkMetadata(opts, 'react'); | ||
setContext('react', { version }); | ||
init$1(opts); | ||
@@ -16,0 +17,0 @@ } |
@@ -110,5 +110,5 @@ import { browserTracingIntegration, WINDOW, startBrowserTracingPageLoadSpan, startBrowserTracingNavigationSpan } from '@sentry/browser'; | ||
const paramAttributes = {}; | ||
for (const key of Object.keys(match.params)) { | ||
paramAttributes[`url.path.params.${key}`] = match.params[key]; | ||
} | ||
Object.entries(match.params).forEach(([key, value]) => { | ||
paramAttributes[`url.path.params.${key}`] = value; | ||
}); | ||
@@ -115,0 +115,0 @@ return paramAttributes; |
{ | ||
"name": "@sentry/react", | ||
"version": "8.9.2", | ||
"version": "8.10.0", | ||
"description": "Official Sentry SDK for React.js", | ||
@@ -45,6 +45,6 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/browser": "8.9.2", | ||
"@sentry/core": "8.9.2", | ||
"@sentry/types": "8.9.2", | ||
"@sentry/utils": "8.9.2", | ||
"@sentry/browser": "8.10.0", | ||
"@sentry/core": "8.10.0", | ||
"@sentry/types": "8.10.0", | ||
"@sentry/utils": "8.10.0", | ||
"hoist-non-react-statics": "^3.3.2" | ||
@@ -51,0 +51,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
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
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
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
3625
354601
+ Added@sentry-internal/browser-utils@8.10.0(transitive)
+ Added@sentry-internal/feedback@8.10.0(transitive)
+ Added@sentry-internal/replay@8.10.0(transitive)
+ Added@sentry-internal/replay-canvas@8.10.0(transitive)
+ Added@sentry/browser@8.10.0(transitive)
+ Added@sentry/core@8.10.0(transitive)
+ Added@sentry/types@8.10.0(transitive)
+ Added@sentry/utils@8.10.0(transitive)
- Removed@sentry-internal/browser-utils@8.9.2(transitive)
- Removed@sentry-internal/feedback@8.9.2(transitive)
- Removed@sentry-internal/replay@8.9.2(transitive)
- Removed@sentry-internal/replay-canvas@8.9.2(transitive)
- Removed@sentry/browser@8.9.2(transitive)
- Removed@sentry/core@8.9.2(transitive)
- Removed@sentry/types@8.9.2(transitive)
- Removed@sentry/utils@8.9.2(transitive)
Updated@sentry/browser@8.10.0
Updated@sentry/core@8.10.0
Updated@sentry/types@8.10.0
Updated@sentry/utils@8.10.0