Skip to content

Commit

Permalink
v1 react 16 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
manuphatak committed Oct 13, 2017
1 parent b2032bb commit d6c7dd0
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 26 deletions.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,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"
},
Expand All @@ -62,7 +61,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"
}
3 changes: 2 additions & 1 deletion src/components/ThemeProvider.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion src/components/themr.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import invariant from 'invariant'

/**
Expand Down
2 changes: 1 addition & 1 deletion src/utils/themr-shape.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropTypes } from 'react'
import PropTypes from 'prop-types';

export default PropTypes.shape({
theme: PropTypes.object.isRequired
Expand Down
5 changes: 3 additions & 2 deletions test/components/ThemeProvider.spec.js
Original file line number Diff line number Diff line change
@@ -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', () => {
Expand Down
5 changes: 3 additions & 2 deletions test/components/themr.spec.js
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
66 changes: 51 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit d6c7dd0

Please sign in to comment.