Skip to content

Commit

Permalink
create-react-context as optional peerDependency
Browse files Browse the repository at this point in the history
create-react-context is only is needed as a polyfill for React 15 and lower; yet, the inclusion of the library blocks React 17 support. As an "optional" peerDependency, all user needs should be fulfilled while maintaining the spirit that the React libraries (and any needed polyfills) are external to the Router library itself.
  • Loading branch information
haysclark committed Dec 9, 2020
1 parent c900429 commit f23f43d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@
},
"peerDependencies": {
"react": "^15.0.0 || ^16.0.0 || ^17.0.0",
"react-dom": "^15.0.0 || ^16.0.0 || ^17.0.0"
"react-dom": "^15.0.0 || ^16.0.0 || ^17.0.0",
"create-react-context": "^0.3.0"
},
"peerDependenciesMeta": {
"create-react-context": {
"optional": true
}
},
"devDependencies": {
"babel-cli": "^6.26.0",
Expand All @@ -42,6 +48,7 @@
"babel-plugin-transform-react-remove-prop-types": "^0.4.13",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"create-react-context": "^0.3.0",
"eslint": "^4.18.2",
"eslint-config-react-app": "^2.1.0",
"eslint-plugin-flowtype": "^2.34.1",
Expand Down Expand Up @@ -80,7 +87,6 @@
"printWidth": 80
},
"dependencies": {
"create-react-context": "0.3.0",
"invariant": "^2.2.3",
"prop-types": "^15.6.1",
"react-lifecycles-compat": "^3.0.4"
Expand Down

0 comments on commit f23f43d

Please sign in to comment.