Skip to content

Commit 2f2e017

Browse files
committed
[chore] Support React 16.0.0-rc.2 as peer dependency (#166)
1 parent e5332ca commit 2f2e017

30 files changed

+114
-50
lines changed

packages/@sanity/base/package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,13 @@
5252
"nyc": "^10.1.2",
5353
"prop-types": "^15.5.8",
5454
"proxyquire": "^1.7.10",
55-
"react": "^15.5.4",
56-
"react-dom": "^15.5.4",
55+
"react": "^16.0.0-rc.2",
56+
"react-dom": "^16.0.0-rc.2",
5757
"rimraf": "^2.6.1"
58+
},
59+
"peerDependencies": {
60+
"prop-types": "15.x || ^16.0.0-rc.2",
61+
"react": "15.x || ^16.0.0-rc.2",
62+
"react-dom": "15.x || ^16.0.0-rc.2"
5863
}
5964
}

packages/@sanity/components/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@
6363
"eslint-config-sanity": "^2.1.4",
6464
"eslint-plugin-react": "^6.10.0",
6565
"pre-commit": "^1.1.3",
66+
"react": "^16.0.0-rc.2",
6667
"react-styleguidist": "^2.3.1",
68+
"prop-types": "^15.5.10",
6769
"rimraf": "^2.6.1"
6870
},
6971
"peerDependencies": {
70-
"prop-types": ">=15.0.0",
71-
"react": ">=15.0.0",
72-
"react-dom": ">=15.0.0"
72+
"prop-types": "15.x || ^16.0.0-rc.2",
73+
"react": "15.x || ^16.0.0-rc.2"
7374
},
7475
"repository": {
7576
"type": "git",

packages/@sanity/default-layout/package.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
},
2626
"homepage": "https://github.com/sanity-io/default-layout#readme",
2727
"dependencies": {
28-
"react-click-outside": "^2.2.0"
28+
"react-click-outside": "^2.2.0",
29+
"lodash": "^4.17.4"
2930
},
3031
"devDependencies": {
3132
"@sanity/base": "^0.111.5",
@@ -42,8 +43,13 @@
4243
"mocha": "^3.2.0",
4344
"nyc": "^10.1.2",
4445
"prop-types": "^15.5.8",
45-
"react": "^15.5.4",
46-
"react-dom": "^15.5.4",
46+
"react": "^16.0.0-rc.2",
47+
"react-dom": "^16.0.0-rc.2",
4748
"rimraf": "^2.6.1"
49+
},
50+
"peerDependencies": {
51+
"prop-types": "15.x || ^16.0.0-rc.2",
52+
"react": "15.x || ^16.0.0-rc.2",
53+
"react-dom": "15.x || ^16.0.0-rc.2"
4854
}
4955
}

