Socket
Socket
Sign inDemoInstall

@sentry/minimal

Package Overview
Dependencies
Maintainers
8
Versions
248
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/minimal - npm Package Compare versions

Comparing version 4.0.0-beta.12 to 4.0.0-rc.0

12

dist/index.d.ts
import { Scope } from '@sentry/hub';
import { Breadcrumb, SentryEvent } from '@sentry/types';
import { Breadcrumb, SentryEvent, Severity } from '@sentry/types';
/**

@@ -7,4 +7,5 @@ * Captures an exception event and sends it to Sentry.

* @param exception An exception-like object.
* @returns The generated eventId.
*/
export declare function captureException(exception: any): void;
export declare function captureException(exception: any): string;
/**

@@ -14,4 +15,6 @@ * Captures a message event and sends it to Sentry.

* @param message The message to send to Sentry.
* @param level Define the level of the message.
* @returns The generated eventId.
*/
export declare function captureMessage(message: string): void;
export declare function captureMessage(message: string, level?: Severity): string;
/**

@@ -21,4 +24,5 @@ * Captures a manually created event and sends it to Sentry.

* @param event The event to send to Sentry.
* @returns The generated eventId.
*/
export declare function captureEvent(event: SentryEvent): void;
export declare function captureEvent(event: SentryEvent): string;
/**

@@ -25,0 +29,0 @@ * Records a new breadcrumb which will be attached to future events.

@@ -34,6 +34,8 @@ "use strict";

}
var hub = hub_1.getDefaultHub();
var hub = hub_1.getCurrentHub();
if (hub && hub[method]) {
hub[method].apply(hub, __spread(args));
// tslint:disable-next-line:no-unsafe-any
return hub[method].apply(hub, __spread(args));
}
throw new Error("No hub defined or " + method + " was not found on the hub, please open a bug report.");
}

@@ -44,5 +46,13 @@ /**

* @param exception An exception-like object.
* @returns The generated eventId.
*/
function captureException(exception) {
callOnHub('captureException', exception);
var syntheticException;
try {
throw new Error('Sentry syntheticException');
}
catch (exception) {
syntheticException = exception;
}
return callOnHub('captureException', exception, { syntheticException: syntheticException });
}

@@ -54,5 +64,14 @@ exports.captureException = captureException;

* @param message The message to send to Sentry.
* @param level Define the level of the message.
* @returns The generated eventId.
*/
function captureMessage(message) {
callOnHub('captureMessage', message);
function captureMessage(message, level) {
var syntheticException;
try {
throw new Error(message);
}
catch (exception) {
syntheticException = exception;
}
return callOnHub('captureMessage', message, level, { syntheticException: syntheticException });
}

@@ -64,5 +83,6 @@ exports.captureMessage = captureMessage;

* @param event The event to send to Sentry.
* @returns The generated eventId.
*/
function captureEvent(event) {
callOnHub('captureEvent', event);
return callOnHub('captureEvent', event);
}

@@ -69,0 +89,0 @@ exports.captureEvent = captureEvent;

{
"name": "@sentry/minimal",
"version": "4.0.0-beta.12",
"version": "4.0.0-rc.0",
"description": "Sentry minimal library that can be used in other packages",

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

"dependencies": {
"@sentry/hub": "4.0.0-beta.12",
"@sentry/types": "4.0.0-beta.12"
"@sentry/hub": "4.0.0-rc.0",
"@sentry/types": "4.0.0-rc.0"
},

@@ -25,7 +25,7 @@ "devDependencies": {

"npm-run-all": "^4.1.2",
"prettier": "^1.12.1",
"prettier": "^1.14.0",
"prettier-check": "^2.0.0",
"rimraf": "^2.6.2",
"tslint": "^5.9.1",
"typescript": "^2.8.3"
"tslint": "^5.11.0",
"typescript": "^3.0.1"
},

@@ -32,0 +32,0 @@ "scripts": {

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