Skip to content

Commit 78466fb

Browse files
Judahmeekjustin808
authored andcommitted
Bump dependencies (#421) to RoR v10
1 parent 00a1b4c commit 78466fb

21 files changed

+1330
-645
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source "https://rubygems.org"
22
ruby "2.4.1"
33

4-
gem "react_on_rails", "9.0.0.rc.0"
4+
gem "react_on_rails", "10.0.0"
55
gem "webpacker"
66

77
# Bundle edge Rails instead: gem "rails", github: "rails/rails"

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ GEM
5050
bindex (0.5.0)
5151
binding_of_caller (0.7.2)
5252
debug_inspector (>= 0.0.1)
53-
brakeman (3.6.1)
53+
brakeman (4.0.1)
5454
builder (3.2.3)
5555
bundler-audit (0.5.0)
5656
bundler (~> 1.2)
@@ -203,13 +203,13 @@ GEM
203203
rb-inotify (0.9.8)
204204
ffi (>= 0.5.0)
205205
rdoc (4.3.0)
206-
react_on_rails (9.0.0.rc.0)
206+
react_on_rails (10.0.0)
207207
addressable
208208
connection_pool
209209
execjs (~> 2.5)
210210
rails (>= 3.2)
211211
rainbow (~> 2.2)
212-
redis (3.3.3)
212+
redis (4.0.1)
213213
rspec-core (3.6.0)
214214
rspec-support (~> 3.6.0)
215215
rspec-expectations (3.6.0)
@@ -337,7 +337,7 @@ DEPENDENCIES
337337
rails (~> 5)
338338
rails-html-sanitizer
339339
rainbow
340-
react_on_rails (= 9.0.0.rc.0)
340+
react_on_rails (= 10.0.0)
341341
redis
342342
rspec-rails (~> 3.6)
343343
rspec-retry

client/.eslintrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ rules:
2020

2121
# Good idea, but let's go to flow before fixing all these
2222
react/forbid-prop-types: 0
23+
jsx-a11y/href-no-hash: 0
2324

2425
# arrow-parens:
2526
# - 0

client/.postcssrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"plugins": {
3+
"autoprefixer": {
4+
"browsers": [
5+
">1%",
6+
"last 5 versions",
7+
"safari >= 7",
8+
"Firefox ESR",
9+
"not ie < 9"
10+
]
11+
}
12+
}
13+
}

client/app/bundles/comments/components/CommentBox/CommentList/CommentList.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ export default class CommentList extends BaseComponent {
4141
// `key` is a React-specific concept and is not mandatory for the
4242
// purpose of this tutorial. if you're curious, see more here:
4343
// http://facebook.github.io/react/docs/multiple-components.html#dynamic-children
44-
<Comment
44+
(<Comment
4545
key={$$comment.get('id') || index}
4646
author={$$comment.get('author')}
4747
text={$$comment.get('text')}
48-
/>,
48+
/>),
4949
);
5050

5151
// For animation with ReactCSSTransitionGroup