packages/@sanity/desk-tool/package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"lodash": "^4.17.4",
3333
"moment": "^2.18.1",
3434
"react-click-outside": "^2.2.0",
35-
"react-json-inspector": "^7.0.0",
35+
"react-json-inspector": "rexxars/react-json-inspector#react-15",
3636
"react-tiny-virtual-list": "^2.0.5",
3737
"shallow-equals": "^1.0.0"
3838
},
@@ -50,10 +50,13 @@
5050
"history": "^4.5.1",
5151
"postcss-cssnext": "2.10.0",
5252
"prop-types": "^15.5.8",
53-
"react": "^15.5.4",
54-
"react-dom": "^15.5.4",
53+
"react": "^16.0.0-rc.2",
5554
"rimraf": "^2.6.1"
5655
},
56+
"peerDependencies": {
57+
"prop-types": "15.x || ^16.0.0-rc.2",
58+
"react": "15.x || ^16.0.0-rc.2"
59+
},
5760
"repository": {
5861
"type": "git",
5962
"url": "[email protected]:sanity-io/sanity.git"

packages/@sanity/form-builder/package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,18 @@
7979
"path-to-regexp": "^1.7.0",
8080
"postcss-cssnext": "2.10.0",
8181
"prop-types": "^15.5.8",
82-
"react": "^15.5.4",
83-
"react-dom": "^15.5.4",
82+
"react": "^16.0.0-rc.2",
83+
"react-dom": "^16.0.0-rc.2",
8484
"react-enroute": "^1.0.0",
8585
"rimraf": "^2.6.1",
8686
"tap": "^10.3.0",
8787
"zen-observable": "^0.4.0"
8888
},
89+
"peerDependencies": {
90+
"prop-types": "15.x || ^16.0.0-rc.2",
91+
"react": "15.x || ^16.0.0-rc.2",
92+
"react-dom": "15.x || ^16.0.0-rc.2"
93+
},
8994
"directories": {
9095
"example": "example",
9196
"test": "test"

packages/@sanity/google-maps-input/package.json

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
"lodash": "^4.17.4",
3030
"rimraf": "^2.6.1"
3131
},
32+
"peerDependencies": {
33+
"prop-types": "15.x || ^16.0.0-rc.2",
34+
"react": "15.x || ^16.0.0-rc.2",
35+
"react-dom": "15.x || ^16.0.0-rc.2"
36+
},
3237
"repository": {
3338
"type": "git",
3439
"url": "[email protected]:sanity-io/sanity.git"

packages/@sanity/imagetool/package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,18 @@
3131
"mocha": "^3.2.0",
3232
"prop-types": "^15.5.8",
3333
"quickreload": "^2.1.2",
34-
"react": "^15.5.4",
35-
"react-dom": "^15.5.4",
34+
"react": "^16.0.0-rc.2",
35+
"react-dom": "^16.0.0-rc.2",
3636
"rebundler": "^0.3.0",
3737
"remon": "^1.0.2",
3838
"rimraf": "^2.6.1",
3939
"should": "^11.1.0",
4040
"staticr": "^4.0.2"
4141
},
4242
"peerDependencies": {
43-
"prop-types": ">=15.3",
44-
"react": ">=15.3"
43+
"prop-types": "15.x || ^16.0.0-rc.2",
44+
"react": "15.x || ^16.0.0-rc.2",
45+
"react-dom": "15.x || ^16.0.0-rc.2"
4546
},
4647
"repository": {
4748
"type": "git",

packages/@sanity/server/package.json

+8-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@
5050
"normalize.css": "^5.0.0",
5151
"parents": "^1.0.1",
5252
"postcss-loader": "^1.2.2",
53-
"prop-types": "^15.5.8",
54-
"react": "^15.5.4",
55-
"react-dom": "^15.5.4",
5653
"react-hot-loader": "^3.0.0-beta.6",
5754
"require-uncached": "^1.0.2",
5855
"resolve": "^1.3.3",
@@ -66,6 +63,14 @@
6663
"chai": "^3.5.0",
6764
"chai-as-promised": "^6.0.0",
6865
"cross-env": "^3.1.4",
66+
"react": "^16.0.0-rc.2",
67+
"react-dom": "^16.0.0-rc.2",
68+
"prop-types": "^15.5.8",
6969
"rimraf": "^2.6.1"
70+
},
71+
"peerDependencies": {
72+
"prop-types": "15.x || ^16.0.0-rc.2",
73+
"react": "15.x || ^16.0.0-rc.2",
74+
"react-dom": "15.x || ^16.0.0-rc.2"
7075
}
7176
}

