Skip to content

Commit

Permalink
[changed] Updated babel, react and dropped 0.10, 0.12
Browse files Browse the repository at this point in the history
- babel 6
- react 15
- updated webpack version and fixed config
- dropped support for node 0.12 & 0.10
- removed unused deps
  • Loading branch information
dozoisch committed Mar 4, 2017
1 parent 7c8424c commit 3c92d6d
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 25 deletions.
9 changes: 5 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"optional": [
"runtime",
"es7.objectRestSpread"
]
"presets": [
"react",
[ "es2015", { "loose": true } ]
],
"plugins": [ "transform-runtime", "transform-object-rest-spread" ]
}
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
31 changes: 18 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
}
2 changes: 1 addition & 1 deletion test/recaptcha-spec.js
Original file line number Diff line number Diff line change
@@ -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", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/recaptcha-wrapper-spec.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
6 changes: 3 additions & 3 deletions webpack.config.test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { DefinePlugin } from "webpack";
export default {
const DefinePlugin = require("webpack").DefinePlugin;
module.exports = {
output: {
pathinfo: true,
},
devtool: "inline-source-map",

module: {
loaders: [
{ test: /\.js/, loader: "babel", exclude: /node_modules/ },
{ test: /\.js/, loader: "babel-loader", exclude: /node_modules/ },
],
},
plugins: [
Expand Down

0 comments on commit 3c92d6d

Please sign in to comment.