react-badly
Advanced tools
Comparing version 1.0.7 to 1.0.9
/** | ||
* react-badly v1.0.7 | ||
* https://github.com/maniator/react-badly#readme | ||
* react-badly v1.0.9 | ||
* https://github.com/serveside/react-badly#readme | ||
* @author Naftali Lubin <naftalilubin@gmail.com> | ||
@@ -20,3 +20,3 @@ * @preserve | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
@@ -104,2 +104,2 @@ var noop = function noop() { | ||
export default ReactBadly; | ||
export { ReactBadly as default }; |
/** | ||
* react-badly v1.0.7 | ||
* https://github.com/maniator/react-badly#readme | ||
* react-badly v1.0.9 | ||
* https://github.com/serveside/react-badly#readme | ||
* @author Naftali Lubin <naftalilubin@gmail.com> | ||
@@ -10,18 +10,27 @@ * @preserve | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var _classCallCheck = _interopDefault(require('@babel/runtime/helpers/classCallCheck')); | ||
var _createClass = _interopDefault(require('@babel/runtime/helpers/createClass')); | ||
var _assertThisInitialized = _interopDefault(require('@babel/runtime/helpers/assertThisInitialized')); | ||
var _inherits = _interopDefault(require('@babel/runtime/helpers/inherits')); | ||
var _possibleConstructorReturn = _interopDefault(require('@babel/runtime/helpers/possibleConstructorReturn')); | ||
var _getPrototypeOf = _interopDefault(require('@babel/runtime/helpers/getPrototypeOf')); | ||
var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty')); | ||
var _classCallCheck = require('@babel/runtime/helpers/classCallCheck'); | ||
var _createClass = require('@babel/runtime/helpers/createClass'); | ||
var _assertThisInitialized = require('@babel/runtime/helpers/assertThisInitialized'); | ||
var _inherits = require('@babel/runtime/helpers/inherits'); | ||
var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstructorReturn'); | ||
var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf'); | ||
var _defineProperty = require('@babel/runtime/helpers/defineProperty'); | ||
var react = require('react'); | ||
var PropTypes = _interopDefault(require('prop-types')); | ||
var PropTypes = require('prop-types'); | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck); | ||
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass); | ||
var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized); | ||
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits); | ||
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn); | ||
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf); | ||
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty); | ||
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes); | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
var noop = function noop() { | ||
@@ -36,3 +45,3 @@ return null; | ||
var ReactBadly = /*#__PURE__*/function (_PureComponent) { | ||
_inherits(ReactBadly, _PureComponent); | ||
_inherits__default["default"](ReactBadly, _PureComponent); | ||
@@ -44,3 +53,3 @@ var _super = _createSuper(ReactBadly); | ||
_classCallCheck(this, ReactBadly); | ||
_classCallCheck__default["default"](this, ReactBadly); | ||
@@ -53,3 +62,3 @@ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
_defineProperty(_assertThisInitialized(_this), "state", { | ||
_defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "state", { | ||
hasError: false | ||
@@ -61,3 +70,3 @@ }); | ||
_createClass(ReactBadly, [{ | ||
_createClass__default["default"](ReactBadly, [{ | ||
key: "componentDidCatch", | ||
@@ -103,5 +112,5 @@ value: function componentDidCatch(error, info) { | ||
ReactBadly.propTypes = { | ||
children: PropTypes.node.isRequired, | ||
onError: PropTypes.func, | ||
render: PropTypes.func | ||
children: PropTypes__default["default"].node.isRequired, | ||
onError: PropTypes__default["default"].func, | ||
render: PropTypes__default["default"].func | ||
}; | ||
@@ -108,0 +117,0 @@ ReactBadly.defaultProps = { |
/** | ||
* react-badly v1.0.7 | ||
* https://github.com/maniator/react-badly#readme | ||
* react-badly v1.0.9 | ||
* https://github.com/serveside/react-badly#readme | ||
* @author Naftali Lubin <naftalilubin@gmail.com> | ||
@@ -8,2 +8,2 @@ * @preserve | ||
"use strict";function r(r){return r&&"object"==typeof r&&"default"in r?r.default:r}var e=r(require("@babel/runtime/helpers/classCallCheck")),t=r(require("@babel/runtime/helpers/createClass")),n=r(require("@babel/runtime/helpers/assertThisInitialized")),o=r(require("@babel/runtime/helpers/inherits")),i=r(require("@babel/runtime/helpers/possibleConstructorReturn")),u=r(require("@babel/runtime/helpers/getPrototypeOf")),c=r(require("@babel/runtime/helpers/defineProperty")),a=require("react"),s=r(require("prop-types"));function l(r){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(r){return!1}}();return function(){var t,n=u(r);if(e){var o=u(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return i(this,t)}}var f=function(){return null},p=function(r){return r&&"[object Function]"===Object.prototype.toString.call(r)},h=function(r){o(u,r);var i=l(u);function u(){var r;e(this,u);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return r=i.call.apply(i,[this].concat(o)),c(n(r),"state",{hasError:!1}),r}return t(u,[{key:"componentDidCatch",value:function(r,e){var t=this.props.onError,n=p(t)?t:f;this.setState({hasError:!0,errorInformation:{error:r,info:e}},(function(){n(r,e)}))}},{key:"render",value:function(){var r=this.props,e=r.render,t=r.children,n=this.state,o=n.hasError,i=n.errorInformation;return o?p(e)?e(i):null:t}}]),u}(a.PureComponent);h.propTypes={children:s.node.isRequired,onError:s.func,render:s.func},h.defaultProps={onError:f,render:f},module.exports=h; | ||
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/assertThisInitialized"),n=require("@babel/runtime/helpers/inherits"),u=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),i=require("@babel/runtime/helpers/defineProperty"),a=require("react"),l=require("prop-types");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=c(e),s=c(r),p=c(t),d=c(n),h=c(u),b=c(o),y=c(i),v=c(l);function m(e){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,n=b.default(e);if(r){var u=b.default(this).constructor;t=Reflect.construct(n,arguments,u)}else t=n.apply(this,arguments);return h.default(this,t)}}var q=function(){return null},R=function(e){return e&&"[object Function]"===Object.prototype.toString.call(e)},C=function(e){d.default(t,e);var r=m(t);function t(){var e;f.default(this,t);for(var n=arguments.length,u=new Array(n),o=0;o<n;o++)u[o]=arguments[o];return e=r.call.apply(r,[this].concat(u)),y.default(p.default(e),"state",{hasError:!1}),e}return s.default(t,[{key:"componentDidCatch",value:function(e,r){var t=this.props.onError,n=R(t)?t:q;this.setState({hasError:!0,errorInformation:{error:e,info:r}},(function(){n(e,r)}))}},{key:"render",value:function(){var e=this.props,r=e.render,t=e.children,n=this.state,u=n.hasError,o=n.errorInformation;return u?R(r)?r(o):null:t}}]),t}(a.PureComponent);C.propTypes={children:v.default.node.isRequired,onError:v.default.func,render:v.default.func},C.defaultProps={onError:q,render:q},module.exports=C; |
{ | ||
"name": "react-badly", | ||
"version": "1.0.7", | ||
"version": "1.0.9", | ||
"description": "Error boundary react component", | ||
@@ -9,10 +9,11 @@ "main": "dist/index.js", | ||
"test": "echo \"Error: no test specified\" && exit 0", | ||
"prepublishOnly": "npm run build", | ||
"build": "rimraf dist && npm-run-all build:*", | ||
"build:rollup": "rollup -c", | ||
"watch": "rollup -c -w", | ||
"release": "NODE_ENV=production node release.js" | ||
"prepare": "husky install" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/maniator/react-badly.git" | ||
"url": "git+https://github.com/serveside/react-badly.git" | ||
}, | ||
@@ -27,25 +28,18 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/maniator/react-badly/issues" | ||
"url": "https://github.com/serveside/react-badly/issues" | ||
}, | ||
"homepage": "https://github.com/maniator/react-badly#readme", | ||
"homepage": "https://github.com/serveside/react-badly#readme", | ||
"lint-staged": { | ||
"./**/*.{js,jsx}": [ | ||
"prettier --write", | ||
"eslint --fix" | ||
] | ||
"*.{js,jsx}": "eslint --cache --fix", | ||
"*.{js,jsx,json,css,md}": "prettier --write" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "yarn lint-staged" | ||
} | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.10.3" | ||
}, | ||
"dependencies": {}, | ||
"peerDependencies": { | ||
"prop-types": "^15.7.2", | ||
"react": "^16.2.0" | ||
"@babel/runtime": "^7.14.0", | ||
"prop-types": ">=15", | ||
"react": ">=16" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.10.3", | ||
"@babel/runtime": "^7.14.0", | ||
"@babel/plugin-proposal-class-properties": "^7.10.1", | ||
@@ -57,4 +51,4 @@ "@babel/plugin-transform-runtime": "^7.10.3", | ||
"babel-eslint": "^10.1.0", | ||
"eslint": "^7.3.1", | ||
"eslint-config-airbnb": "^18.2.0", | ||
"eslint": "^8.14.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-plugin-import": "^2.21.2", | ||
@@ -64,17 +58,17 @@ "eslint-plugin-jsx-a11y": "^6.3.1", | ||
"eslint-plugin-react-hooks": "^4.0.4", | ||
"husky": "^4.2.5", | ||
"inquirer": "^5.0.0", | ||
"lint-staged": "^10.2.11", | ||
"husky": "^8.0.1", | ||
"inquirer": "^8.2.4", | ||
"lint-staged": "^12.4.1", | ||
"prettier": "^2.0.5", | ||
"prop-types": "^15.7.2", | ||
"react": "^16.13.1", | ||
"rimraf": "^2.6.2", | ||
"prop-types": "^15.8.1", | ||
"react": "^16.14.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.18.0", | ||
"rollup-plugin-filesize": "^9.0.1", | ||
"rollup-plugin-license": "^2.1.0", | ||
"rollup-plugin-terser": "^6.1.0", | ||
"semver": "^5.4.1", | ||
"shelljs": "^0.7.8", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"semver": "^7.3.7", | ||
"shelljs": "^0.8.5", | ||
"yarn-run-all": "^3.1.1" | ||
} | ||
} |
@@ -5,2 +5,4 @@ # react-badly | ||
[![npm version](https://badge.fury.io/js/react-badly.svg)](https://www.npmjs.com/package/react-badly) | ||
You can install off of npm with | ||
@@ -7,0 +9,0 @@ |
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
14049
6
194
82
28
+ Addedreact@18.3.1(transitive)
- Removed@babel/runtime@^7.10.3
- Removedreact@16.14.0(transitive)