mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
upgrade react to v15.5 and use prop-types instead of React.PropTypes (#1684)
* upgrade react to v15.5 and use prop-types instead of React.PropTypes * Update package.json
This commit is contained in:
parent
c9bfba6865
commit
8e6615dcf9
|
@ -8,6 +8,7 @@
|
||||||
"express": "^4.15.2",
|
"express": "^4.15.2",
|
||||||
"next": "^2.0.0",
|
"next": "^2.0.0",
|
||||||
"next-url-prettifier": "^1.0.2",
|
"next-url-prettifier": "^1.0.2",
|
||||||
|
"prop-types": "^15.5.6",
|
||||||
"react": "^15.4.2",
|
"react": "^15.4.2",
|
||||||
"react-dom": "^15.4.2"
|
"react-dom": "^15.4.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
import {Link} from 'next-url-prettifier'
|
import {Link} from 'next-url-prettifier'
|
||||||
import {Router} from '../routes'
|
import {Router} from '../routes'
|
||||||
|
|
||||||
|
@ -29,6 +30,6 @@ export default class GreetingPage extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
GreetingPage.propTypes = {
|
GreetingPage.propTypes = {
|
||||||
lang: React.PropTypes.string,
|
lang: PropTypes.string,
|
||||||
name: React.PropTypes.string
|
name: PropTypes.string
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React, { Component, PropTypes } from 'react'
|
import React, { Component } from 'react'
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
import { AppContainer } from 'react-hot-loader'
|
import { AppContainer } from 'react-hot-loader'
|
||||||
import shallowEquals from './shallow-equals'
|
import shallowEquals from './shallow-equals'
|
||||||
import { warn } from './utils'
|
import { warn } from './utils'
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
import sideEffect from './side-effect'
|
import sideEffect from './side-effect'
|
||||||
|
|
||||||
class Head extends React.Component {
|
class Head extends React.Component {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
headManager: React.PropTypes.object
|
headManager: PropTypes.object
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { resolve, format, parse } from 'url'
|
import { resolve, format, parse } from 'url'
|
||||||
import React, { Component, Children, PropTypes } from 'react'
|
import React, { Component, Children } from 'react'
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
import Router from './router'
|
import Router from './router'
|
||||||
import { warn, execOnce, getLocationOrigin } from './utils'
|
import { warn, execOnce, getLocationOrigin } from './utils'
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,7 @@
|
||||||
"mz": "2.6.0",
|
"mz": "2.6.0",
|
||||||
"path-match": "1.2.4",
|
"path-match": "1.2.4",
|
||||||
"pkg-up": "1.0.0",
|
"pkg-up": "1.0.0",
|
||||||
|
"prop-types": "15.5.6",
|
||||||
"react-hot-loader": "3.0.0-beta.6",
|
"react-hot-loader": "3.0.0-beta.6",
|
||||||
"send": "0.15.1",
|
"send": "0.15.1",
|
||||||
"source-map-support": "0.4.14",
|
"source-map-support": "0.4.14",
|
||||||
|
@ -116,8 +117,8 @@
|
||||||
"node-fetch": "1.6.3",
|
"node-fetch": "1.6.3",
|
||||||
"node-notifier": "5.1.2",
|
"node-notifier": "5.1.2",
|
||||||
"nyc": "10.2.0",
|
"nyc": "10.2.0",
|
||||||
"react": "15.4.2",
|
"react": "15.5.3",
|
||||||
"react-dom": "15.4.2",
|
"react-dom": "15.5.3",
|
||||||
"standard": "9.0.2",
|
"standard": "9.0.2",
|
||||||
"wd": "1.2.0"
|
"wd": "1.2.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React, { Component, PropTypes } from 'react'
|
import React, { Component } from 'react'
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
import htmlescape from 'htmlescape'
|
import htmlescape from 'htmlescape'
|
||||||
import flush from 'styled-jsx/server'
|
import flush from 'styled-jsx/server'
|
||||||
|
|
||||||
|
|
30
yarn.lock
30
yarn.lock
|
@ -2029,9 +2029,9 @@ fb-watchman@^2.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
bser "^2.0.0"
|
bser "^2.0.0"
|
||||||
|
|
||||||
fbjs@^0.8.1, fbjs@^0.8.4:
|
fbjs@^0.8.9:
|
||||||
version "0.8.9"
|
version "0.8.12"
|
||||||
resolved "https://registry.npmjs.org/fbjs/-/fbjs-0.8.9.tgz#180247fbd347dcc9004517b904f865400a0c8f14"
|
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04"
|
||||||
dependencies:
|
dependencies:
|
||||||
core-js "^1.0.0"
|
core-js "^1.0.0"
|
||||||
isomorphic-fetch "^2.1.1"
|
isomorphic-fetch "^2.1.1"
|
||||||
|
@ -4005,6 +4005,12 @@ promise@^7.1.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
asap "~2.0.3"
|
asap "~2.0.3"
|
||||||
|
|
||||||
|
prop-types@^15.5.2, prop-types@^15.5.6, prop-types@~15.5.0:
|
||||||
|
version "15.5.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.6.tgz#797a915b1714b645ebb7c5d6cc690346205bd2aa"
|
||||||
|
dependencies:
|
||||||
|
fbjs "^0.8.9"
|
||||||
|
|
||||||
prr@~0.0.0:
|
prr@~0.0.0:
|
||||||
version "0.0.0"
|
version "0.0.0"
|
||||||
resolved "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
|
resolved "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
|
||||||
|
@ -4075,13 +4081,14 @@ react-deep-force-update@^2.0.1:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.npmjs.org/react-deep-force-update/-/react-deep-force-update-2.0.1.tgz#4f7f6c12c3e7de42f345992a3c518236fa1ecad3"
|
resolved "https://registry.npmjs.org/react-deep-force-update/-/react-deep-force-update-2.0.1.tgz#4f7f6c12c3e7de42f345992a3c518236fa1ecad3"
|
||||||
|
|
||||||
react-dom@15.4.2:
|
react-dom@15.5.3:
|
||||||
version "15.4.2"
|
version "15.5.3"
|
||||||
resolved "https://registry.npmjs.org/react-dom/-/react-dom-15.4.2.tgz#015363f05b0a1fd52ae9efdd3a0060d90695208f"
|
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.5.3.tgz#2ee127ce942df55da53111ae303316e68072b5c5"
|
||||||
dependencies:
|
dependencies:
|
||||||
fbjs "^0.8.1"
|
fbjs "^0.8.9"
|
||||||
loose-envify "^1.1.0"
|
loose-envify "^1.1.0"
|
||||||
object-assign "^4.1.0"
|
object-assign "^4.1.0"
|
||||||
|
prop-types "~15.5.0"
|
||||||
|
|
||||||
react-hot-loader@3.0.0-beta.6:
|
react-hot-loader@3.0.0-beta.6:
|
||||||
version "3.0.0-beta.6"
|
version "3.0.0-beta.6"
|
||||||
|
@ -4100,13 +4107,14 @@ react-proxy@^3.0.0-alpha.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
lodash "^4.6.1"
|
lodash "^4.6.1"
|
||||||
|
|
||||||
react@15.4.2:
|
react@15.5.3:
|
||||||
version "15.4.2"
|
version "15.5.3"
|
||||||
resolved "https://registry.npmjs.org/react/-/react-15.4.2.tgz#41f7991b26185392ba9bae96c8889e7e018397ef"
|
resolved "https://registry.yarnpkg.com/react/-/react-15.5.3.tgz#84055382c025dec4e3b902bb61a8697cc79c1258"
|
||||||
dependencies:
|
dependencies:
|
||||||
fbjs "^0.8.4"
|
fbjs "^0.8.9"
|
||||||
loose-envify "^1.1.0"
|
loose-envify "^1.1.0"
|
||||||
object-assign "^4.1.0"
|
object-assign "^4.1.0"
|
||||||
|
prop-types "^15.5.2"
|
||||||
|
|
||||||
read-pkg-up@^1.0.1:
|
read-pkg-up@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
|
|
Loading…
Reference in a new issue