Skip to content

Commit

Permalink
Merge pull request #487 from hshoff/harry-16
Browse files Browse the repository at this point in the history
[phase 1] deprecate react 15, fix lifecycle warnings in 16.9
  • Loading branch information
hshoff authored Sep 6, 2019
2 parents 4990371 + 9314591 commit 4f33da5
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 33 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^24.5.0",
"babel-plugin-istanbul": "^5.1.1",
"coveralls": "^2.13.1",
"coveralls": "^3.0.6",
"enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.0.2",
"eslint": "^5.5.0",
Expand All @@ -76,8 +76,8 @@
"jest-environment-enzyme": "^7.0.2",
"jest-enzyme": "^7.0.2",
"lerna": "2.1.2",
"lint-staged": "^7.0.4",
"marked": "^0.3.19",
"lint-staged": "^9.2.5",
"marked": "^0.7.0",
"prettier": "^1.12.1",
"prettier-eslint-cli": "^4.7.1",
"raf": "^3.4.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/vx-axis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
"jest": "^21.2.1",
"jest-cli": "^21.2.1",
"raf": "^3.4.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-test-renderer": "^16.9.0",
"rollup": "^0.67.4",
"rollup-plugin-babel": "^4.0.1",
"rollup-plugin-commonjs": "^9.1.3",
Expand All @@ -82,7 +82,7 @@
"rollup-plugin-uglify": "^4.0.0"
},
"peerDependencies": {
"react": "^15.0.0-0 || ^16.0.0-0"
"react": "^16.3.0-0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/vx-demo/components/charts/VoronoiChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class VoronoiChart extends React.PureComponent {
this.state = VoronoiChart.getUpdatedState(props);
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (nextProps.width !== this.props.width || nextProps.height !== this.props.height) {
this.setState(VoronoiChart.getUpdatedState(nextProps));
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vx-demo/components/tiles/drag-i.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class DragI extends React.Component {
});
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { width, height } = nextProps;
if (width !== this.props.width) {
this.setState(() => {
Expand Down
14 changes: 4 additions & 10 deletions packages/vx-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@
"start": "next start",
"test": "jest"
},
"keywords": [
"vx",
"demo",
"examples"
],
"keywords": ["vx", "demo", "examples"],
"author": "@hshoff",
"license": "MIT",
"dependencies": {
Expand Down Expand Up @@ -62,8 +58,8 @@
"next": "^4.1.3",
"nprogress": "^0.2.0",
"prismjs": "^1.6.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-ga": "^2.1.2",
"react-github-button": "^0.1.10",
"react-motion": "^0.4.7",
Expand All @@ -72,9 +68,7 @@
"topojson-client": "^3.0.0"
},
"browserify": {
"transform": [
"babelify"
]
"transform": ["babelify"]
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/vx-demo/pages/drag-i.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default class DragI extends React.Component {
});
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { width, height } = nextProps;
if (width !== this.props.width) {
this.setState(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/vx-demo/pages/voronoi.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class VoronoiChart extends React.PureComponent {
this.state = VoronoiChart.getUpdatedState(props);
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (nextProps.width !== this.props.width || nextProps.height !== this.props.height) {
this.setState(VoronoiChart.getUpdatedState(nextProps));
}
Expand Down
12 changes: 6 additions & 6 deletions packages/vx-text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"homepage": "https://github.com/hshoff/vx#readme",
"dependencies": {
"classnames": "^2.2.5",
"lodash": "^4.17.4",
"prop-types": "^15.6.2",
"lodash": "^4.17.15",
"prop-types": "^15.7.2",
"reduce-css-calc": "^1.3.0"
},
"devDependencies": {
Expand Down Expand Up @@ -70,9 +70,9 @@
"jest": "^21.2.1",
"jest-cli": "^21.2.1",
"raf": "^3.4.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-test-renderer": "^16.9.0",
"rollup": "^0.67.4",
"rollup-plugin-babel": "^4.0.1",
"rollup-plugin-commonjs": "^9.1.3",
Expand All @@ -81,7 +81,7 @@
"rollup-plugin-uglify": "^4.0.0"
},
"peerDependencies": {
"react": "^15.0.0-0 || ^16.0.0-0"
"react": "^16.3.0-0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/vx-text/src/Text.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class Text extends Component {
};
}

componentWillMount() {
UNSAFE_componentWillMount() {
this.updateWordsByLines(this.props, true);
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const needCalculate =
this.props.children !== nextProps.children || this.props.style !== nextProps.style;
this.updateWordsByLines(nextProps, needCalculate);
Expand Down
8 changes: 4 additions & 4 deletions packages/vx-vx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"access": "public"
},
"peerDependencies": {
"react": "^15.0.0-0 || ^16.0.0-0"
"react": "^16.3.0-0"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
Expand Down Expand Up @@ -68,9 +68,9 @@
"jest": "^21.2.1",
"jest-cli": "^21.2.1",
"raf": "^3.4.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-test-renderer": "^16.9.0",
"rollup": "^0.67.4",
"rollup-plugin-babel": "^4.0.1",
"rollup-plugin-commonjs": "^9.1.3",
Expand Down

0 comments on commit 4f33da5

Please sign in to comment.