@sentry/utils
Advanced tools
Comparing version 8.7.0 to 8.8.0
Object.defineProperty(exports, '__esModule', { value: true }); | ||
const aggregateErrors = require('./aggregate-errors.js'); | ||
const array = require('./array.js'); | ||
const browser = require('./browser.js'); | ||
@@ -56,2 +57,3 @@ const dsn = require('./dsn.js'); | ||
exports.applyAggregateErrorsToEvent = aggregateErrors.applyAggregateErrorsToEvent; | ||
exports.flatten = array.flatten; | ||
exports.getComponentName = browser.getComponentName; | ||
@@ -137,2 +139,3 @@ exports.getDomElement = browser.getDomElement; | ||
exports.createStackParser = stacktrace.createStackParser; | ||
exports.getFramesFromEvent = stacktrace.getFramesFromEvent; | ||
exports.getFunctionName = stacktrace.getFunctionName; | ||
@@ -139,0 +142,0 @@ exports.stackParserFromStackParserOptions = stacktrace.stackParserFromStackParserOptions; |
@@ -137,4 +137,30 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
* Get's stack frames from an event without needing to check for undefined properties. | ||
*/ | ||
function getFramesFromEvent(event) { | ||
const exception = event.exception; | ||
if (exception) { | ||
const frames = []; | ||
try { | ||
// @ts-expect-error Object could be undefined | ||
exception.values.forEach(value => { | ||
// @ts-expect-error Value could be undefined | ||
if (value.stacktrace.frames) { | ||
// @ts-expect-error Value could be undefined | ||
frames.push(...value.stacktrace.frames); | ||
} | ||
}); | ||
return frames; | ||
} catch (_oO) { | ||
return undefined; | ||
} | ||
} | ||
return undefined; | ||
} | ||
exports.UNKNOWN_FUNCTION = UNKNOWN_FUNCTION; | ||
exports.createStackParser = createStackParser; | ||
exports.getFramesFromEvent = getFramesFromEvent; | ||
exports.getFunctionName = getFunctionName; | ||
@@ -141,0 +167,0 @@ exports.stackParserFromStackParserOptions = stackParserFromStackParserOptions; |
Object.defineProperty(exports, '__esModule', { value: true }); | ||
const SDK_VERSION = '8.7.0'; | ||
const SDK_VERSION = '8.8.0'; | ||
exports.SDK_VERSION = SDK_VERSION; | ||
//# sourceMappingURL=version.js.map |
export { applyAggregateErrorsToEvent } from './aggregate-errors.js'; | ||
export { flatten } from './array.js'; | ||
export { getComponentName, getDomElement, getLocationHref, htmlTreeAsString } from './browser.js'; | ||
@@ -23,3 +24,3 @@ export { dsnFromString, dsnToString, makeDsn } from './dsn.js'; | ||
export { severityLevelFromString, validSeverityLevels } from './severity.js'; | ||
export { UNKNOWN_FUNCTION, createStackParser, getFunctionName, stackParserFromStackParserOptions, stripSentryFramesAndReverse } from './stacktrace.js'; | ||
export { UNKNOWN_FUNCTION, createStackParser, getFramesFromEvent, getFunctionName, stackParserFromStackParserOptions, stripSentryFramesAndReverse } from './stacktrace.js'; | ||
export { filenameIsInApp, node, nodeStackLineParser } from './node-stack-trace.js'; | ||
@@ -26,0 +27,0 @@ export { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate } from './string.js'; |
@@ -135,3 +135,28 @@ const STACKTRACE_FRAME_LIMIT = 50; | ||
export { UNKNOWN_FUNCTION, createStackParser, getFunctionName, stackParserFromStackParserOptions, stripSentryFramesAndReverse }; | ||
/** | ||
* Get's stack frames from an event without needing to check for undefined properties. | ||
*/ | ||
function getFramesFromEvent(event) { | ||
const exception = event.exception; | ||
if (exception) { | ||
const frames = []; | ||
try { | ||
// @ts-expect-error Object could be undefined | ||
exception.values.forEach(value => { | ||
// @ts-expect-error Value could be undefined | ||
if (value.stacktrace.frames) { | ||
// @ts-expect-error Value could be undefined | ||
frames.push(...value.stacktrace.frames); | ||
} | ||
}); | ||
return frames; | ||
} catch (_oO) { | ||
return undefined; | ||
} | ||
} | ||
return undefined; | ||
} | ||
export { UNKNOWN_FUNCTION, createStackParser, getFramesFromEvent, getFunctionName, stackParserFromStackParserOptions, stripSentryFramesAndReverse }; | ||
//# sourceMappingURL=stacktrace.js.map |
@@ -1,4 +0,4 @@ | ||
const SDK_VERSION = '8.7.0'; | ||
const SDK_VERSION = '8.8.0'; | ||
export { SDK_VERSION }; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@sentry/utils", | ||
"version": "8.7.0", | ||
"version": "8.8.0", | ||
"description": "Utilities for all Sentry JavaScript SDKs", | ||
@@ -45,3 +45,3 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/types": "8.7.0" | ||
"@sentry/types": "8.8.0" | ||
}, | ||
@@ -48,0 +48,0 @@ "devDependencies": { |
export * from './aggregate-errors'; | ||
export * from './array'; | ||
export * from './browser'; | ||
@@ -3,0 +4,0 @@ export * from './dsn'; |
@@ -1,2 +0,2 @@ | ||
import { StackFrame, StackLineParser, StackParser } from '@sentry/types'; | ||
import { Event, StackFrame, StackLineParser, StackParser } from '@sentry/types'; | ||
export declare const UNKNOWN_FUNCTION = "?"; | ||
@@ -29,2 +29,6 @@ /** | ||
export declare function getFunctionName(fn: unknown): string; | ||
/** | ||
* Get's stack frames from an event without needing to check for undefined properties. | ||
*/ | ||
export declare function getFramesFromEvent(event: Event): StackFrame[] | undefined; | ||
//# sourceMappingURL=stacktrace.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export declare const SDK_VERSION = "8.7.0"; | ||
export declare const SDK_VERSION = "8.8.0"; | ||
//# sourceMappingURL=version.d.ts.map |
export * from './aggregate-errors'; | ||
export * from './array'; | ||
export * from './browser'; | ||
@@ -3,0 +4,0 @@ export * from './dsn'; |
@@ -1,2 +0,2 @@ | ||
import type { StackFrame, StackLineParser, StackParser } from '@sentry/types'; | ||
import type { Event, StackFrame, StackLineParser, StackParser } from '@sentry/types'; | ||
export declare const UNKNOWN_FUNCTION = "?"; | ||
@@ -29,2 +29,6 @@ /** | ||
export declare function getFunctionName(fn: unknown): string; | ||
/** | ||
* Get's stack frames from an event without needing to check for undefined properties. | ||
*/ | ||
export declare function getFramesFromEvent(event: Event): StackFrame[] | undefined; | ||
//# sourceMappingURL=stacktrace.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export declare const SDK_VERSION = "8.7.0"; | ||
export declare const SDK_VERSION = "8.8.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
1133968
386
12519
5
+ Added@sentry/types@8.8.0(transitive)
- Removed@sentry/types@8.7.0(transitive)
Updated@sentry/types@8.8.0