diff --git a/.babelrc b/.babelrc index 51ce350..7b1c04e 100644 --- a/.babelrc +++ b/.babelrc @@ -1,6 +1,7 @@ { - "optional": [ - "runtime", - "es7.objectRestSpread" - ] + "presets": [ + "react", + [ "es2015", { "loose": true } ] + ], + "plugins": [ "transform-runtime", "transform-object-rest-spread" ] } diff --git a/.travis.yml b/.travis.yml index 3daa38a..cb96775 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,10 @@ sudo: false language: node_js node_js: + - "7.0" + - "6.0" + - "5.0" - "4.0" - - "0.10" - - "0.12" branches: only: diff --git a/karma.conf.js b/karma.conf.js index 72c7d48..072e5f3 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,5 +1,5 @@ /* eslint no-var: 0 */ -require("babel/register"); +require("babel-register"); var webpackConfig = require("./webpack.config.test.js"); var isCI = process.env.CONTINUOUS_INTEGRATION === "true"; diff --git a/package.json b/package.json index 3bf7e9b..c4749af 100644 --- a/package.json +++ b/package.json @@ -34,17 +34,21 @@ "homepage": "https://github.com/dozoisch/react-google-recaptcha", "peerDependencies": { "react": ">=0.14", - "react-async-script": "~0.5.0" + "react-async-script": "~0.6.0 || ~0.7.0" }, "devDependencies": { - "babel": "~5.8.21", - "babel-core": "~5.8.22", - "babel-eslint": "~4.1.3", - "babel-loader": "~5.3.2", - "chai": "~3.3.0", - "child-process-promise": "~1.1.0", - "colors": "~1.1.0", - "es5-shim": "~4.1.3", + "babel-cli": "^6.0.0", + "babel-core": "^6.0.0", + "babel-eslint": "^7.0.0", + "babel-loader": "^6.0.0", + "babel-plugin-transform-object-rest-spread": "^6.23.0", + "babel-plugin-transform-runtime": "^6.23.0", + "babel-preset-es2015": "^6.22.0", + "babel-preset-react": "^6.23.0", + "babel-register": "^6.23.0", + "babel-runtime": "^6.0.0", + "chai": "^3.5.0", + "es5-shim": "^4.5.0", "eslint": "~1.6.0", "eslint-config-defaults": "~7.0.1", "eslint-plugin-react": "~3.5.1", @@ -60,10 +64,11 @@ "mocha": "~2.3.3", "mt-changelog": "^0.6.2", "phantomjs": "^1.9.18", - "react": "~0.14.0", - "react-dom": "~0.14.0", + "react": "^15.4.2", + "react-addons-test-utils": "^15.4.2", + "react-async-script": "^0.6.0", + "react-dom": "^15.4.2", "release-script": "^0.5.3", - "webpack": "~1.12.2", - "babel-runtime": "^5.8.0" + "webpack": "~1.14.0" } } diff --git a/test/recaptcha-spec.js b/test/recaptcha-spec.js index a6d2a7a..707b9c9 100644 --- a/test/recaptcha-spec.js +++ b/test/recaptcha-spec.js @@ -1,6 +1,6 @@ import React from "react"; import ReactDOM from "react-dom"; -import ReactTestUtils from "react/lib/ReactTestUtils"; +import ReactTestUtils from "react-addons-test-utils"; import ReCAPTCHA from "../src/recaptcha"; describe("ReCAPTCHA", () => { diff --git a/test/recaptcha-wrapper-spec.js b/test/recaptcha-wrapper-spec.js index e6f7142..f5dc57c 100644 --- a/test/recaptcha-wrapper-spec.js +++ b/test/recaptcha-wrapper-spec.js @@ -1,5 +1,5 @@ import React from "react"; -import ReactTestUtils from "react/lib/ReactTestUtils"; +import ReactTestUtils from "react-addons-test-utils"; import ReCAPTCHA from "../src/recaptcha-wrapper"; const VALUE = "some value"; diff --git a/webpack.config.test.js b/webpack.config.test.js index d0e3f89..206067e 100644 --- a/webpack.config.test.js +++ b/webpack.config.test.js @@ -1,5 +1,5 @@ -import { DefinePlugin } from "webpack"; -export default { +const DefinePlugin = require("webpack").DefinePlugin; +module.exports = { output: { pathinfo: true, }, @@ -7,7 +7,7 @@ export default { module: { loaders: [ - { test: /\.js/, loader: "babel", exclude: /node_modules/ }, + { test: /\.js/, loader: "babel-loader", exclude: /node_modules/ }, ], }, plugins: [