Skip to content

Commit 096f0d2

Browse files
committed
update version modules in package.json. Edit config babel-loader in webpack.config.js for compatibility with the latest stable version. Fix code in test/unit/simulateDOM.js
1 parent f990fed commit 096f0d2

File tree

3 files changed

+31
-33
lines changed

3 files changed

+31
-33
lines changed

package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"url": "https://github.com/kirjs/react-highcharts"
2525
},
2626
"peerDependencies": {
27-
"react": "~0.14 || ^15.0.0 || ^16.0.0",
28-
"react-dom": "~0.14 || ^15.0.0 || ^16.0.0"
27+
"react": "~0.14 || ^15.0.0 || ^16.2.0",
28+
"react-dom": "~0.14 || ^15.0.0 || ^16.2.0"
2929
},
3030
"bugs": "https://github.com/kirjs/react-highcharts/issues",
3131
"keywords": [
@@ -35,31 +35,31 @@
3535
"graph"
3636
],
3737
"devDependencies": {
38-
"babel-cli": "^6.18.0",
38+
"babel-cli": "^6.26.0",
3939
"babel-core": "^6.24.0",
40-
"babel-loader": "^6.2.10",
41-
"babel-preset-es2015": "^6.18.0",
42-
"babel-preset-react": "^6.16.0",
43-
"babel-preset-stage-2": "^6.18.0",
44-
"create-react-class": "^15.5.2",
45-
"exports-loader": "^0.6.2",
46-
"file-loader": "^0.10.1",
47-
"highlight.js": "^9.10.0",
40+
"babel-loader": "^7.1.2",
41+
"babel-preset-env": "^1.6.1",
42+
"babel-preset-react": "^6.24.1",
43+
"babel-preset-stage-2": "^6.24.1",
44+
"create-react-class": "^15.6.2",
45+
"exports-loader": "^0.6.4",
46+
"file-loader": "^1.1.6",
47+
"highlight.js": "^9.12.0",
4848
"imports-loader": "^0.7.1",
49-
"jsdom": "^9.9.1",
50-
"mocha": "^3.2.0",
51-
"mock-require": "^2.0.1",
52-
"nightwatch": "^0.9.6",
53-
"prop-types": "^15.5.8",
49+
"jsdom": "^11.5.1",
50+
"mocha": "^4.1.0",
51+
"mock-require": "^2.0.2",
52+
"nightwatch": "^0.9.19",
53+
"prop-types": "^15.6.0",
5454
"raw-loader": "^0.5.1",
55-
"react": "^15.5.4",
56-
"react-dom": "^15.5.4",
57-
"react-highlight": "^0.9.0",
58-
"sinon": "^2.0.0",
59-
"webpack": "^2.2.1",
60-
"webpack-dev-server": "^2.4.2"
55+
"react": "^16.2.0",
56+
"react-dom": "^16.2.0",
57+
"react-highlight": "^0.10.0",
58+
"sinon": "^4.1.3",
59+
"webpack": "^3.10.0",
60+
"webpack-dev-server": "^2.9.6"
6161
},
6262
"dependencies": {
63-
"highcharts": "^6.0.0"
63+
"highcharts": "^6.0.4"
6464
}
6565
}

test/unit/simulateDOM.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
*/
1414

1515
var jsdom = require('jsdom');
16-
17-
global.document = jsdom.jsdom('<!doctype html><html><body><div id="test"></div></body></html>');
18-
var win = global.document.defaultView;
16+
const {JSDOM} = jsdom;
17+
const {document} = (new JSDOM('<!doctype html><html><body><div id="test"></div></body></html>')).window;
18+
var win = document.defaultView;
1919
global.window = global;
2020
for( var i in win ){
2121
if( i !== 'window' && win.hasOwnProperty(i)){

webpack.config.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,13 @@ module.exports = function (env) {
8484
rules: [
8585
{
8686
test: /\.jsx$/,
87-
use: [{
87+
88+
use: {
8889
loader: 'babel-loader',
89-
query: {
90-
cacheDirectory: true,
91-
presets: ['react', 'es2015', 'stage-2']
90+
options: {
91+
presets: ['env', 'react', 'stage-2'],
9292
}
93-
}],
94-
95-
93+
}
9694
}
9795
]
9896
},

0 commit comments

Comments
 (0)