client/app/bundles/comments/components/CommentBox/CommentList/CommentList.spec.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ describe('CommentList', () => {
4747
it('renders an alert if errors', () => {
4848
const component = renderIntoDocument(
4949
<CommentList
50-
$$comments={comments} error="zomg"
50+
$$comments={comments}
51+
error="zomg"
5152
cssTransitionGroupClassNames={cssTransitionGroupClassNames}
5253
/>,
5354
);

client/app/bundles/comments/components/CommentScreen/CommentScreen.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import CommentBox from '../CommentBox/CommentBox';
77
import css from './CommentScreen.scss';
88

99
export default class CommentScreen extends BaseComponent {
10-
1110
static propTypes = {
1211
actions: PropTypes.object.isRequired,
1312
data: PropTypes.object.isRequired,

client/app/bundles/comments/components/NavigationBar/NavigationBar.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const NavigationBar = (props) => {
1414

1515
/* eslint-disable new-cap */
1616
return (
17-
<nav className="navbar navbar-default" role="navigation">
17+
<nav className="navbar navbar-default">
1818
<div className="container">
1919
<div className="navbar-header">
2020
<button
@@ -49,7 +49,7 @@ const NavigationBar = (props) => {
4949
href={
5050
'https://github.com/' +
5151
'shakacode/react-webpack-rails-tutorial'
52-
}
52+
}
5353
>
5454
Source
5555
</a>
@@ -58,7 +58,7 @@ const NavigationBar = (props) => {
5858
<a
5959
href={
6060
'https://forum.shakacode.com/c/reactjs'
61-
}
61+
}
6262
>Forum</a>
6363
</li>
6464
{_.isNumber(commentsCount) && CommentsCount({ commentsCount })}

client/app/bundles/comments/components/TestReactRouter/TestReactRouter.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ export default class TestReactRouter extends BaseComponent {
1313
</div>
1414
);
1515
}
16-
1716
}

client/app/bundles/comments/components/TestReactRouterRedirect/TestReactRouterRedirect.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Redirect } from 'react-router-dom';
44
import BaseComponent from 'libs/components/BaseComponent';
55

66
export default class TestReactRouterRedirect extends BaseComponent {
7-
87
static checkAuth() {
98
// Hard code this to demonstrate the effect
109
const notAuthorized = true;

client/app/bundles/comments/layout/Layout.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import './Layout.scss';
66

77
/* eslint-disable react/prefer-stateless-function */
88
export default class Layout extends Component {
9-
109
static propTypes = {
1110
children: PropTypes.object.isRequired,
1211
};

client/app/bundles/comments/reducers/commentsReducer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export default function commentsReducer($$state = $$initialState, action = null)
1717
const { type, comment, comments, error, locale } = action;
1818

1919
switch (type) {
20-
2120
case actionTypes.FETCH_COMMENTS_SUCCESS: {
2221
return $$state.merge({
2322
$$comments: comments,

client/app/libs/testHelper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable import/no-extraneous-dependencies */
22
import React from 'react';
3-
import TestUtils from 'react-addons-test-utils';
4-
import jsdom from 'jsdom';
3+
import TestUtils from 'react-dom/test-utils';
4+
import jsdom from 'jsdom/lib/old-api';
55
import chai from 'chai';
66
import chaiImmutable from 'chai-immutable';
77

client/package.json

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"description": "Code from the React Webpack tutorial.",
55
"main": "server-express.js",
66
"engines": {
7-
"node": "7.8.0",
8-
"npm": "4.4.4",
9-
"yarn": "0.22.0"
7+
"node": "^7.8.0 || ^8.0.0",
8+
"npm": "^4.4.4 || ^5.0.0",
9+
"yarn": "^1.0.0"
1010
},
1111
"repository": {
1212
"type": "git",
@@ -42,12 +42,12 @@
4242
},
4343
"dependencies": {
4444
"actioncable": "^5.0.2",
45-
"autoprefixer": "^6.7.7",
45+
"autoprefixer": "^7.1.5",
4646
"axios": "^0.16.1",
4747
"babel": "^6.23.0",
4848
"babel-cli": "^6.24.1",
4949
"babel-core": "^6.24.1",
50-
"babel-loader": "^6.4.1",
50+
"babel-loader": "^7.1.2",
5151
"babel-plugin-transform-es2015-modules-amd": "^6.24.1",
5252
"babel-polyfill": "^6.23.0",
5353
"babel-preset-es2015": "^6.24.1",
@@ -57,13 +57,13 @@
5757
"bootstrap-loader": "^2.0.0",
5858
"bootstrap-sass": "^3.3.7",
5959
"classnames": "^2.2.5",
60-
"compression-webpack-plugin": "^0.3.2",
60+
"compression-webpack-plugin": "^1.0.1",
6161
"css-loader": "^0.28.0",
6262
"es5-shim": "^4.5.9",
6363
"estraverse": "^4.2.0",
6464
"expose-loader": "^0.7.3",
65-
"extract-text-webpack-plugin": "^2.1.0",
66-
"file-loader": "^0.11.1",
65+
"extract-text-webpack-plugin": "^3.0.1",
66+
"file-loader": "^1.1.5",
6767
"glob": "^7.1.1",
6868
"immutable": "^3.8.1",
6969
"imports-loader": "^0.7.1",
@@ -76,14 +76,14 @@
7676
"marked": "^0.3.6",
7777
"node-sass": "^4.5.2",
7878
"node-uuid": "^1.4.8",
79-
"postcss-loader": "^1.3.3",
79+
"postcss-loader": "^2.0.8",
8080
"prop-types": "^15.5.10",
81-
"react": "^15.6.1",
81+
"react": "^16.0.0",
8282
"react-addons-css-transition-group": "^15.6.0",
8383
"react-bootstrap": "^0.31.2",
84-
"react-dom": "^15.6.1",
84+
"react-dom": "^16.0.0",
8585
"react-intl": "^2.3.0",
86-
"react-on-rails": "^9.0.0-rc.0",
86+
"react-on-rails": "^10.0.0",
8787
"react-redux": "^5.0.5",
8888
"react-router": "^4.1.2",
8989
"react-router-dom": "^4.1.2",
@@ -93,33 +93,31 @@
9393
"resolve-url-loader": "^2.0.2",
9494
"sass-loader": "^6.0.3",
9595
"sass-resources-loader": "^1.2.1",
96-
"style-loader": "^0.16.1",
96+
"style-loader": "^0.19.0",
9797
"turbolinks": "^5.0.0",
98-
"url-loader": "^0.5.8",
99-
"webpack": "^2.3.3",
100-
"webpack-manifest-plugin": "^1.1.0",
98+
"url-loader": "^0.6.2",
99+
"webpack": "^3.8.1",
100+
"webpack-manifest-plugin": "^1.3.2",
101101
"webpack-merge": "^4.1.0"
102102
},
103103
"devDependencies": {
104-
"babel-eslint": "^7.2.1",
105-
"babel-plugin-react-transform": "^2.0.2",
104+
"babel-eslint": "^8.0.1",
106105
"body-parser": "^1.17.1",
107-
"chai": "^3.5.0",
106+
"chai": "^4.1.2",
108107
"chai-immutable": "^1.6.0",
109-
"eslint": "^3.19.0",
110-
"eslint-config-shakacode": "^14.1.1",
108+
"eslint": "^4.9.0",
109+
"eslint-config-shakacode": "^15.0.0",
111110
"eslint-import-resolver-webpack": "^0.8.1",
112111
"eslint-plugin-import": "^2.2.0",
113-
"eslint-plugin-jsx-a11y": "^4.0.0",
114-
"eslint-plugin-react": "^6.10.3",
112+
"eslint-plugin-jsx-a11y": "^6.0.2",
113+
"eslint-plugin-react": "^7.4.0",
115114
"estraverse-fb": "^1.3.1",
116115
"express": "^4.15.2",
117-
"jsdom": "^9.12.0",
118-
"mocha": "^3.2.0",
116+
"jsdom": "^11.3.0",
117+
"mocha": "^4.0.1",
119118
"pug": "^2.0.0-beta11",
120-
"react-addons-test-utils": "^15.5.1",
121119
"react-transform-hmr": "^1.0.4",
122120
"sleep": "^5.1.1",
123-
"webpack-dev-server": "^2.4.2"
121+
"webpack-dev-server": "^2.9.2"
124122
}
125123
}

client/server-rails-hot.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
/* eslint no-var: 0, no-console: 0, import/no-extraneous-dependencies: 0 */
22

3-
import webpack from 'webpack';
3+
const webpack = require('webpack');
4+
const WebpackDevServer = require('webpack-dev-server');
45

5-
import WebpackDevServer from 'webpack-dev-server';
6-
7-
import webpackConfig from './webpack.client.rails.hot.config';
6+
const webpackConfig = require('./webpack.client.rails.hot.config');
87

98
const { resolve } = require('path');
109

@@ -20,10 +19,12 @@ const hotReloadingHostname = settings.dev_server.host;
2019
const compiler = webpack(webpackConfig);
2120

2221
const devServer = new WebpackDevServer(compiler, {
23-
proxy: {
24-
'*': `http://lvh.me:${hotReloadingPort}`,
22+
proxy: { '*': `http://${hotReloadingHostname}:${hotReloadingPort}` },
23+
publicPath: output.publicPathWithHost,
24+
headers: {
25+
'Access-Control-Allow-Origin': '*',
2526
},
26-
contentBase: hotReloadingUrl,
27+
disableHostCheck: true,
2728
hot: true,
2829
inline: true,
2930
historyApiFallback: true,
@@ -39,9 +40,13 @@ const devServer = new WebpackDevServer(compiler, {
3940
},
4041
});
4142

42-
devServer.listen(hotReloadingPort, hotReloadingHostname, (err) => {
43+
devServer.listen(hotReloadingPort, hotReloadingHostname, err => {
4344
if (err) console.error(err);
4445
console.log(
45-
`=> 🔥 Webpack development server is running on ${hotReloadingUrl}`,
46+
`=> 🔥 Webpack development server is running on port ${hotReloadingUrl}`,
4647
);
4748
});
49+
50+
compiler.plugin('done', () => {
51+
process.stdout.write('Webpack: Done!');
52+
});

client/webpack.client.express.config.js

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,6 @@ config.module.rules.push(
4040
test: /\.jsx?$/,
4141
loader: 'babel-loader',
4242
exclude: /node_modules/,
43-
query: {
44-
plugins: [
45-
[
46-
'react-transform',
47-
{
48-
superClasses: ['React.Component', 'BaseComponent', 'Component'],
49-
transforms: [
50-
{
51-
transform: 'react-transform-hmr',
52-
imports: ['react'],
53-
locals: ['module'],
54-
},
55-
],
56-
},
57-
],
58-
],
59-
},
6043
},
6144
{
6245
test: /\.css$/,
@@ -69,12 +52,7 @@ config.module.rules.push(
6952
localIdentName: '[name]__[local]__[hash:base64:5]'
7053
}
7154
},
72-
{
73-
loader: 'postcss-loader',
74-
options: {
75-
plugins: 'autoprefixer'
76-
}
77-
}
55+
'postcss-loader',
7856
]
7957
},
8058
{
@@ -88,12 +66,7 @@ config.module.rules.push(
8866
localIdentName: '[name]__[local]__[hash:base64:5]',
8967
}
9068
},
91-
{
92-
loader: 'postcss-loader',
93-
options: {
94-
plugins: 'autoprefixer'
95-
}
96-
},
69+
'postcss-loader',
9770
{
9871
loader: 'sass-loader'
9972
},

client/webpack.client.rails.build.config.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ module.exports = merge(config, {
6969
},
7070
{
7171
test: /\.scss$/,
72-
use: ExtractTextPlugin.extract({
72+
loader: ExtractTextPlugin.extract({
7373
fallback: 'style-loader',
74-
loader: [
74+
use: [
7575
{
7676
loader: 'css-loader',
7777
options: {
@@ -81,12 +81,7 @@ module.exports = merge(config, {
8181
localIdentName: '[name]__[local]__[hash:base64:5]',
8282
},
8383
},
84-
{
85-
loader: 'postcss-loader',
86-
options: {
87-
plugins: 'autoprefixer'
88-
}
89-
},
84+
'postcss-loader',
9085
'sass-loader',
9186
{
9287
loader: 'sass-resources-loader',

0 commit comments

Comments
 (0)