Skip to content

Commit 3c92d6d

Browse files
committedMar 4, 2017
[changed] Updated babel, react and dropped 0.10, 0.12
- babel 6 - react 15 - updated webpack version and fixed config - dropped support for node 0.12 & 0.10 - removed unused deps
1 parent 7c8424c commit 3c92d6d

7 files changed

+32
-25
lines changed
 

‎.babelrc

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"optional": [
3-
"runtime",
4-
"es7.objectRestSpread"
5-
]
2+
"presets": [
3+
"react",
4+
[ "es2015", { "loose": true } ]
5+
],
6+
"plugins": [ "transform-runtime", "transform-object-rest-spread" ]
67
}

‎.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
sudo: false
22
language: node_js
33
node_js:
4+
- "7.0"
5+
- "6.0"
6+
- "5.0"
47
- "4.0"
5-
- "0.10"
6-
- "0.12"
78

89
branches:
910
only:

‎karma.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint no-var: 0 */
2-
require("babel/register");
2+
require("babel-register");
33

44
var webpackConfig = require("./webpack.config.test.js");
55
var isCI = process.env.CONTINUOUS_INTEGRATION === "true";

‎package.json

+18-13
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,21 @@
3434
"homepage": "https://github.com/dozoisch/react-google-recaptcha",
3535
"peerDependencies": {
3636
"react": ">=0.14",
37-
"react-async-script": "~0.5.0"
37+
"react-async-script": "~0.6.0 || ~0.7.0"
3838
},
3939
"devDependencies": {
40-
"babel": "~5.8.21",
41-
"babel-core": "~5.8.22",
42-
"babel-eslint": "~4.1.3",
43-
"babel-loader": "~5.3.2",
44-
"chai": "~3.3.0",
45-
"child-process-promise": "~1.1.0",
46-
"colors": "~1.1.0",
47-
"es5-shim": "~4.1.3",
40+
"babel-cli": "^6.0.0",
41+
"babel-core": "^6.0.0",
42+
"babel-eslint": "^7.0.0",
43+
"babel-loader": "^6.0.0",
44+
"babel-plugin-transform-object-rest-spread": "^6.23.0",
45+
"babel-plugin-transform-runtime": "^6.23.0",
46+
"babel-preset-es2015": "^6.22.0",
47+
"babel-preset-react": "^6.23.0",
48+
"babel-register": "^6.23.0",
49+
"babel-runtime": "^6.0.0",
50+
"chai": "^3.5.0",
51+
"es5-shim": "^4.5.0",
4852
"eslint": "~1.6.0",
4953
"eslint-config-defaults": "~7.0.1",
5054
"eslint-plugin-react": "~3.5.1",
@@ -60,10 +64,11 @@
6064
"mocha": "~2.3.3",
6165
"mt-changelog": "^0.6.2",
6266
"phantomjs": "^1.9.18",
63-
"react": "~0.14.0",
64-
"react-dom": "~0.14.0",
67+
"react": "^15.4.2",
68+
"react-addons-test-utils": "^15.4.2",
69+
"react-async-script": "^0.6.0",
70+
"react-dom": "^15.4.2",
6571
"release-script": "^0.5.3",
66-
"webpack": "~1.12.2",
67-
"babel-runtime": "^5.8.0"
72+
"webpack": "~1.14.0"
6873
}
6974
}

‎test/recaptcha-spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import ReactDOM from "react-dom";
3-
import ReactTestUtils from "react/lib/ReactTestUtils";
3+
import ReactTestUtils from "react-addons-test-utils";
44
import ReCAPTCHA from "../src/recaptcha";
55

66
describe("ReCAPTCHA", () => {

‎test/recaptcha-wrapper-spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import ReactTestUtils from "react/lib/ReactTestUtils";
2+
import ReactTestUtils from "react-addons-test-utils";
33
import ReCAPTCHA from "../src/recaptcha-wrapper";
44

55
const VALUE = "some value";

‎webpack.config.test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { DefinePlugin } from "webpack";
2-
export default {
1+
const DefinePlugin = require("webpack").DefinePlugin;
2+
module.exports = {
33
output: {
44
pathinfo: true,
55
},
66
devtool: "inline-source-map",
77

88
module: {
99
loaders: [
10-
{ test: /\.js/, loader: "babel", exclude: /node_modules/ },
10+
{ test: /\.js/, loader: "babel-loader", exclude: /node_modules/ },
1111
],
1212
},
1313
plugins: [

0 commit comments

Comments
 (0)