react-error-boundary 4.1.2 → 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: typeof 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<Props extends object>(component: ComponentType<Props>, errorBoundaryProps: ErrorBoundaryProps): ForwardRefExoticComponent<PropsWithoutRef<Props> & RefAttributes<any>>;
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": "4.1.2",
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",
@@ -60,15 +60,15 @@
60
60
  "@preconstruct/cli": "^2.8.1",
61
61
  "@types/assert": "^1.5.10",
62
62
  "@types/jest": "^26.0.15",
63
- "@types/react": "^18",
63
+ "@types/react": "^18.3.17",
64
64
  "@types/react-dom": "^18",
65
- "@typescript-eslint/eslint-plugin": "^5.52.0",
66
65
  "assert": "^2.0.0",
67
- "eslint": "^8.0.1",
68
- "eslint-config-prettier": "^9.0.0",
66
+ "eslint": "^9.13.0",
67
+ "eslint-config-prettier": "^9.1.0",
69
68
  "eslint-plugin-import": "^2.25.2",
70
- "eslint-plugin-prettier": "^5.0.0",
71
- "eslint-plugin-react": "^7.33.1",
69
+ "eslint-plugin-prettier": "^5.2.1",
70
+ "eslint-plugin-react": "^7.37.2",
71
+ "globals": "^15.11.0",
72
72
  "jest": "^29.4.3",
73
73
  "jest-environment-jsdom": "^29.4.3",
74
74
  "prettier": "^3.0.1",
@@ -76,7 +76,8 @@
76
76
  "react-dom": "^18",
77
77
  "rimraf": "^6.0.1",
78
78
  "ts-jest": "^29.0.5",
79
- "typescript": "^5.1.6"
79
+ "typescript": "^5.1.6",
80
+ "typescript-eslint": "^8.18.0"
80
81
  },
81
82
  "peerDependencies": {
82
83
  "react": ">=16.13.1"