diff --git a/package.json b/package.json index 50b7df1..5cef23e 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,8 @@ "theming" ], "dependencies": { - "invariant": "^2.2.1" + "invariant": "^2.2.1", + "prop-types": "^15.6.0" }, "devDependencies": { "babel-cli": "^6.7.7", @@ -42,9 +43,8 @@ "fbjs": "^0.8.4", "jsdom": "^9.8.3", "mocha": "^3.2.0", - "react": "^15.0.1", - "react-addons-test-utils": "^15.0.1", - "react-dom": "^15.3.2", + "react": "^16.0.0", + "react-dom": "^16.0.0", "rimraf": "^2.5.2", "sinon": "^1.17.6" }, @@ -62,7 +62,7 @@ }, "license": "MIT", "peerDependencies": { - "react": "^0.14.0 || ^15.0.0-0" + "react": "^0.14.0 || ^15.0.0-0 || ^16.0.0" }, "typings": "./index.d.ts" } diff --git a/src/components/ThemeProvider.js b/src/components/ThemeProvider.js index 5c040ce..db3b20d 100644 --- a/src/components/ThemeProvider.js +++ b/src/components/ThemeProvider.js @@ -1,4 +1,5 @@ -import { Children, Component, PropTypes } from 'react' +import PropTypes from 'prop-types'; +import { Children, Component } from 'react'; import themrShape from '../utils/themr-shape' export default class ThemeProvider extends Component { diff --git a/src/components/themr.js b/src/components/themr.js index 97a2328..825cd7c 100644 --- a/src/components/themr.js +++ b/src/components/themr.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import invariant from 'invariant' /** diff --git a/src/utils/themr-shape.js b/src/utils/themr-shape.js index fc19885..054bc92 100644 --- a/src/utils/themr-shape.js +++ b/src/utils/themr-shape.js @@ -1,4 +1,4 @@ -import { PropTypes } from 'react' +import PropTypes from 'prop-types'; export default PropTypes.shape({ theme: PropTypes.object.isRequired diff --git a/test/components/ThemeProvider.spec.js b/test/components/ThemeProvider.spec.js index 3c7d5bf..47230ff 100644 --- a/test/components/ThemeProvider.spec.js +++ b/test/components/ThemeProvider.spec.js @@ -1,6 +1,7 @@ import expect from 'expect' -import React, { PropTypes, Component } from 'react' -import TestUtils from 'react-addons-test-utils' +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; +import TestUtils from 'react-dom/test-utils' import { ThemeProvider } from '../../src/index' describe('ThemeProvider', () => { diff --git a/test/components/themr.spec.js b/test/components/themr.spec.js index 51b564b..011f0d3 100644 --- a/test/components/themr.spec.js +++ b/test/components/themr.spec.js @@ -1,6 +1,7 @@ import expect from 'expect' -import React, { Children, PropTypes, Component } from 'react' -import TestUtils from 'react-addons-test-utils' +import PropTypes from 'prop-types'; +import React, { Children, Component } from 'react'; +import TestUtils from 'react-dom/test-utils' import sinon from 'sinon' import { render } from 'react-dom' import shallowEqual from 'fbjs/lib/shallowEqual' diff --git a/yarn.lock b/yarn.lock index 1681967..c97463f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1364,7 +1364,19 @@ fast-levenshtein@~2.0.4: version "2.0.5" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2" -fbjs@^0.8.1, fbjs@^0.8.4: +fbjs@^0.8.16: + version "0.8.16" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" + dependencies: + core-js "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.9" + +fbjs@^0.8.4: version "0.8.6" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.6.tgz#7eb67d6986b2d5007a9b6e92e0e7cb6f75cad290" dependencies: @@ -1900,6 +1912,10 @@ js-tokens@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5" +js-tokens@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + js-yaml@^3.5.1: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" @@ -2067,6 +2083,12 @@ loose-envify@^1.0.0, loose-envify@^1.1.0: dependencies: js-tokens "^2.0.0" +loose-envify@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + micromatch@^2.1.5: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" @@ -2207,6 +2229,10 @@ object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + object-inspect@^1.1.0: version "1.2.1" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.2.1.tgz#3b62226eb8f6d441751c7d8f22a20ff80ac9dc3f" @@ -2339,6 +2365,14 @@ promise@^7.1.1: dependencies: asap "~2.0.3" +prop-types@^15.6.0: + version "15.6.0" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856" + dependencies: + fbjs "^0.8.16" + loose-envify "^1.3.1" + object-assign "^4.1.1" + punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" @@ -2363,25 +2397,23 @@ rc@~1.1.6: minimist "^1.2.0" strip-json-comments "~1.0.4" -react-addons-test-utils@^15.0.1: - version "15.4.1" - resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.4.1.tgz#1e4caab151bf27cce26df5f9cb714f4fd8359ae1" - -react-dom@^15.3.2: - version "15.4.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.4.1.tgz#d54c913261aaedb17adc20410d029dcc18a1344a" +react-dom@^16.0.0: + version "16.0.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.0.0.tgz#9cc3079c3dcd70d4c6e01b84aab2a7e34c303f58" dependencies: - fbjs "^0.8.1" + fbjs "^0.8.16" loose-envify "^1.1.0" - object-assign "^4.1.0" + object-assign "^4.1.1" + prop-types "^15.6.0" -react@^15.0.1: - version "15.4.1" - resolved "https://registry.yarnpkg.com/react/-/react-15.4.1.tgz#498e918602677a3983cd0fd206dfe700389a0dd6" +react@^16.0.0: + version "16.0.0" + resolved "https://registry.yarnpkg.com/react/-/react-16.0.0.tgz#ce7df8f1941b036f02b2cca9dbd0cb1f0e855e2d" dependencies: - fbjs "^0.8.4" + fbjs "^0.8.16" loose-envify "^1.1.0" - object-assign "^4.1.0" + object-assign "^4.1.1" + prop-types "^15.6.0" "readable-stream@^2.0.0 || ^1.1.13", readable-stream@~2.1.4: version "2.1.5" @@ -2567,6 +2599,10 @@ set-immediate-shim@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + shelljs@^0.7.5: version "0.7.5" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.5.tgz#2eef7a50a21e1ccf37da00df767ec69e30ad0675"