react-error-boundary 4.0.12 → 4.0.13

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.
package/README.md CHANGED
@@ -20,12 +20,12 @@ yarn add react-error-boundary
20
20
  ## API
21
21
 
22
22
  ### `ErrorBoundary` component
23
- Wrap an `ErrorBoundary` around other React components to "catch" errors and render a fallback UI. The component supports several ways to render a fallback (shown below).
23
+ Wrap an `ErrorBoundary` component around other React components to "catch" errors and render a fallback UI. The component supports several ways to render a fallback (as shown below).
24
24
 
25
25
  > **Note** `ErrorBoundary` is a _client_ component. You can only pass props to it that are serializeable or use it in files that have a `"use client";` directive.
26
26
 
27
27
  #### `ErrorBoundary` with `fallback` prop
28
- The simplest way to render a default "something went wrong" type error message.
28
+ The simplest way to render a default "something went wrong" type of error message.
29
29
  ```js
30
30
  "use client";
31
31
 
@@ -142,7 +142,7 @@ function Example() {
142
142
  ```
143
143
 
144
144
  #### Dismiss the nearest error boundary
145
- A fallback component can use this hook to request the nearest error boundary retry the render that original failed.
145
+ A fallback component can use this hook to request the nearest error boundary retry the render that originally failed.
146
146
 
147
147
  ```js
148
148
  "use client";
@@ -211,4 +211,4 @@ If using Yarn:
211
211
 
212
212
  ---
213
213
 
214
- [This blog post](https://kentcdodds.com/blog/use-react-error-boundary-to-handle-errors-in-react) shows more examples of how this package can be used, although it was written for the [version 3 API](https://github.com/bvaughn/react-error-boundary/releases/tag/v3.1.4).
214
+ [This blog post](https://kentcdodds.com/blog/use-react-error-boundary-to-handle-errors-in-react) shows more examples of how this package can be used, although it was written for the [version 3 API](https://github.com/bvaughn/react-error-boundary/releases/tag/v3.1.4).
@@ -1,3 +1,3 @@
1
1
  import { RefAttributes, ForwardRefExoticComponent, PropsWithoutRef, ComponentType } 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<Props extends object>(component: ComponentType<Props>, errorBoundaryProps: ErrorBoundaryProps): ForwardRefExoticComponent<PropsWithoutRef<Props> & RefAttributes<any>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-error-boundary",
3
- "version": "4.0.12",
3
+ "version": "4.0.13",
4
4
  "description": "Simple reusable React error boundary component",
5
5
  "author": "Brian Vaughn <brian.david.vaughn@gmail.com>",
6
6
  "license": "MIT",
@@ -44,8 +44,8 @@
44
44
  "clear:builds": "rm -rf ./dist",
45
45
  "clear:node_modules": "rm -rf ./node_modules",
46
46
  "prerelease": "preconstruct build",
47
- "prettier": "prettier --write \"**/*.{css,html,js,json,jsx,ts,tsx}\"",
48
- "prettier:ci": "prettier --check \"**/*.{css,html,js,json,jsx,ts,tsx}\"",
47
+ "lint": "eslint .",
48
+ "lint:fix": "eslint . --fix",
49
49
  "test": "jest",
50
50
  "test:watch": "jest --watch",
51
51
  "typescript": "tsc --noEmit",
@@ -58,12 +58,20 @@
58
58
  "@babel/preset-env": "^7.22.5",
59
59
  "@babel/preset-typescript": "^7.21.5",
60
60
  "@preconstruct/cli": "^2.8.1",
61
+ "@types/assert": "^1.5.10",
61
62
  "@types/jest": "^26.0.15",
62
63
  "@types/react": "^18",
63
64
  "@types/react-dom": "^18",
65
+ "@typescript-eslint/eslint-plugin": "^5.52.0",
66
+ "assert": "^2.0.0",
67
+ "eslint": "^8.0.1",
68
+ "eslint-config-prettier": "^9.0.0",
69
+ "eslint-plugin-import": "^2.25.2",
70
+ "eslint-plugin-prettier": "^5.0.0",
71
+ "eslint-plugin-react": "^7.33.1",
64
72
  "jest": "^29.4.3",
65
73
  "jest-environment-jsdom": "^29.4.3",
66
- "prettier": "^2.8.6",
74
+ "prettier": "^3.0.1",
67
75
  "react": "^18",
68
76
  "react-dom": "^18",
69
77
  "ts-jest": "^29.0.5",
@@ -72,14 +80,6 @@
72
80
  "peerDependencies": {
73
81
  "react": ">=16.13.1"
74
82
  },
75
- "eslintConfig": {
76
- "extends": "./node_modules/kcd-scripts/eslint.js",
77
- "rules": {
78
- "react/prop-types": "off",
79
- "react/no-did-update-set-state": "off",
80
- "babel/no-unused-expressions": "off"
81
- }
82
- },
83
83
  "preconstruct": {
84
84
  "exports": {
85
85
  "importConditionDefaultExport": "default"