@honeybadger-io/react 2.1.0 → 4.4.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.
package/README.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # Honeybadger React.js Integration
2
2
 
3
- [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fhoneybadger-io%2Fhoneybadger-react%2Fbadge&style=flat)](https://actions-badge.atrox.dev/honeybadger-io/honeybadger-react/goto)
3
+ ![Node CI](https://github.com/honeybadger-io/honeybadger-js/workflows/Node%20CI/badge.svg)
4
4
  [![npm version](https://badge.fury.io/js/%40honeybadger-io%2Freact.svg)](https://badge.fury.io/js/%40honeybadger-io%2Freact)
5
- > [React.js integration for Honeybadger.io](https://www.honeybadger.io/for/javascript/?utm_source=github&utm_medium=readme&utm_campaign=react&utm_content=React.js+integration+for+Honeybadger.io)
5
+ [![npm dm](https://img.shields.io/npm/dm/@honeybadger-io/react)](https://www.npmjs.com/package/@honeybadger-io/react)
6
+ [![npm dt](https://img.shields.io/npm/dt/@honeybadger-io/react)](https://www.npmjs.com/package/@honeybadger-io/react)
7
+
8
+ > [React.js Integration for Honeybadger.io](https://www.honeybadger.io/for/javascript/?utm_source=github&utm_medium=readme&utm_campaign=react&utm_content=React.js+integration+for+Honeybadger.io)
6
9
 
7
10
  ## Documentation and Support
8
11
 
@@ -56,19 +59,6 @@ This will serve the demo app with hot reload at localhost:3000
56
59
 
57
60
  For a detailed explanation on how hot reloading works, check out the [documentation](https://webpack.js.org/concepts/hot-module-replacement/).
58
61
 
59
- ## Changelog
60
-
61
- See https://github.com/honeybadger-io/honeybadger-react/blob/master/CHANGELOG.md
62
- Changelog is automatically generated with [our release automation process](#release-automation).
63
-
64
- ## Contributing
65
-
66
- 1. Fork it.
67
- 2. Create a topic branch `git checkout -b my_branch`
68
- 3. Commit your changes `git commit -am "Boom"`
69
- 3. Push to your branch `git push origin my_branch`
70
- 4. Send a [pull request](https://github.com/honeybadger-io/honeybadger-react/pulls)
71
-
72
62
  ## Development
73
63
 
74
64
  ``` bash
@@ -85,25 +75,6 @@ npm test
85
75
  npm run start
86
76
  ```
87
77
 
88
- ## Releasing
89
-
90
- 1. With a clean working tree, use `npm version [new version]` to bump the version,
91
- commit the changes, tag the release, and push to GitHub. See `npm help version`
92
- for documentation.
93
- 2. To publish the release, use `npm publish`. See `npm help publish` for
94
- documentation.
95
-
96
- ### Release Automation
97
-
98
- We use [Ship.js](https://github.com/algolia/shipjs) to automate releasing.
99
-
100
- Ship.js creates a PR once per week when unreleased changes are present. You can also trigger a release PR by saying "@shipjs prepare" in any issue or pull request comment on GitHub.
101
-
102
- #### Troubleshooting a failed Ship.js release
103
-
104
- If a ship.js release fails, you need to revert the release commit and delete the release branch (e.g `releases/v1.1.0`)
105
- Then, you can debug the issue by simulating the release process locally (`npm run release -- --dry-run --yes --no-browse`).
106
-
107
78
  ### License
108
79
 
109
- *honeybadger-react* is MIT licensed. See the [LICENSE](https://raw.github.com/honeybadger-io/honeybadger-react/master/LICENSE) file in this repository for details.
80
+ This package is MIT licensed. See the [MIT-LICENSE](./MIT-LICENSE) file in this folder for details.
@@ -1,5 +1,5 @@
1
- import React, { Component } from "react";
2
- import PropTypes from "prop-types";
1
+ import React, { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
3
  export interface DefaultErrorComponentProps {
4
4
  error: Error | null;
5
5
  info: React.ErrorInfo | null;
@@ -1,9 +1,9 @@
1
1
  import React, { Component, ReactNode } from 'react';
2
- import HoneybadgerClient from '@honeybadger-io/js/dist/browser/types/core/client';
3
- import { DefaultErrorComponentProps } from "./DefaultErrorComponent";
4
- import PropTypes from "prop-types";
2
+ import Honeybadger from '@honeybadger-io/js/dist/browser/honeybadger';
3
+ import { DefaultErrorComponentProps } from './DefaultErrorComponent';
4
+ import PropTypes from 'prop-types';
5
5
  interface HoneybadgerErrorBoundaryProps {
6
- honeybadger: HoneybadgerClient;
6
+ honeybadger: typeof Honeybadger;
7
7
  ErrorComponent?: ReactNode;
8
8
  }
9
9
  interface HoneybadgerErrorBoundaryState extends DefaultErrorComponentProps {
@@ -13,7 +13,7 @@ export default class HoneybadgerErrorBoundary extends Component<HoneybadgerError
13
13
  static propTypes: {
14
14
  honeybadger: PropTypes.Validator<object>;
15
15
  children: PropTypes.Requireable<PropTypes.ReactElementLike>;
16
- ErrorComponent: PropTypes.Requireable<PropTypes.ReactElementLike | ((...args: any[]) => any)>;
16
+ ErrorComponent: PropTypes.Requireable<NonNullable<PropTypes.ReactElementLike | ((...args: any[]) => any) | null | undefined>>;
17
17
  };
18
18
  constructor(props: HoneybadgerErrorBoundaryProps);
19
19
  static getDerivedStateFromError(error: Error): HoneybadgerErrorBoundaryState;
@@ -13,6 +13,7 @@ var js__default = /*#__PURE__*/_interopDefaultLegacy(js);
13
13
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
14
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
15
15
 
16
+ // eslint-disable-next-line @typescript-eslint/ban-types
16
17
  class DefaultErrorComponent extends React.Component {
17
18
  render() {
18
19
  return (jsxRuntime.jsxs("div", { className: 'error', children: [jsxRuntime.jsx("div", { children: "An Error Occurred" }), jsxRuntime.jsx("div", { children: JSON.stringify(this.props.error, null, 2) }), jsxRuntime.jsx("div", { children: this.props.info ? JSON.stringify(this.props.info, null, 2) : '' })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"honeybadger-react.cjs.js","sources":["../../src/DefaultErrorComponent.tsx","../../src/HoneybadgerErrorBoundary.tsx"],"sourcesContent":["import React, {Component} from \"react\"\nimport PropTypes from \"prop-types\";\n\nexport interface DefaultErrorComponentProps {\n error: Error | null\n info: React.ErrorInfo | null\n}\n\nexport default class DefaultErrorComponent extends Component<DefaultErrorComponentProps, {}> {\n\n static propTypes = {\n error: PropTypes.object,\n info: PropTypes.object\n }\n\n render() {\n return (\n <div className='error'>\n <div>\n An Error Occurred\n </div>\n <div>\n {JSON.stringify(this.props.error, null, 2)}\n </div>\n <div>\n {this.props.info ? JSON.stringify(this.props.info, null, 2) : ''}\n </div>\n </div>\n )\n }\n}\n","import React, {Component, ReactNode} from 'react'\nimport HoneybadgerClient from '@honeybadger-io/js/dist/browser/types/core/client'\nimport DefaultErrorComponent, {DefaultErrorComponentProps} from \"./DefaultErrorComponent\"\nimport PropTypes from \"prop-types\";\n\ninterface HoneybadgerErrorBoundaryProps {\n honeybadger: HoneybadgerClient\n ErrorComponent?: ReactNode\n}\n\ninterface HoneybadgerErrorBoundaryState extends DefaultErrorComponentProps {\n errorOccurred: boolean\n}\n\nexport default class HoneybadgerErrorBoundary extends Component<HoneybadgerErrorBoundaryProps, HoneybadgerErrorBoundaryState> {\n\n static propTypes = {\n honeybadger: PropTypes.object.isRequired,\n children: PropTypes.element,\n ErrorComponent: PropTypes.oneOfType([PropTypes.element, PropTypes.func])\n }\n\n constructor(props: HoneybadgerErrorBoundaryProps) {\n super(props)\n this.state = {\n error: null,\n info: null,\n errorOccurred: false\n }\n }\n\n public static getDerivedStateFromError(error: Error): HoneybadgerErrorBoundaryState {\n return {error: error, errorOccurred: true, info: null}\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n this.setState({errorOccurred: true, error: error, info: errorInfo})\n this.props.honeybadger.notify(error, {context: errorInfo as any})\n }\n\n private getErrorComponent(): ReactNode {\n return this.props.ErrorComponent\n ? React.createElement(this.props.ErrorComponent as any, this.state)\n : <DefaultErrorComponent {...this.state} />\n }\n\n render() {\n return (\n <>\n {this.state.errorOccurred\n ? this.getErrorComponent()\n : this.props.children\n }\n </>\n )\n }\n}\n"],"names":["Component","_jsxs","_jsx","PropTypes","React","_Fragment"],"mappings":";;;;;;;;;;;;;;;AAQqB,MAAA,qBAAsB,SAAQA,eAAyC,CAAA;IAO1F,MAAM,GAAA;QACJ,QACEC,eAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,OAAO,aACpBC,cAEM,CAAA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AAiB,GAAA;AACvB,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc;AAC9B,cAAEI,yBAAK,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,cAAqB,EAAE,IAAI,CAAC,KAAK,CAAC;cACjEF,eAAC,qBAAqB,EAAA,EAAA,GAAK,IAAI,CAAC,KAAK,GAAI,CAAA;KAC9C;IAED,MAAM,GAAA;AACJ,QAAA,QACEA,cACG,CAAAG,mBAAA,EAAA,EAAA,QAAA,EAAA,IAAI,CAAC,KAAK,CAAC,aAAa;AACvB,kBAAE,IAAI,CAAC,iBAAiB,EAAE;kBACxB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAA,CAEtB,EACJ;KACF;;AAvCM,wBAAA,CAAA,SAAS,GAAG;AACjB,IAAA,WAAW,EAAEF,6BAAS,CAAC,MAAM,CAAC,UAAU;IACxC,QAAQ,EAAEA,6BAAS,CAAC,OAAO;AAC3B,IAAA,cAAc,EAAEA,6BAAS,CAAC,SAAS,CAAC,CAACA,6BAAS,CAAC,OAAO,EAAEA,6BAAS,CAAC,IAAI,CAAC,CAAC;CACzE;;;;;;;;"}
1
+ {"version":3,"file":"honeybadger-react.cjs.js","sources":["../../build/DefaultErrorComponent.js","../../build/HoneybadgerErrorBoundary.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Component } from 'react';\nimport PropTypes from 'prop-types';\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport default class DefaultErrorComponent extends Component {\n render() {\n return (_jsxs(\"div\", { className: 'error', children: [_jsx(\"div\", { children: \"An Error Occurred\" }), _jsx(\"div\", { children: JSON.stringify(this.props.error, null, 2) }), _jsx(\"div\", { children: this.props.info ? JSON.stringify(this.props.info, null, 2) : '' })] }));\n }\n}\nDefaultErrorComponent.propTypes = {\n error: PropTypes.object,\n info: PropTypes.object\n};\n//# sourceMappingURL=DefaultErrorComponent.js.map","import { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { Component } from 'react';\nimport DefaultErrorComponent from './DefaultErrorComponent';\nimport PropTypes from 'prop-types';\nexport default class HoneybadgerErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.state = {\n error: null,\n info: null,\n errorOccurred: false\n };\n }\n static getDerivedStateFromError(error) {\n return { error: error, errorOccurred: true, info: null };\n }\n componentDidCatch(error, errorInfo) {\n this.setState({ errorOccurred: true, error: error, info: errorInfo });\n this.props.honeybadger.notify(error, { context: errorInfo });\n }\n getErrorComponent() {\n return this.props.ErrorComponent\n ? React.createElement(this.props.ErrorComponent, this.state)\n : _jsx(DefaultErrorComponent, { ...this.state });\n }\n render() {\n return (_jsx(_Fragment, { children: this.state.errorOccurred\n ? this.getErrorComponent()\n : this.props.children }));\n }\n}\nHoneybadgerErrorBoundary.propTypes = {\n honeybadger: PropTypes.object.isRequired,\n children: PropTypes.element,\n ErrorComponent: PropTypes.oneOfType([PropTypes.element, PropTypes.func])\n};\n//# sourceMappingURL=HoneybadgerErrorBoundary.js.map"],"names":["Component","_jsxs","_jsx","PropTypes","React","_Fragment"],"mappings":";;;;;;;;;;;;;;;AAGA;AACe,MAAM,qBAAqB,SAASA,eAAS,CAAC;AAC7D,IAAI,MAAM,GAAG;AACb,QAAQ,QAAQC,eAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAACC,cAAI,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAC,EAAEA,cAAI,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAEA,cAAI,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAA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C7D,KAAK;AACL,IAAI,MAAM,GAAG;AACb,QAAQ,QAAQA,cAAI,CAACG,mBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa;AACpE,kBAAkB,IAAI,CAAC,iBAAiB,EAAE;AAC1C,kBAAkB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,EAAE;AAC1C,KAAK;AACL,CAAC;AACD,wBAAwB,CAAC,SAAS,GAAG;AACrC,IAAI,WAAW,EAAEF,6BAAS,CAAC,MAAM,CAAC,UAAU;AAC5C,IAAI,QAAQ,EAAEA,6BAAS,CAAC,OAAO;AAC/B,IAAI,cAAc,EAAEA,6BAAS,CAAC,SAAS,CAAC,CAACA,6BAAS,CAAC,OAAO,EAAEA,6BAAS,CAAC,IAAI,CAAC,CAAC;AAC5E,CAAC;;;;;;;;"}
@@ -3,6 +3,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import React, { Component } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
 
6
+ // eslint-disable-next-line @typescript-eslint/ban-types
6
7
  class DefaultErrorComponent extends Component {
7
8
  render() {
8
9
  return (jsxs("div", { className: 'error', children: [jsx("div", { children: "An Error Occurred" }), jsx("div", { children: JSON.stringify(this.props.error, null, 2) }), jsx("div", { children: this.props.info ? JSON.stringify(this.props.info, null, 2) : '' })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"honeybadger-react.esm.js","sources":["../../src/DefaultErrorComponent.tsx","../../src/HoneybadgerErrorBoundary.tsx"],"sourcesContent":["import React, {Component} from \"react\"\nimport PropTypes from \"prop-types\";\n\nexport interface DefaultErrorComponentProps {\n error: Error | null\n info: React.ErrorInfo | null\n}\n\nexport default class DefaultErrorComponent extends Component<DefaultErrorComponentProps, {}> {\n\n static propTypes = {\n error: PropTypes.object,\n info: PropTypes.object\n }\n\n render() {\n return (\n <div className='error'>\n <div>\n An Error Occurred\n </div>\n <div>\n {JSON.stringify(this.props.error, null, 2)}\n </div>\n <div>\n {this.props.info ? JSON.stringify(this.props.info, null, 2) : ''}\n </div>\n </div>\n )\n }\n}\n","import React, {Component, ReactNode} from 'react'\nimport HoneybadgerClient from '@honeybadger-io/js/dist/browser/types/core/client'\nimport DefaultErrorComponent, {DefaultErrorComponentProps} from \"./DefaultErrorComponent\"\nimport PropTypes from \"prop-types\";\n\ninterface HoneybadgerErrorBoundaryProps {\n honeybadger: HoneybadgerClient\n ErrorComponent?: ReactNode\n}\n\ninterface HoneybadgerErrorBoundaryState extends DefaultErrorComponentProps {\n errorOccurred: boolean\n}\n\nexport default class HoneybadgerErrorBoundary extends Component<HoneybadgerErrorBoundaryProps, HoneybadgerErrorBoundaryState> {\n\n static propTypes = {\n honeybadger: PropTypes.object.isRequired,\n children: PropTypes.element,\n ErrorComponent: PropTypes.oneOfType([PropTypes.element, PropTypes.func])\n }\n\n constructor(props: HoneybadgerErrorBoundaryProps) {\n super(props)\n this.state = {\n error: null,\n info: null,\n errorOccurred: false\n }\n }\n\n public static getDerivedStateFromError(error: Error): HoneybadgerErrorBoundaryState {\n return {error: error, errorOccurred: true, info: null}\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n this.setState({errorOccurred: true, error: error, info: errorInfo})\n this.props.honeybadger.notify(error, {context: errorInfo as any})\n }\n\n private getErrorComponent(): ReactNode {\n return this.props.ErrorComponent\n ? React.createElement(this.props.ErrorComponent as any, this.state)\n : <DefaultErrorComponent {...this.state} />\n }\n\n render() {\n return (\n <>\n {this.state.errorOccurred\n ? this.getErrorComponent()\n : this.props.children\n }\n </>\n )\n }\n}\n"],"names":["_jsxs","_jsx","_Fragment"],"mappings":";;;;;AAQqB,MAAA,qBAAsB,SAAQ,SAAyC,CAAA;IAO1F,MAAM,GAAA;QACJ,QACEA,IAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,OAAO,aACpBC,GAEM,CAAA,KAAA,EAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,CAAA,EACNA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AAC9B,cAAE,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,cAAqB,EAAE,IAAI,CAAC,KAAK,CAAC;cACjEA,IAAC,qBAAqB,EAAA,EAAA,GAAK,IAAI,CAAC,KAAK,GAAI,CAAA;KAC9C;IAED,MAAM,GAAA;AACJ,QAAA,QACEA,GACG,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,IAAI,CAAC,KAAK,CAAC,aAAa;AACvB,kBAAE,IAAI,CAAC,iBAAiB,EAAE;kBACxB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAA,CAEtB,EACJ;KACF;;AAvCM,wBAAA,CAAA,SAAS,GAAG;AACjB,IAAA,WAAW,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IACxC,QAAQ,EAAE,SAAS,CAAC,OAAO;AAC3B,IAAA,cAAc,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;CACzE;;;;"}
1
+ {"version":3,"file":"honeybadger-react.esm.js","sources":["../../build/DefaultErrorComponent.js","../../build/HoneybadgerErrorBoundary.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Component } from 'react';\nimport PropTypes from 'prop-types';\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport default class DefaultErrorComponent extends Component {\n render() {\n return (_jsxs(\"div\", { className: 'error', children: [_jsx(\"div\", { children: \"An Error Occurred\" }), _jsx(\"div\", { children: JSON.stringify(this.props.error, null, 2) }), _jsx(\"div\", { children: this.props.info ? JSON.stringify(this.props.info, null, 2) : '' })] }));\n }\n}\nDefaultErrorComponent.propTypes = {\n error: PropTypes.object,\n info: PropTypes.object\n};\n//# sourceMappingURL=DefaultErrorComponent.js.map","import { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { Component } from 'react';\nimport DefaultErrorComponent from './DefaultErrorComponent';\nimport PropTypes from 'prop-types';\nexport default class HoneybadgerErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.state = {\n error: null,\n info: null,\n errorOccurred: false\n };\n }\n static getDerivedStateFromError(error) {\n return { error: error, errorOccurred: true, info: null };\n }\n componentDidCatch(error, errorInfo) {\n this.setState({ errorOccurred: true, error: error, info: errorInfo });\n this.props.honeybadger.notify(error, { context: errorInfo });\n }\n getErrorComponent() {\n return this.props.ErrorComponent\n ? React.createElement(this.props.ErrorComponent, this.state)\n : _jsx(DefaultErrorComponent, { ...this.state });\n }\n render() {\n return (_jsx(_Fragment, { children: this.state.errorOccurred\n ? this.getErrorComponent()\n : this.props.children }));\n }\n}\nHoneybadgerErrorBoundary.propTypes = {\n honeybadger: PropTypes.object.isRequired,\n children: PropTypes.element,\n ErrorComponent: PropTypes.oneOfType([PropTypes.element, PropTypes.func])\n};\n//# sourceMappingURL=HoneybadgerErrorBoundary.js.map"],"names":["_jsxs","_jsx","_Fragment"],"mappings":";;;;;AAGA;AACe,MAAM,qBAAqB,SAAS,SAAS,CAAC;AAC7D,IAAI,MAAM,GAAG;AACb,QAAQ,QAAQA,IAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAACC,GAAI,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAC,EAAEA,GAAI,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAEA,GAAI,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;AACpR,KAAK;AACL,CAAC;AACD,qBAAqB,C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,CAAC,aAAa;AACpE,kBAAkB,IAAI,CAAC,iBAAiB,EAAE;AAC1C,kBAAkB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,EAAE;AAC1C,KAAK;AACL,CAAC;AACD,wBAAwB,CAAC,SAAS,GAAG;AACrC,IAAI,WAAW,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;AAC5C,IAAI,QAAQ,EAAE,SAAS,CAAC,OAAO;AAC/B,IAAI,cAAc,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;AAC5E,CAAC;;;;"}
@@ -7,6 +7,7 @@ var HoneybadgerReact = (function (exports, js, jsxRuntime, React, PropTypes) {
7
7
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
8
8
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
9
9
 
10
+ // eslint-disable-next-line @typescript-eslint/ban-types
10
11
  class DefaultErrorComponent extends React.Component {
11
12
  render() {
12
13
  return (jsxRuntime.jsxs("div", { className: 'error', children: [jsxRuntime.jsx("div", { children: "An Error Occurred" }), jsxRuntime.jsx("div", { children: JSON.stringify(this.props.error, null, 2) }), jsxRuntime.jsx("div", { children: this.props.info ? JSON.stringify(this.props.info, null, 2) : '' })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"honeybadger-react.js","sources":["../../src/DefaultErrorComponent.tsx","../../src/HoneybadgerErrorBoundary.tsx"],"sourcesContent":["import React, {Component} from \"react\"\nimport PropTypes from \"prop-types\";\n\nexport interface DefaultErrorComponentProps {\n error: Error | null\n info: React.ErrorInfo | null\n}\n\nexport default class DefaultErrorComponent extends Component<DefaultErrorComponentProps, {}> {\n\n static propTypes = {\n error: PropTypes.object,\n info: PropTypes.object\n }\n\n render() {\n return (\n <div className='error'>\n <div>\n An Error Occurred\n </div>\n <div>\n {JSON.stringify(this.props.error, null, 2)}\n </div>\n <div>\n {this.props.info ? JSON.stringify(this.props.info, null, 2) : ''}\n </div>\n </div>\n )\n }\n}\n","import React, {Component, ReactNode} from 'react'\nimport HoneybadgerClient from '@honeybadger-io/js/dist/browser/types/core/client'\nimport DefaultErrorComponent, {DefaultErrorComponentProps} from \"./DefaultErrorComponent\"\nimport PropTypes from \"prop-types\";\n\ninterface HoneybadgerErrorBoundaryProps {\n honeybadger: HoneybadgerClient\n ErrorComponent?: ReactNode\n}\n\ninterface HoneybadgerErrorBoundaryState extends DefaultErrorComponentProps {\n errorOccurred: boolean\n}\n\nexport default class HoneybadgerErrorBoundary extends Component<HoneybadgerErrorBoundaryProps, HoneybadgerErrorBoundaryState> {\n\n static propTypes = {\n honeybadger: PropTypes.object.isRequired,\n children: PropTypes.element,\n ErrorComponent: PropTypes.oneOfType([PropTypes.element, PropTypes.func])\n }\n\n constructor(props: HoneybadgerErrorBoundaryProps) {\n super(props)\n this.state = {\n error: null,\n info: null,\n errorOccurred: false\n }\n }\n\n public static getDerivedStateFromError(error: Error): HoneybadgerErrorBoundaryState {\n return {error: error, errorOccurred: true, info: null}\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n this.setState({errorOccurred: true, error: error, info: errorInfo})\n this.props.honeybadger.notify(error, {context: errorInfo as any})\n }\n\n private getErrorComponent(): ReactNode {\n return this.props.ErrorComponent\n ? React.createElement(this.props.ErrorComponent as any, this.state)\n : <DefaultErrorComponent {...this.state} />\n }\n\n render() {\n return (\n <>\n {this.state.errorOccurred\n ? this.getErrorComponent()\n : this.props.children\n }\n </>\n )\n }\n}\n"],"names":["Component","_jsxs","_jsx","PropTypes","React","_Fragment"],"mappings":";;;;;;;;;IAQqB,MAAA,qBAAsB,SAAQA,eAAyC,CAAA;QAO1F,MAAM,GAAA;YACJ,QACEC,eAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,OAAO,aACpBC,cAEM,CAAA,KAAA,EAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,CAAA,EACNA,cACG,CAAA,KAAA,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,yBAAK,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,cAAqB,EAAE,IAAI,CAAC,KAAK,CAAC;kBACjEF,eAAC,qBAAqB,EAAA,EAAA,GAAK,IAAI,CAAC,KAAK,GAAI,CAAA;SAC9C;QAED,MAAM,GAAA;IACJ,QAAA,QACEA,cACG,CAAAG,mBAAA,EAAA,EAAA,QAAA,EAAA,IAAI,CAAC,KAAK,CAAC,aAAa;IACvB,kBAAE,IAAI,CAAC,iBAAiB,EAAE;sBACxB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAA,CAEtB,EACJ;SACF;;IAvCM,wBAAA,CAAA,SAAS,GAAG;IACjB,IAAA,WAAW,EAAEF,6BAAS,CAAC,MAAM,CAAC,UAAU;QACxC,QAAQ,EAAEA,6BAAS,CAAC,OAAO;IAC3B,IAAA,cAAc,EAAEA,6BAAS,CAAC,SAAS,CAAC,CAACA,6BAAS,CAAC,OAAO,EAAEA,6BAAS,CAAC,IAAI,CAAC,CAAC;KACzE;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"honeybadger-react.js","sources":["../../build/DefaultErrorComponent.js","../../build/HoneybadgerErrorBoundary.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Component } from 'react';\nimport PropTypes from 'prop-types';\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport default class DefaultErrorComponent extends Component {\n render() {\n return (_jsxs(\"div\", { className: 'error', children: [_jsx(\"div\", { children: \"An Error Occurred\" }), _jsx(\"div\", { children: JSON.stringify(this.props.error, null, 2) }), _jsx(\"div\", { children: this.props.info ? JSON.stringify(this.props.info, null, 2) : '' })] }));\n }\n}\nDefaultErrorComponent.propTypes = {\n error: PropTypes.object,\n info: PropTypes.object\n};\n//# sourceMappingURL=DefaultErrorComponent.js.map","import { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { Component } from 'react';\nimport DefaultErrorComponent from './DefaultErrorComponent';\nimport PropTypes from 'prop-types';\nexport default class HoneybadgerErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.state = {\n error: null,\n info: null,\n errorOccurred: false\n };\n }\n static getDerivedStateFromError(error) {\n return { error: error, errorOccurred: true, info: null };\n }\n componentDidCatch(error, errorInfo) {\n this.setState({ errorOccurred: true, error: error, info: errorInfo });\n this.props.honeybadger.notify(error, { context: errorInfo });\n }\n getErrorComponent() {\n return this.props.ErrorComponent\n ? React.createElement(this.props.ErrorComponent, this.state)\n : _jsx(DefaultErrorComponent, { ...this.state });\n }\n render() {\n return (_jsx(_Fragment, { children: this.state.errorOccurred\n ? this.getErrorComponent()\n : this.props.children }));\n }\n}\nHoneybadgerErrorBoundary.propTypes = {\n honeybadger: PropTypes.object.isRequired,\n children: PropTypes.element,\n ErrorComponent: PropTypes.oneOfType([PropTypes.element, PropTypes.func])\n};\n//# sourceMappingURL=HoneybadgerErrorBoundary.js.map"],"names":["Component","_jsxs","_jsx","PropTypes","React","_Fragment"],"mappings":";;;;;;;;;IAGA;IACe,MAAM,qBAAqB,SAASA,eAAS,CAAC;IAC7D,IAAI,MAAM,GAAG;IACb,QAAQ,QAAQC,eAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAACC,cAAI,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAC,EAAEA,cAAI,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAEA,cAAI,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;IACpR,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AE,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa;IACpE,kBAAkB,IAAI,CAAC,iBAAiB,EAAE;IAC1C,kBAAkB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,EAAE;IAC1C,KAAK;IACL,CAAC;IACD,wBAAwB,CAAC,SAAS,GAAG;IACrC,IAAI,WAAW,EAAEF,6BAAS,CAAC,MAAM,CAAC,UAAU;IAC5C,IAAI,QAAQ,EAAEA,6BAAS,CAAC,OAAO;IAC/B,IAAI,cAAc,EAAEA,6BAAS,CAAC,SAAS,CAAC,CAACA,6BAAS,CAAC,OAAO,EAAEA,6BAAS,CAAC,IAAI,CAAC,CAAC;IAC5E,CAAC;;;;;;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import Honeybadger from "@honeybadger-io/js";
2
- import HoneybadgerErrorBoundary from "./HoneybadgerErrorBoundary";
1
+ import Honeybadger from '@honeybadger-io/js';
2
+ import HoneybadgerErrorBoundary from './HoneybadgerErrorBoundary';
3
3
  export { Honeybadger, HoneybadgerErrorBoundary };
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@honeybadger-io/react",
3
- "version": "2.1.0",
3
+ "version": "4.4.0",
4
4
  "description": "React.js integration for honeybadger",
5
5
  "author": "Jason Truesdell <jason@yuzuten.com> (https://github.com/JasonTrue)",
6
6
  "license": "MIT",
7
+ "homepage": "https://github.com/honeybadger-io/honeybadger-js/tree/master/packages/react",
7
8
  "repository": {
8
9
  "type": "git",
9
- "url": "git+ssh://git@github.com/honeybadger-io/honeybadger-react.git"
10
+ "url": "git@github.com:honeybadger-io/honeybadger-js.git"
10
11
  },
11
12
  "main": "dist/honeybadger-react.cjs.js",
12
13
  "types": "./dist/index.d.ts",
@@ -20,28 +21,21 @@
20
21
  "scripts": {
21
22
  "test": "cross-env CI=1 react-scripts test --env=jsdom",
22
23
  "test:watch": "react-scripts test --env=jsdom",
23
- "build": "tsc --emitDeclarationOnly --noEmit false && rollup -c",
24
+ "build": "tsc --build tsconfig.json && rollup -c && tsc --build tsconfig.types.json",
24
25
  "start": "rollup -c -w",
25
- "prepare": "npm run build && husky install",
26
26
  "predeploy": "cd example && npm install && npm run build",
27
- "deploy": "gh-pages -d example/build",
28
- "preversion": "npm test",
29
- "version": "scripts/update-versions.sh",
30
- "postversion": "git push && git push --tags",
31
- "prepublishOnly": "npm run build && npm test",
32
- "release": "shipjs prepare"
27
+ "deploy": "gh-pages -d example/build"
33
28
  },
34
29
  "peerDependencies": {
30
+ "@honeybadger-io/js": "^4.3.0",
35
31
  "prop-types": "^15.5.4",
36
32
  "react": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
37
33
  "react-dom": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"
38
34
  },
39
35
  "devDependencies": {
40
- "@commitlint/cli": "^17.0.0",
41
- "@commitlint/config-conventional": "^17.0.0",
36
+ "@honeybadger-io/js": "^4.3.0",
42
37
  "@rollup/plugin-commonjs": "^22.0.0",
43
- "@rollup/plugin-typescript": "^8.3.2",
44
- "@types/jest": "^27.4.1",
38
+ "@types/jest": "^29.0.0",
45
39
  "@types/react": "^17.0.44",
46
40
  "@types/react-test-renderer": "^18.0.0",
47
41
  "@types/sinon": "^10.0.11",
@@ -59,7 +53,5 @@
59
53
  "files": [
60
54
  "dist"
61
55
  ],
62
- "dependencies": {
63
- "@honeybadger-io/js": "^4.0.3"
64
- }
56
+ "gitHead": "95d98691d52f599d14fc24c386dd76cefad5a99c"
65
57
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2018 Honeybadger Industries LLC
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.