packages/@sanity/state-router/package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,19 @@
4141
"object-inspect": "^1.2.1",
4242
"prop-types": "^15.5.8",
4343
"quickreload": "^2.1.2",
44-
"react": "^15.5.4",
45-
"react-dom": "^15.5.4",
44+
"react": "^16.0.0-rc.2",
45+
"react-dom": "^16.0.0-rc.2",
4646
"rebundler": "^0.3.0",
4747
"remon": "^1.0.2",
4848
"rimraf": "^2.6.1",
4949
"staticr": "^4.0.2",
5050
"tap": "^10.3.0"
5151
},
52+
"peerDependencies": {
53+
"prop-types": "15.x || ^16.0.0-rc.2",
54+
"react": "15.x || ^16.0.0-rc.2",
55+
"react-dom": "15.x || ^16.0.0-rc.2"
56+
},
5257
"repository": {
5358
"type": "git",
5459
"url": "git+https://github.com/sanity-io/state-router.git"

packages/example-studio/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
"get-video-id": "^2.1.4",
3232
"humanize-list": "^1.0.1",
3333
"prop-types": "^15.5.8",
34-
"react": "^15.5.4",
34+
"react": "^15.6.1",
3535
"react-ace": "^4.3.0",
36-
"react-dom": "^15.5.4",
36+
"react-dom": "^15.6.1",
3737
"react-icons": "^2.2.5",
3838
"sanity-plugin-vision": "^0.111.5"
3939
},

packages/example-studio/parts/AuthorPreview.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {PropTypes} from 'react'
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
23
import DefaultPreview from 'part:@sanity/components/previews/default'
34
import previewStyles from './AuthorPreview.css'
45

packages/sanity-plugin-vision/package.json

