Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/hub

Package Overview
Dependencies
Maintainers
8
Versions
432
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/hub - npm Package Compare versions

Comparing version 4.0.1 to 4.0.5

6

dist/global.d.ts

@@ -6,2 +6,8 @@ import { Hub } from './hub';

/**
* Replaces the current main hub with the passed one on the global object
*
* @returns The old replaced hub
*/
export declare function makeMain(hub?: Hub): Hub | undefined;
/**
* Returns the default hub instance.

@@ -8,0 +14,0 @@ *

@@ -15,2 +15,14 @@ "use strict";

/**
* Replaces the current main hub with the passed one on the global object
*
* @returns The old replaced hub
*/
function makeMain(hub) {
var registry = getMainCarrier();
var oldHub = registry.hub;
registry.hub = hub;
return oldHub;
}
exports.makeMain = makeMain;
/**
* Returns the default hub instance.

@@ -17,0 +29,0 @@ *

@@ -144,2 +144,8 @@ import { Breadcrumb, SentryBreadcrumbHint, SentryEvent, SentryEventHint, Severity } from '@sentry/types';

configureScope(callback: (scope: Scope) => void): void;
/**
* For the duraction of the callback, this hub will be set as the global current Hub.
* This function is useful if you want to run your own client and hook into an already initialized one
* e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration
*/
run(callback: ((hub: Hub) => void)): void;
}

@@ -35,2 +35,3 @@ "use strict";

var misc_1 = require("@sentry/utils/misc");
var global_1 = require("./global");
var scope_1 = require("./scope");

@@ -268,2 +269,16 @@ /**

};
/**
* For the duraction of the callback, this hub will be set as the global current Hub.
* This function is useful if you want to run your own client and hook into an already initialized one
* e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration
*/
Hub.prototype.run = function (callback) {
var oldHub = global_1.makeMain(this);
try {
callback(this);
}
finally {
global_1.makeMain(oldHub);
}
};
return Hub;

@@ -270,0 +285,0 @@ }());

6

package.json
{
"name": "@sentry/hub",
"version": "4.0.1",
"version": "4.0.5",
"description": "Sentry hub which handles global state managment.",

@@ -18,4 +18,4 @@ "repository": "git://github.com/getsentry/raven-js.git",

"dependencies": {
"@sentry/types": "4.0.0",
"@sentry/utils": "4.0.1"
"@sentry/types": "4.0.1",
"@sentry/utils": "4.0.5"
},

@@ -22,0 +22,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc