Socket
Socket
Sign inDemoInstall

@sentry/react

Package Overview
Dependencies
Maintainers
12
Versions
382
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/react - npm Package Compare versions

Comparing version 6.10.0 to 6.11.0

4

dist/errorboundary.d.ts

@@ -9,3 +9,3 @@ import { ReportDialogOptions, Scope } from '@sentry/browser';

resetError(): void;
}) => React.ReactNode;
}) => React.ReactElement;
export declare type ErrorBoundaryProps = {

@@ -27,3 +27,3 @@ /** If a Sentry report dialog should be rendered on error */

*/
fallback?: React.ReactNode | FallbackRender;
fallback?: React.ReactElement | FallbackRender;
/** Called with the error boundary encounters an error */

@@ -30,0 +30,0 @@ onError?(error: Error, componentStack: string, eventId: string): void;

@@ -102,9 +102,16 @@ Object.defineProperty(exports, "__esModule", { value: true });

if (error) {
if (React.isValidElement(fallback)) {
return fallback;
}
var element = undefined;
if (typeof fallback === 'function') {
return fallback({ error: error, componentStack: componentStack, resetError: this.resetErrorBoundary, eventId: eventId });
element = fallback({ error: error, componentStack: componentStack, resetError: this.resetErrorBoundary, eventId: eventId });
}
// Fail gracefully if no fallback provided
else {
element = fallback;
}
if (React.isValidElement(element)) {
return element;
}
if (fallback) {
utils_1.logger.warn('fallback did not produce a valid ReactElement');
}
// Fail gracefully if no fallback provided or is not valid
return null;

@@ -111,0 +118,0 @@ }

@@ -9,3 +9,3 @@ import { ReportDialogOptions, Scope } from '@sentry/browser';

resetError(): void;
}) => React.ReactNode;
}) => React.ReactElement;
export declare type ErrorBoundaryProps = {

@@ -27,3 +27,3 @@ /** If a Sentry report dialog should be rendered on error */

*/
fallback?: React.ReactNode | FallbackRender;
fallback?: React.ReactElement | FallbackRender;
/** Called with the error boundary encounters an error */

@@ -30,0 +30,0 @@ onError?(error: Error, componentStack: string, eventId: string): void;

import { __assign, __extends, __read, __spread } from "tslib";
import { captureEvent, captureException, eventFromException, showReportDialog, withScope, } from '@sentry/browser';
import { parseSemver } from '@sentry/utils';
import { logger, parseSemver } from '@sentry/utils';
import hoistNonReactStatics from 'hoist-non-react-statics';

@@ -101,9 +101,16 @@ import * as React from 'react';

if (error) {
if (React.isValidElement(fallback)) {
return fallback;
}
var element = undefined;
if (typeof fallback === 'function') {
return fallback({ error: error, componentStack: componentStack, resetError: this.resetErrorBoundary, eventId: eventId });
element = fallback({ error: error, componentStack: componentStack, resetError: this.resetErrorBoundary, eventId: eventId });
}
// Fail gracefully if no fallback provided
else {
element = fallback;
}
if (React.isValidElement(element)) {
return element;
}
if (fallback) {
logger.warn('fallback did not produce a valid ReactElement');
}
// Fail gracefully if no fallback provided or is not valid
return null;

@@ -110,0 +117,0 @@ }

{
"name": "@sentry/react",
"version": "6.10.0",
"version": "6.11.0",
"description": "Official Sentry SDK for React.js",

@@ -19,6 +19,6 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/browser": "6.10.0",
"@sentry/minimal": "6.10.0",
"@sentry/types": "6.10.0",
"@sentry/utils": "6.10.0",
"@sentry/browser": "6.11.0",
"@sentry/minimal": "6.11.0",
"@sentry/types": "6.11.0",
"@sentry/utils": "6.11.0",
"hoist-non-react-statics": "^3.3.2",

@@ -31,3 +31,3 @@ "tslib": "^1.9.3"

"devDependencies": {
"@sentry-internal/eslint-config-sdk": "6.10.0",
"@sentry-internal/eslint-config-sdk": "6.11.0",
"@testing-library/react": "^11.2.6",

@@ -34,0 +34,0 @@ "@testing-library/react-hooks": "^5.1.1",

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

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