+9-4
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"json-lexer": "^1.1.1",
2020
"moment": "^2.17.1",
2121
"query-string": "^4.3.2",
22-
"react-codemirror": "^0.3.0",
22+
"react-codemirror2": "^1.0.0",
2323
"react-icon-base": "^2.0.4",
24-
"react-json-inspector": "^7.0.0",
24+
"react-json-inspector": "rexxars/react-json-inspector#react-15",
2525
"react-spinner": "^0.2.6",
2626
"react-split-pane": "^0.1.63"
2727
},
@@ -38,8 +38,13 @@
3838
"eslint-config-sanity": "^2.0.2",
3939
"eslint-plugin-react": "^6.10.0",
4040
"prop-types": "^15.5.8",
41-
"react": "^15.4.2",
42-
"react-dom": "^15.4.2"
41+
"react": "^16.0.0-rc.2",
42+
"react-dom": "^16.0.0-rc.2"
43+
},
44+
"peerDependencies": {
45+
"prop-types": "15.x || ^16.0.0-rc.2",
46+
"react": "15.x || ^16.0.0-rc.2",
47+
"react-dom": "15.x || ^16.0.0-rc.2"
4348
},
4449
"repository": {
4550
"type": "git",

packages/sanity-plugin-vision/src/Vision.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {PropTypes} from 'react'
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
23
import VisionContainer from './containers/VisionContainer'
34

45
// Passes the given Sanity client and components to use down

packages/sanity-plugin-vision/src/components/DelayedSpinner.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {PropTypes} from 'react'
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
23
import LoadingSpinner from './LoadingSpinner'
34

45
// Waits for X ms before showing a spinner

packages/sanity-plugin-vision/src/components/Dropdown.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {PropTypes} from 'react'
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
23

34
function Dropdown(props) {
45
const {id, value, className, values, onChange} = props

packages/sanity-plugin-vision/src/components/ErrorDialog.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {PropTypes} from 'react'
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
23

34
function ErrorDialog(props) {
45
return (

packages/sanity-plugin-vision/src/components/JsonDump.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint-disable react/prop-types, react/no-multi-comp */
2-
import React, {PropTypes} from 'react'
2+
import React from 'react'
3+
import PropTypes from 'prop-types'
34
import tokenize from 'json-lexer'
45

56
const punctuator = token => <span className={token.className}>{token.raw}</span>

packages/sanity-plugin-vision/src/components/NoResultsDialog.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {PropTypes} from 'react'
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
23

34
function NoResultsDialog(props) {
45
return (

packages/sanity-plugin-vision/src/components/ParamsEditor.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import PropTypes from 'prop-types'
33
import classNames from 'classnames'
4-
import ReactCodeMirror from 'react-codemirror'
4+
import ReactCodeMirror from 'react-codemirror2'
55
import isPlainObject from '../util/isPlainObject'
66
import tryParseParams from '../util/tryParseParams'
77

@@ -25,7 +25,7 @@ class ParamsEditor extends React.PureComponent {
2525
}
2626
}
2727

28-
handleChange(value) {
28+
handleChange(editor, metadata, value) {
2929
const params = tryParseParams(value)
3030
this.setState({valid: isPlainObject(params)})
3131
this.props.onChange({parsed: params, raw: value})

packages/sanity-plugin-vision/src/components/QueryEditor.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react'
22
import PropTypes from 'prop-types'
3-
import ReactCodeMirror from 'react-codemirror'
3+
import ReactCodeMirror from 'react-codemirror2'
44
import CodeMirror from 'codemirror'
55
require('codemirror/mode/javascript/javascript')
66
require('codemirror/addon/hint/show-hint')
@@ -41,7 +41,7 @@ class QueryEditor extends React.PureComponent {
4141
}
4242
}
4343

44-
handleChange(value) {
44+
handleChange(editor, metadata, value) {
4545
this.props.onChange({query: value})
4646
}
4747

@@ -61,6 +61,7 @@ class QueryEditor extends React.PureComponent {
6161
value={this.props.value}
6262
onChange={this.handleChange}
6363
options={options}
64+
className={this.props.className}
6465
/>
6566
)
6667
}

packages/sanity-plugin-vision/src/components/QueryErrorDetails.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {PropTypes} from 'react'
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
23

34
function QueryErrorDetails(props) {
45
const details = props.error.details

packages/sanity-plugin-vision/src/components/QueryErrorDialog.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {PropTypes} from 'react'
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
23
import QueryErrorDetails from './QueryErrorDetails'
34

45
function QueryErrorDialog(props) {

packages/sanity-plugin-vision/src/components/ResultCollection.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {PropTypes} from 'react'
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
23
import JsonInspector from 'react-json-inspector'
34
import JsonDump from './JsonDump'
45

packages/sanity-plugin-vision/src/components/ResultTable.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {PropTypes} from 'react'
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
23
import calendarDate from '../util/calendarDate'
34

45
class ResultTable extends React.PureComponent {

packages/sanity-plugin-vision/src/components/ResultView.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {PropTypes} from 'react'
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
23
import ResultCollection from './ResultCollection'
34
import JsonDump from './JsonDump'
45

packages/sanity-plugin-vision/src/components/VisionGui.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {PropTypes} from 'react'
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
23
import queryString from 'query-string'
34
import {storeState, getState} from '../util/localState'
45
import parseApiQueryString from '../util/parseApiQueryString'

packages/sanity-plugin-vision/src/containers/LoadingContainer.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {PropTypes} from 'react'
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
23
import request from '../util/request'
34

45
// Yeah, inheritance and all that. Deal with it.

packages/sanity-plugin-vision/src/css/visionGui.css

+8
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
margin-right: 0.5em;
3030
}
3131

32+
.queryEditor {
33+
height: 100%
34+
}
35+
36+
.paramsEditor {
37+
height: 100%
38+
}
39+
3240
.queryTimingContainer {
3341
flex-grow: 1;
3442
text-align: right;

packages/storybook/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@sanity/server": "^0.111.5",
2121
"@sanity/storybook": "^0.111.5",
2222
"prop-types": "^15.5.8",
23-
"react": "^15.5.4",
24-
"react-dom": "^15.5.4"
23+
"react": "^16.0.0-rc.2",
24+
"react-dom": "^16.0.0-rc.2"
2525
}
2626
}

0 commit comments

Comments
 (0)