@sentry/utils
Advanced tools
Comparing version 8.8.0 to 8.9.0
@@ -205,2 +205,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
profile: 'profile', | ||
profile_chunk: 'profile', | ||
replay_event: 'replay', | ||
@@ -207,0 +208,0 @@ replay_recording: 'replay', |
Object.defineProperty(exports, '__esModule', { value: true }); | ||
const is = require('../is.js'); | ||
const object = require('../object.js'); | ||
@@ -45,2 +46,11 @@ const supports = require('../supports.js'); | ||
// We capture the stack right here and not in the Promise error callback because Safari (and probably other | ||
// browsers too) will wipe the stack trace up to this point, only leaving us with this file which is useless. | ||
// NOTE: If you are a Sentry user, and you are seeing this stack frame, | ||
// it means the error, that was caused by your fetch call did not | ||
// have a stack trace, so the SDK backfilled the stack trace so | ||
// you can see which fetch call failed. | ||
const virtualStackTrace = new Error().stack; | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -66,2 +76,12 @@ return originalFetch.apply(worldwide.GLOBAL_OBJ, args).then( | ||
handlers.triggerHandlers('fetch', erroredHandlerData); | ||
if (is.isError(error) && error.stack === undefined) { | ||
// NOTE: If you are a Sentry user, and you are seeing this stack frame, | ||
// it means the error, that was caused by your fetch call did not | ||
// have a stack trace, so the SDK backfilled the stack trace so | ||
// you can see which fetch call failed. | ||
error.stack = virtualStackTrace; | ||
object.addNonEnumerableProperty(error, 'framesToPop', 1); | ||
} | ||
// NOTE: If you are a Sentry user, and you are seeing this stack frame, | ||
@@ -68,0 +88,0 @@ // it means the sentry.javascript SDK caught an error invoking your application code. |
Object.defineProperty(exports, '__esModule', { value: true }); | ||
const SDK_VERSION = '8.8.0'; | ||
const SDK_VERSION = '8.9.0'; | ||
exports.SDK_VERSION = SDK_VERSION; | ||
//# sourceMappingURL=version.js.map |
@@ -203,2 +203,3 @@ import { dsnToString } from './dsn.js'; | ||
profile: 'profile', | ||
profile_chunk: 'profile', | ||
replay_event: 'replay', | ||
@@ -205,0 +206,0 @@ replay_recording: 'replay', |
@@ -1,2 +0,3 @@ | ||
import { fill } from '../object.js'; | ||
import { isError } from '../is.js'; | ||
import { fill, addNonEnumerableProperty } from '../object.js'; | ||
import { supportsNativeFetch } from '../supports.js'; | ||
@@ -43,2 +44,11 @@ import { timestampInSeconds } from '../time.js'; | ||
// We capture the stack right here and not in the Promise error callback because Safari (and probably other | ||
// browsers too) will wipe the stack trace up to this point, only leaving us with this file which is useless. | ||
// NOTE: If you are a Sentry user, and you are seeing this stack frame, | ||
// it means the error, that was caused by your fetch call did not | ||
// have a stack trace, so the SDK backfilled the stack trace so | ||
// you can see which fetch call failed. | ||
const virtualStackTrace = new Error().stack; | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -64,2 +74,12 @@ return originalFetch.apply(GLOBAL_OBJ, args).then( | ||
triggerHandlers('fetch', erroredHandlerData); | ||
if (isError(error) && error.stack === undefined) { | ||
// NOTE: If you are a Sentry user, and you are seeing this stack frame, | ||
// it means the error, that was caused by your fetch call did not | ||
// have a stack trace, so the SDK backfilled the stack trace so | ||
// you can see which fetch call failed. | ||
error.stack = virtualStackTrace; | ||
addNonEnumerableProperty(error, 'framesToPop', 1); | ||
} | ||
// NOTE: If you are a Sentry user, and you are seeing this stack frame, | ||
@@ -66,0 +86,0 @@ // it means the sentry.javascript SDK caught an error invoking your application code. |
@@ -1,4 +0,4 @@ | ||
const SDK_VERSION = '8.8.0'; | ||
const SDK_VERSION = '8.9.0'; | ||
export { SDK_VERSION }; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@sentry/utils", | ||
"version": "8.8.0", | ||
"version": "8.9.0", | ||
"description": "Utilities for all Sentry JavaScript SDKs", | ||
@@ -45,3 +45,3 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/types": "8.8.0" | ||
"@sentry/types": "8.9.0" | ||
}, | ||
@@ -48,0 +48,0 @@ "devDependencies": { |
@@ -1,2 +0,2 @@ | ||
export declare const SDK_VERSION = "8.8.0"; | ||
export declare const SDK_VERSION = "8.9.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export declare const SDK_VERSION = "8.8.0"; | ||
export declare const SDK_VERSION = "8.9.0"; | ||
//# sourceMappingURL=version.d.ts.map |
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
1139279
12553
+ Added@sentry/types@8.9.0(transitive)
- Removed@sentry/types@8.8.0(transitive)
Updated@sentry/types@8.9.0