@sentry/utils
Advanced tools
Comparing version 5.0.0-rc.2 to 5.0.0-rc.3
@@ -63,4 +63,6 @@ "use strict"; | ||
}()); | ||
var logger = new Logger(); | ||
// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used | ||
global.__SENTRY__ = global.__SENTRY__ || {}; | ||
var logger = global.__SENTRY__.logger || (global.__SENTRY__.logger = new Logger()); | ||
exports.logger = logger; | ||
//# sourceMappingURL=logger.js.map |
/// <reference types="node" /> | ||
import { Event, Mechanism } from '@sentry/types'; | ||
/** Internal */ | ||
interface SentryGlobal { | ||
__SENTRY__: { | ||
globalEventProcessors: any; | ||
hub: any; | ||
logger: any; | ||
}; | ||
} | ||
/** | ||
@@ -20,3 +28,3 @@ * Requires a module which is protected _against bundler minification. | ||
*/ | ||
export declare function getGlobalObject(): Window | NodeJS.Global | {}; | ||
export declare function getGlobalObject<T extends Window | NodeJS.Global = any>(): T & SentryGlobal; | ||
/** | ||
@@ -70,1 +78,2 @@ * UUID4 generator | ||
export declare function addExceptionTypeValue(event: Event, value?: string, type?: string, mechanism?: Mechanism): void; | ||
export {}; |
@@ -31,3 +31,3 @@ "use strict"; | ||
function getGlobalObject() { | ||
return isNodeEnv() | ||
return (isNodeEnv() | ||
? global | ||
@@ -38,3 +38,3 @@ : typeof window !== 'undefined' | ||
? self | ||
: fallbackGlobalObject; | ||
: fallbackGlobalObject); | ||
} | ||
@@ -41,0 +41,0 @@ exports.getGlobalObject = getGlobalObject; |
{ | ||
"name": "@sentry/utils", | ||
"version": "5.0.0-rc.2", | ||
"version": "5.0.0-rc.3", | ||
"description": "Utilities for all Sentry JavaScript SDKs", | ||
@@ -16,3 +16,3 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/types": "5.0.0-rc.2", | ||
"@sentry/types": "5.0.0-rc.3", | ||
"tslib": "^1.9.3" | ||
@@ -19,0 +19,0 @@ }, |
@@ -94,5 +94,3 @@ "use strict"; | ||
var global = misc_1.getGlobalObject(); | ||
var fetch = global.fetch; | ||
// tslint:disable-next-line:no-unsafe-any | ||
return fetch.toString().indexOf('native') !== -1; | ||
return global.fetch.toString().indexOf('native') !== -1; | ||
} | ||
@@ -107,2 +105,3 @@ exports.supportsNativeFetch = supportsNativeFetch; | ||
function supportsReportingObserver() { | ||
// tslint:disable-next-line: no-unsafe-any | ||
return 'ReportingObserver' in misc_1.getGlobalObject(); | ||
@@ -109,0 +108,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
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
155677
2095
0
+ Added@sentry/types@5.0.0-rc.3(transitive)
- Removed@sentry/types@5.0.0-rc.2(transitive)
Updated@sentry/types@5.0.0-rc.3