From e332bb30f31b502b6a7f4df59c6563259ace75e1 Mon Sep 17 00:00:00 2001 From: kou_hin Date: Tue, 23 May 2017 17:17:43 +0900 Subject: [PATCH 1/5] Change main branch to master --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ed41ca..e73aaeb 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ rrr-lazy Lazy load component with react && react-router && react-router-hook. -[![CircleCI](https://circleci.com/gh/kouhin/rrr-lazy/tree/develop.svg?style=svg)](https://circleci.com/gh/kouhin/rrr-lazy/tree/develop) +[![CircleCI](https://circleci.com/gh/kouhin/rrr-lazy/tree/master.svg?style=svg)](https://circleci.com/gh/kouhin/rrr-lazy/tree/master) [![dependency status](https://david-dm.org/kouhin/rrr-lazy.svg?style=flat-square)](https://david-dm.org/kouhin/rrr-lazy) ## Installationg From 2c2e20f09fd129713bdc7dcc8e6a5c13c7c845c1 Mon Sep 17 00:00:00 2001 From: kou_hin Date: Tue, 23 May 2017 17:22:14 +0900 Subject: [PATCH 2/5] Update library and add prop-types --- package.json | 21 +++++++++++---------- src/Lazy.js | 27 ++++++++++++++------------- src/decorator.js | 3 ++- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index bb6c12c..b2e5d9e 100644 --- a/package.json +++ b/package.json @@ -31,24 +31,25 @@ "author": "Bin Hou (https://twitter.com/houbin217jz)", "license": "MIT", "devDependencies": { - "babel-cli": "^6.23.0", - "babel-core": "^6.23.1", - "babel-eslint": "^7.1.1", + "babel-cli": "^6.24.1", + "babel-core": "^6.24.1", + "babel-eslint": "^7.2.3", "babel-plugin-transform-runtime": "^6.23.0", - "babel-preset-env": "^1.2.1", - "babel-preset-react": "^6.23.0", - "babel-preset-stage-0": "^6.22.0", - "eslint-config-airbnb-deps": "^14.1.0", + "babel-preset-env": "^1.5.1", + "babel-preset-react": "^6.24.1", + "babel-preset-stage-0": "^6.24.1", + "eslint-config-airbnb-deps": "^15.0.1", "eslint-plugin-babel": "^4.1.1", - "react": "^15.4.2", - "react-dom": "^15.4.2", + "react": "^15.5.4", + "react-dom": "^15.5.4", "rimraf": "^2.6.1" }, "dependencies": { "babel-runtime": "^6.23.0", "classnames": "^2.2.5", "hoist-non-react-statics": "^1.2.0", - "intersection-observer": "^0.2.1" + "intersection-observer": "^0.2.1", + "prop-types": "^15.5.10" }, "peerDependencies": { "react": "^0.14.0 || ^15.0.0-0", diff --git a/src/Lazy.js b/src/Lazy.js index 97afc2a..bb1791d 100644 --- a/src/Lazy.js +++ b/src/Lazy.js @@ -1,5 +1,6 @@ import React from 'react'; import cx from 'classnames'; +import PropTypes from 'prop-types'; import { getHistory } from './history'; import watchOnce from './watchOnce'; @@ -13,20 +14,20 @@ const Status = { export default class Lazy extends React.PureComponent { static propTypes = { - autoReset: React.PropTypes.bool, - children: React.PropTypes.node, - className: React.PropTypes.string, - mode: React.PropTypes.oneOf(['container', 'placeholder']), - offset: React.PropTypes.oneOfType([ - React.PropTypes.number, - React.PropTypes.string, + autoReset: PropTypes.bool, + children: PropTypes.node, + className: PropTypes.string, + mode: PropTypes.oneOf(['container', 'placeholder']), + offset: PropTypes.oneOfType([ + PropTypes.number, + PropTypes.string, ]), - placeholder: React.PropTypes.func, - reloadLazyComponent: React.PropTypes.func, - resetLazyComponent: React.PropTypes.func, - style: React.PropTypes.object, // eslint-disable-line react/forbid-prop-types - visibleClassName: React.PropTypes.string, - onContentVisible: React.PropTypes.func, + placeholder: PropTypes.func, + reloadLazyComponent: PropTypes.func, + resetLazyComponent: PropTypes.func, + style: PropTypes.object, // eslint-disable-line react/forbid-prop-types + visibleClassName: PropTypes.string, + onContentVisible: PropTypes.func, }; static get defaultProps() { diff --git a/src/decorator.js b/src/decorator.js index fe6921c..798b743 100644 --- a/src/decorator.js +++ b/src/decorator.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import hoistStatics from 'hoist-non-react-statics'; import Lazy from './Lazy'; @@ -27,7 +28,7 @@ function interopRequireDefault(obj) { export default (options = {}) => (Component = null) => { class LazyDecorated extends React.PureComponent { static propTypes = { - reloadComponent: React.PropTypes.func, + reloadComponent: PropTypes.func, }; static get defaultProps() { From 9a08901858bd5f4cfc4cbc3d30c6b7d2a4e68cd9 Mon Sep 17 00:00:00 2001 From: kou_hin Date: Tue, 23 May 2017 18:30:06 +0900 Subject: [PATCH 3/5] v1.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b2e5d9e..554bc50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rrr-lazy", - "version": "1.2.1", + "version": "1.3.0", "description": "Lazy load component with react && react-router && react-router-hook.", "main": "./lib/index.js", "scripts": { From 751274a505dffe81ad588fe28e5945be689b9816 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 23 May 2017 08:42:27 +0000 Subject: [PATCH 4/5] docs(readme): add Greenkeeper badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e73aaeb..2cd1286 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ rrr-lazy ========================= +[![Greenkeeper badge](https://badges.greenkeeper.io/kouhin/rrr-lazy.svg)](https://greenkeeper.io/) + Lazy load component with react && react-router && react-router-hook. [![CircleCI](https://circleci.com/gh/kouhin/rrr-lazy/tree/master.svg?style=svg)](https://circleci.com/gh/kouhin/rrr-lazy/tree/master) From d54d5843143dda63d581359f3ca035eef13486eb Mon Sep 17 00:00:00 2001 From: kou_hin Date: Tue, 23 May 2017 18:35:36 +0900 Subject: [PATCH 5/5] Update README --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 2cd1286..a42076a 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ rrr-lazy ========================= -[![Greenkeeper badge](https://badges.greenkeeper.io/kouhin/rrr-lazy.svg)](https://greenkeeper.io/) - Lazy load component with react && react-router && react-router-hook. [![CircleCI](https://circleci.com/gh/kouhin/rrr-lazy/tree/master.svg?style=svg)](https://circleci.com/gh/kouhin/rrr-lazy/tree/master) [![dependency status](https://david-dm.org/kouhin/rrr-lazy.svg?style=flat-square)](https://david-dm.org/kouhin/rrr-lazy) +[![Greenkeeper badge](https://badges.greenkeeper.io/kouhin/rrr-lazy.svg)](https://greenkeeper.io/) ## Installationg rrr-lazy requires **React 0.14 or later.**