Skip to content

Commit

Permalink
[chore] Drop support for React 15 (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed May 14, 2018
1 parent fff4853 commit baafec4
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions packages/@sanity/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
},
"peerDependencies": {
"prop-types": "^15.6 || ^16",
"react": "^15.6 || ^16",
"react-dom": "^15.6 || ^16"
"react": "^16.2",
"react-dom": "^16.2"
}
}
4 changes: 2 additions & 2 deletions packages/@sanity/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
},
"peerDependencies": {
"prop-types": "^15.6 || ^16",
"react": "^15.6 || ^16",
"react-dom": "^15.6 || ^16"
"react": "^16.2",
"react-dom": "^16.2"
},
"repository": {
"type": "git",
Expand Down
12 changes: 6 additions & 6 deletions packages/@sanity/core/src/util/checkReactCompatibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ const resolveFrom = require('resolve-from')
const generateHelpUrl = require('@sanity/generate-help-url')

const supported = {
react: '^15 || ^16',
'react-dom': '^15 || ^16'
react: '^16.2',
'react-dom': '^16.2'
}

const deprecated = {
react: '^15',
'react-dom': '^15'
// add packages to deprecate support for here
}

module.exports = workDir => {
Expand All @@ -30,8 +30,8 @@ module.exports = workDir => {
console.warn(
`[WARN] ${pkg} ${
deprecated[pkg]
} is deprecated and will be unsupported as of the next release of Sanity. Please upgrade the ${pkg} package. Read more at ${generateHelpUrl(
'upgrade-react'
} is deprecated and will be unsupported in an upcoming release of Sanity. Please upgrade the ${pkg} package. Read more at ${generateHelpUrl(
'upgrade-package'
)} `
)
}
Expand Down
4 changes: 2 additions & 2 deletions packages/@sanity/default-layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
},
"peerDependencies": {
"prop-types": "^15.6 || ^16",
"react": "^15.6 || ^16",
"react-dom": "^15.6 || ^16"
"react": "^16.2",
"react-dom": "^16.2"
}
}
2 changes: 1 addition & 1 deletion packages/@sanity/desk-tool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
},
"peerDependencies": {
"prop-types": "^15.6 || ^16",
"react": "^15.6 || ^16"
"react": "^16"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/@sanity/form-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
},
"peerDependencies": {
"prop-types": "^15.6 || ^16",
"react": "^15.6 || ^16",
"react-dom": "^15.6 || ^16"
"react": "^16.2",
"react-dom": "^16.2"
},
"directories": {
"example": "example",
Expand Down
4 changes: 2 additions & 2 deletions packages/@sanity/google-maps-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"rimraf": "^2.6.2"
},
"peerDependencies": {
"react": "^15.6 || ^16",
"react-dom": "^15.6 || ^16"
"react": "^16.2",
"react-dom": "^16.2"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/@sanity/imagetool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
},
"peerDependencies": {
"prop-types": "^15.6 || ^16",
"react": "^15.6 || ^16",
"react-dom": "^15.6 || ^16"
"react": "^16.2",
"react-dom": "^16.2"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"peerDependencies": {
"prop-types": "^15.6 || ^16",
"react": "^15.6 || ^16"
"react": "^16"
},
"homepage": "https://www.sanity.io/",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions packages/@sanity/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
"peerDependencies": {
"prop-types": "^15.6 || ^16",
"react": "^15.6 || ^16",
"react-dom": "^15.6 || ^16"
"react": "^16.2",
"react-dom": "^16.2"
}
}
4 changes: 2 additions & 2 deletions packages/@sanity/state-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
},
"peerDependencies": {
"prop-types": "^15.6 || ^16",
"react": "^15.6 || ^16",
"react-dom": "^15.6 || ^16"
"react": "^16.2",
"react-dom": "^16.2"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/@sanity/vision/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
},
"peerDependencies": {
"prop-types": "^15.6 || ^16",
"react": "^15.6 || ^16",
"react-dom": "^15.6 || ^16"
"react": "^16.2",
"react-dom": "^16.2"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit baafec4

Please sign in to comment.