react-error-boundary
Advanced tools
Comparing version 4.0.4 to 4.0.5
@@ -0,1 +1,3 @@ | ||
"use client"; | ||
var $8zHUo$react = require("react"); | ||
@@ -38,3 +40,2 @@ | ||
class $6d6d4999e62b3ee0$export$e926676385687eaf extends (0, $8zHUo$react.Component) { | ||
state = $6d6d4999e62b3ee0$var$initialState; | ||
static getDerivedStateFromError(error) { | ||
@@ -46,12 +47,2 @@ return { | ||
} | ||
resetErrorBoundary = (...args)=>{ | ||
const { error: error } = this.state; | ||
if (error !== null) { | ||
this.props.onReset?.({ | ||
args: args, | ||
reason: "imperative-api" | ||
}); | ||
this.setState($6d6d4999e62b3ee0$var$initialState); | ||
} | ||
}; | ||
componentDidCatch(error, info) { | ||
@@ -98,2 +89,16 @@ this.props.onError?.(error, info); | ||
} | ||
constructor(...args){ | ||
super(...args); | ||
this.state = $6d6d4999e62b3ee0$var$initialState; | ||
this.resetErrorBoundary = (...args)=>{ | ||
const { error: error } = this.state; | ||
if (error !== null) { | ||
this.props.onReset?.({ | ||
args: args, | ||
reason: "imperative-api" | ||
}); | ||
this.setState($6d6d4999e62b3ee0$var$initialState); | ||
} | ||
}; | ||
} | ||
} | ||
@@ -164,3 +169,2 @@ function $6d6d4999e62b3ee0$var$hasArrayChanged(a = [], b = []) { | ||
"use client"; | ||
$parcel$exportWildcard(module.exports, $6d6d4999e62b3ee0$exports); | ||
@@ -167,0 +171,0 @@ $parcel$exportWildcard(module.exports, $4a61716688322eb0$exports); |
@@ -0,1 +1,3 @@ | ||
"use client"; | ||
import {isValidElement as $hgUW1$isValidElement, createElement as $hgUW1$createElement, Component as $hgUW1$Component, createContext as $hgUW1$createContext, useContext as $hgUW1$useContext, useState as $hgUW1$useState, useMemo as $hgUW1$useMemo, forwardRef as $hgUW1$forwardRef} from "react"; | ||
@@ -22,3 +24,2 @@ | ||
class $44d7e150ebc754d2$export$e926676385687eaf extends (0, $hgUW1$Component) { | ||
state = $44d7e150ebc754d2$var$initialState; | ||
static getDerivedStateFromError(error) { | ||
@@ -30,12 +31,2 @@ return { | ||
} | ||
resetErrorBoundary = (...args)=>{ | ||
const { error: error } = this.state; | ||
if (error !== null) { | ||
this.props.onReset?.({ | ||
args: args, | ||
reason: "imperative-api" | ||
}); | ||
this.setState($44d7e150ebc754d2$var$initialState); | ||
} | ||
}; | ||
componentDidCatch(error, info) { | ||
@@ -82,2 +73,16 @@ this.props.onError?.(error, info); | ||
} | ||
constructor(...args){ | ||
super(...args); | ||
this.state = $44d7e150ebc754d2$var$initialState; | ||
this.resetErrorBoundary = (...args)=>{ | ||
const { error: error } = this.state; | ||
if (error !== null) { | ||
this.props.onReset?.({ | ||
args: args, | ||
reason: "imperative-api" | ||
}); | ||
this.setState($44d7e150ebc754d2$var$initialState); | ||
} | ||
}; | ||
} | ||
} | ||
@@ -148,3 +153,2 @@ function $44d7e150ebc754d2$var$hasArrayChanged(a = [], b = []) { | ||
"use client"; | ||
@@ -151,0 +155,0 @@ |
{ | ||
"name": "react-error-boundary", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"description": "Simple reusable React error boundary component", | ||
@@ -18,8 +18,9 @@ "author": "Brian Vaughn <brian.david.vaughn@gmail.com>", | ||
], | ||
"sideEffects": false, | ||
"scripts": { | ||
"clear": "npm run clear:parcel-cache & npm run clear:builds & npm run clear:node_modules", | ||
"clear:builds": "rm -rf ./packages/*/dist", | ||
"clear:builds": "rm -rf ./dist", | ||
"clear:parcel-cache": "rm -rf ./.parcel-cache", | ||
"clear:node_modules": "rm -rf ./node_modules", | ||
"prerelease": "rm -rf ./.parcel-cache && parcel build", | ||
"prerelease": "rm -rf ./.parcel-cache && parcel build && ./postprocess.js", | ||
"prettier": "prettier --write \"**/*.{css,html,js,json,jsx,ts,tsx}\"", | ||
@@ -36,5 +37,5 @@ "prettier:ci": "prettier --check \"**/*.{css,html,js,json,jsx,ts,tsx}\"", | ||
"devDependencies": { | ||
"@parcel/core": "^2.8.3", | ||
"@parcel/packager-ts": "^2.8.3", | ||
"@parcel/transformer-typescript-types": "^2.8.3", | ||
"@parcel/core": "^2.9.0", | ||
"@parcel/packager-ts": "^2.9.0", | ||
"@parcel/transformer-typescript-types": "^2.9.0", | ||
"@types/jest": "^26.0.15", | ||
@@ -45,3 +46,3 @@ "@types/react": "^18", | ||
"jest-environment-jsdom": "^29.4.3", | ||
"parcel": "^2.8.3", | ||
"parcel": "^2.9.0", | ||
"prettier": "^2.8.6", | ||
@@ -48,0 +49,0 @@ "react": "^18", |
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
335
45676