react-error-boundary 4.1.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentType, ErrorInfo, PropsWithChildren, ReactNode } from "react";
|
|
2
|
-
declare function FallbackRender(props: FallbackProps): ReactNode;
|
|
3
2
|
export type FallbackProps = {
|
|
4
3
|
error: any;
|
|
5
4
|
resetErrorBoundary: (...args: any[]) => void;
|
|
@@ -24,7 +23,7 @@ export type ErrorBoundaryPropsWithComponent = ErrorBoundarySharedProps & {
|
|
|
24
23
|
export type ErrorBoundaryPropsWithRender = ErrorBoundarySharedProps & {
|
|
25
24
|
fallback?: never;
|
|
26
25
|
FallbackComponent?: never;
|
|
27
|
-
fallbackRender:
|
|
26
|
+
fallbackRender: (props: FallbackProps) => ReactNode;
|
|
28
27
|
};
|
|
29
28
|
export type ErrorBoundaryPropsWithFallback = ErrorBoundarySharedProps & {
|
|
30
29
|
fallback: ReactNode;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { RefAttributes, ForwardRefExoticComponent, PropsWithoutRef, ComponentType } from "react";
|
|
1
|
+
import { RefAttributes, ForwardRefExoticComponent, PropsWithoutRef, ComponentType, ComponentRef, ComponentProps } from "react";
|
|
2
2
|
import { ErrorBoundaryProps } from "./types.js";
|
|
3
|
-
export declare function withErrorBoundary<
|
|
3
|
+
export declare function withErrorBoundary<T extends ComponentType<any>>(component: T, errorBoundaryProps: ErrorBoundaryProps): ForwardRefExoticComponent<PropsWithoutRef<ComponentProps<T>> & RefAttributes<ComponentRef<T>>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-error-boundary",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Simple reusable React error boundary component",
|
|
5
5
|
"author": "Brian Vaughn <brian.david.vaughn@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,9 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/bvaughn/react-error-boundary"
|
|
10
10
|
},
|
|
11
|
-
"
|
|
12
|
-
"pnpm": "=9"
|
|
13
|
-
},
|
|
11
|
+
"packageManager": "pnpm@9.6.0",
|
|
14
12
|
"main": "dist/react-error-boundary.cjs.js",
|
|
15
13
|
"module": "dist/react-error-boundary.esm.js",
|
|
16
14
|
"exports": {
|
|
@@ -62,15 +60,15 @@
|
|
|
62
60
|
"@preconstruct/cli": "^2.8.1",
|
|
63
61
|
"@types/assert": "^1.5.10",
|
|
64
62
|
"@types/jest": "^26.0.15",
|
|
65
|
-
"@types/react": "^18",
|
|
63
|
+
"@types/react": "^18.3.17",
|
|
66
64
|
"@types/react-dom": "^18",
|
|
67
|
-
"@typescript-eslint/eslint-plugin": "^5.52.0",
|
|
68
65
|
"assert": "^2.0.0",
|
|
69
|
-
"eslint": "^
|
|
70
|
-
"eslint-config-prettier": "^9.
|
|
66
|
+
"eslint": "^9.13.0",
|
|
67
|
+
"eslint-config-prettier": "^9.1.0",
|
|
71
68
|
"eslint-plugin-import": "^2.25.2",
|
|
72
|
-
"eslint-plugin-prettier": "^5.
|
|
73
|
-
"eslint-plugin-react": "^7.
|
|
69
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
70
|
+
"eslint-plugin-react": "^7.37.2",
|
|
71
|
+
"globals": "^15.11.0",
|
|
74
72
|
"jest": "^29.4.3",
|
|
75
73
|
"jest-environment-jsdom": "^29.4.3",
|
|
76
74
|
"prettier": "^3.0.1",
|
|
@@ -78,7 +76,8 @@
|
|
|
78
76
|
"react-dom": "^18",
|
|
79
77
|
"rimraf": "^6.0.1",
|
|
80
78
|
"ts-jest": "^29.0.5",
|
|
81
|
-
"typescript": "^5.1.6"
|
|
79
|
+
"typescript": "^5.1.6",
|
|
80
|
+
"typescript-eslint": "^8.18.0"
|
|
82
81
|
},
|
|
83
82
|
"peerDependencies": {
|
|
84
83
|
"react": ">=16.13.1"
|