Skip to content

Commit d6c7dd0

Browse files
committed
v1 react 16 compat
Fixes javivelasco#75
1 parent b2032bb commit d6c7dd0

File tree

7 files changed

+65
-26
lines changed

7 files changed

+65
-26
lines changed

package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@
4242
"fbjs": "^0.8.4",
4343
"jsdom": "^9.8.3",
4444
"mocha": "^3.2.0",
45-
"react": "^15.0.1",
46-
"react-addons-test-utils": "^15.0.1",
47-
"react-dom": "^15.3.2",
45+
"react": "^16.0.0",
46+
"react-dom": "^16.0.0",
4847
"rimraf": "^2.5.2",
4948
"sinon": "^1.17.6"
5049
},
@@ -62,7 +61,7 @@
6261
},
6362
"license": "MIT",
6463
"peerDependencies": {
65-
"react": "^0.14.0 || ^15.0.0-0"
64+
"react": "^0.14.0 || ^15.0.0-0 || ^16.0.0"
6665
},
6766
"typings": "./index.d.ts"
6867
}

src/components/ThemeProvider.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Children, Component, PropTypes } from 'react'
1+
import PropTypes from 'prop-types';
2+
import { Children, Component } from 'react';
23
import themrShape from '../utils/themr-shape'
34

45
export default class ThemeProvider extends Component {

src/components/themr.js

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

45
/**

src/utils/themr-shape.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PropTypes } from 'react'
1+
import PropTypes from 'prop-types';
22

33
export default PropTypes.shape({
44
theme: PropTypes.object.isRequired

test/components/ThemeProvider.spec.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import expect from 'expect'
2-
import React, { PropTypes, Component } from 'react'
3-
import TestUtils from 'react-addons-test-utils'
2+
import PropTypes from 'prop-types';
3+
import React, { Component } from 'react';
4+
import TestUtils from 'react-dom/test-utils'
45
import { ThemeProvider } from '../../src/index'
56

67
describe('ThemeProvider', () => {

test/components/themr.spec.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import expect from 'expect'
2-
import React, { Children, PropTypes, Component } from 'react'
3-
import TestUtils from 'react-addons-test-utils'
2+
import PropTypes from 'prop-types';
3+
import React, { Children, Component } from 'react';
4+
import TestUtils from 'react-dom/test-utils'
45
import sinon from 'sinon'
56
import { render } from 'react-dom'
67
import shallowEqual from 'fbjs/lib/shallowEqual'

yarn.lock

+51-15
Original file line numberDiff line numberDiff line change
@@ -1364,7 +1364,19 @@ fast-levenshtein@~2.0.4:
13641364
version "2.0.5"
13651365
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2"
13661366

1367-
fbjs@^0.8.1, fbjs@^0.8.4:
1367+
fbjs@^0.8.16:
1368+
version "0.8.16"
1369+
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db"
1370+
dependencies:
1371+
core-js "^1.0.0"
1372+
isomorphic-fetch "^2.1.1"
1373+
loose-envify "^1.0.0"
1374+
object-assign "^4.1.0"
1375+
promise "^7.1.1"
1376+
setimmediate "^1.0.5"
1377+
ua-parser-js "^0.7.9"
1378+
1379+
fbjs@^0.8.4:
13681380
version "0.8.6"
13691381
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.6.tgz#7eb67d6986b2d5007a9b6e92e0e7cb6f75cad290"
13701382
dependencies:
@@ -1900,6 +1912,10 @@ js-tokens@^2.0.0:
19001912
version "2.0.0"
19011913
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5"
19021914

1915+
js-tokens@^3.0.0:
1916+
version "3.0.2"
1917+
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
1918+
19031919
js-yaml@^3.5.1:
19041920
version "3.7.0"
19051921
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:
20672083
dependencies:
20682084
js-tokens "^2.0.0"
20692085

2086+
loose-envify@^1.3.1:
2087+
version "1.3.1"
2088+
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848"
2089+
dependencies:
2090+
js-tokens "^3.0.0"
2091+
20702092
micromatch@^2.1.5:
20712093
version "2.3.11"
20722094
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:
22072229
version "4.1.0"
22082230
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0"
22092231

2232+
object-assign@^4.1.1:
2233+
version "4.1.1"
2234+
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
2235+
22102236
object-inspect@^1.1.0:
22112237
version "1.2.1"
22122238
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.2.1.tgz#3b62226eb8f6d441751c7d8f22a20ff80ac9dc3f"
@@ -2339,6 +2365,14 @@ promise@^7.1.1:
23392365
dependencies:
23402366
asap "~2.0.3"
23412367

2368+
prop-types@^15.6.0:
2369+
version "15.6.0"
2370+
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856"
2371+
dependencies:
2372+
fbjs "^0.8.16"
2373+
loose-envify "^1.3.1"
2374+
object-assign "^4.1.1"
2375+
23422376
punycode@^1.4.1:
23432377
version "1.4.1"
23442378
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
@@ -2363,25 +2397,23 @@ rc@~1.1.6:
23632397
minimist "^1.2.0"
23642398
strip-json-comments "~1.0.4"
23652399

2366-
react-addons-test-utils@^15.0.1:
2367-
version "15.4.1"
2368-
resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.4.1.tgz#1e4caab151bf27cce26df5f9cb714f4fd8359ae1"
2369-
2370-
react-dom@^15.3.2:
2371-
version "15.4.1"
2372-
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.4.1.tgz#d54c913261aaedb17adc20410d029dcc18a1344a"
2400+
react-dom@^16.0.0:
2401+
version "16.0.0"
2402+
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.0.0.tgz#9cc3079c3dcd70d4c6e01b84aab2a7e34c303f58"
23732403
dependencies:
2374-
fbjs "^0.8.1"
2404+
fbjs "^0.8.16"
23752405
loose-envify "^1.1.0"
2376-
object-assign "^4.1.0"
2406+
object-assign "^4.1.1"
2407+
prop-types "^15.6.0"
23772408

2378-
react@^15.0.1:
2379-
version "15.4.1"
2380-
resolved "https://registry.yarnpkg.com/react/-/react-15.4.1.tgz#498e918602677a3983cd0fd206dfe700389a0dd6"
2409+
react@^16.0.0:
2410+
version "16.0.0"
2411+
resolved "https://registry.yarnpkg.com/react/-/react-16.0.0.tgz#ce7df8f1941b036f02b2cca9dbd0cb1f0e855e2d"
23812412
dependencies:
2382-
fbjs "^0.8.4"
2413+
fbjs "^0.8.16"
23832414
loose-envify "^1.1.0"
2384-
object-assign "^4.1.0"
2415+
object-assign "^4.1.1"
2416+
prop-types "^15.6.0"
23852417

23862418
"readable-stream@^2.0.0 || ^1.1.13", readable-stream@~2.1.4:
23872419
version "2.1.5"
@@ -2567,6 +2599,10 @@ set-immediate-shim@^1.0.1:
25672599
version "1.0.1"
25682600
resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
25692601

2602+
setimmediate@^1.0.5:
2603+
version "1.0.5"
2604+
resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
2605+
25702606
shelljs@^0.7.5:
25712607
version "0.7.5"
25722608
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.5.tgz#2eef7a50a21e1ccf37da00df767ec69e30ad0675"

0 commit comments

Comments
 (0)