@sentry-internal/tracing
Advanced tools
Comparing version 7.75.1 to 7.76.0
@@ -351,26 +351,30 @@ var { | ||
*/ | ||
paramIndices.forEach(([startOffset, endOffset], index) => { | ||
/** | ||
* isolate part before param | ||
*/ | ||
const substr1 = resultPath.substring(0, startOffset - indexShift); | ||
/** | ||
* define paramName as replacement in format :pathParam | ||
*/ | ||
const replacement = `:${orderedKeys[index].name}`; | ||
paramIndices.forEach((item, index) => { | ||
/** check if offsets is define because in some cases regex d flag returns undefined */ | ||
if (item) { | ||
const [startOffset, endOffset] = item; | ||
/** | ||
* isolate part before param | ||
*/ | ||
const substr1 = resultPath.substring(0, startOffset - indexShift); | ||
/** | ||
* define paramName as replacement in format :pathParam | ||
*/ | ||
const replacement = `:${orderedKeys[index].name}`; | ||
/** | ||
* isolate part after param | ||
*/ | ||
const substr2 = resultPath.substring(endOffset - indexShift); | ||
/** | ||
* isolate part after param | ||
*/ | ||
const substr2 = resultPath.substring(endOffset - indexShift); | ||
/** | ||
* recreate original path but with param replacement | ||
*/ | ||
resultPath = substr1 + replacement + substr2; | ||
/** | ||
* recreate original path but with param replacement | ||
*/ | ||
resultPath = substr1 + replacement + substr2; | ||
/** | ||
* calculate new index shift after resultPath was modified | ||
*/ | ||
indexShift = indexShift + (endOffset - startOffset - replacement.length); | ||
/** | ||
* calculate new index shift after resultPath was modified | ||
*/ | ||
indexShift = indexShift + (endOffset - startOffset - replacement.length); | ||
} | ||
}); | ||
@@ -377,0 +381,0 @@ |
@@ -346,26 +346,30 @@ import { _optionalChain } from '@sentry/utils/esm/buildPolyfills'; | ||
*/ | ||
paramIndices.forEach(([startOffset, endOffset], index) => { | ||
/** | ||
* isolate part before param | ||
*/ | ||
const substr1 = resultPath.substring(0, startOffset - indexShift); | ||
/** | ||
* define paramName as replacement in format :pathParam | ||
*/ | ||
const replacement = `:${orderedKeys[index].name}`; | ||
paramIndices.forEach((item, index) => { | ||
/** check if offsets is define because in some cases regex d flag returns undefined */ | ||
if (item) { | ||
const [startOffset, endOffset] = item; | ||
/** | ||
* isolate part before param | ||
*/ | ||
const substr1 = resultPath.substring(0, startOffset - indexShift); | ||
/** | ||
* define paramName as replacement in format :pathParam | ||
*/ | ||
const replacement = `:${orderedKeys[index].name}`; | ||
/** | ||
* isolate part after param | ||
*/ | ||
const substr2 = resultPath.substring(endOffset - indexShift); | ||
/** | ||
* isolate part after param | ||
*/ | ||
const substr2 = resultPath.substring(endOffset - indexShift); | ||
/** | ||
* recreate original path but with param replacement | ||
*/ | ||
resultPath = substr1 + replacement + substr2; | ||
/** | ||
* recreate original path but with param replacement | ||
*/ | ||
resultPath = substr1 + replacement + substr2; | ||
/** | ||
* calculate new index shift after resultPath was modified | ||
*/ | ||
indexShift = indexShift + (endOffset - startOffset - replacement.length); | ||
/** | ||
* calculate new index shift after resultPath was modified | ||
*/ | ||
indexShift = indexShift + (endOffset - startOffset - replacement.length); | ||
} | ||
}); | ||
@@ -372,0 +376,0 @@ |
{ | ||
"name": "@sentry-internal/tracing", | ||
"version": "7.75.1", | ||
"version": "7.76.0", | ||
"description": "Sentry Internal Tracing Package", | ||
@@ -26,5 +26,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/core": "7.75.1", | ||
"@sentry/types": "7.75.1", | ||
"@sentry/utils": "7.75.1" | ||
"@sentry/core": "7.76.0", | ||
"@sentry/types": "7.76.0", | ||
"@sentry/utils": "7.76.0" | ||
}, | ||
@@ -31,0 +31,0 @@ "devDependencies": { |
@@ -19,3 +19,3 @@ import { Hub, Integration, PolymorphicRequest } from '@sentry/types'; | ||
keys?: { | ||
name: string; | ||
name: string | number; | ||
offset: number; | ||
@@ -22,0 +22,0 @@ optional: boolean; |
@@ -19,3 +19,3 @@ import type { Hub, Integration, PolymorphicRequest } from '@sentry/types'; | ||
keys?: { | ||
name: string; | ||
name: string | number; | ||
offset: number; | ||
@@ -22,0 +22,0 @@ optional: boolean; |
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
1038314
8726
+ Added@sentry/core@7.76.0(transitive)
+ Added@sentry/types@7.76.0(transitive)
+ Added@sentry/utils@7.76.0(transitive)
- Removed@sentry/core@7.75.1(transitive)
- Removed@sentry/types@7.75.1(transitive)
- Removed@sentry/utils@7.75.1(transitive)
Updated@sentry/core@7.76.0
Updated@sentry/types@7.76.0
Updated@sentry/utils@7.76.0