From d7c5d0f9cd178c1baa4e228c5925e56f8a1ae0e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken-H=C3=A5vard=20Lieng?= Date: Thu, 7 Jan 2016 00:28:11 +0100 Subject: [PATCH] Upgrade babel to 6.4.0, fail gulp builds on webpack errors --- assets/bindata.go | 16 ++++++++-------- client/gulpfile.js | 3 +++ client/package.json | 6 +++--- client/src/js/actions/server.js | 2 +- client/src/js/components/ChatTitle.js | 2 +- client/src/js/components/MessageBox.js | 6 +++--- client/src/js/components/MessageHeader.js | 2 +- client/src/js/components/MessageInput.js | 6 +++--- client/src/js/components/Navicon.js | 2 +- client/src/js/components/Search.js | 2 +- client/src/js/components/TabList.js | 6 +++--- client/src/js/components/TabListItem.js | 2 +- client/src/js/components/UserList.js | 4 ++-- client/src/js/components/UserListItem.js | 2 +- client/src/js/containers/Chat.js | 2 +- client/src/js/containers/Connect.js | 6 +++--- 16 files changed, 36 insertions(+), 33 deletions(-) diff --git a/assets/bindata.go b/assets/bindata.go index a8dbefa5..d5ce22a0 100644 --- a/assets/bindata.go +++ b/assets/bindata.go @@ -69,7 +69,7 @@ func bundle_css_gz() (*asset, error) { return nil, err } - info := bindata_file_info{name: "bundle.css.gz", size: 1706, mode: os.FileMode(436), modTime: time.Unix(1452019133, 0)} + info := bindata_file_info{name: "bundle.css.gz", size: 1706, mode: os.FileMode(436), modTime: time.Unix(1452122792, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -89,7 +89,7 @@ func bundle_js_gz() (*asset, error) { return nil, err } - info := bindata_file_info{name: "bundle.js.gz", size: 114110, mode: os.FileMode(436), modTime: time.Unix(1452019133, 0)} + info := bindata_file_info{name: "bundle.js.gz", size: 114110, mode: os.FileMode(436), modTime: time.Unix(1452122793, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -109,7 +109,7 @@ func config_default_toml() (*asset, error) { return nil, err } - info := bindata_file_info{name: "config.default.toml", size: 981, mode: os.FileMode(436), modTime: time.Unix(1452019112, 0)} + info := bindata_file_info{name: "config.default.toml", size: 981, mode: os.FileMode(436), modTime: time.Unix(1452122765, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -129,7 +129,7 @@ func font_fontello_eot_gz() (*asset, error) { return nil, err } - info := bindata_file_info{name: "font/fontello.eot.gz", size: 3543, mode: os.FileMode(436), modTime: time.Unix(1452019133, 0)} + info := bindata_file_info{name: "font/fontello.eot.gz", size: 3543, mode: os.FileMode(436), modTime: time.Unix(1452122793, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -149,7 +149,7 @@ func font_fontello_svg_gz() (*asset, error) { return nil, err } - info := bindata_file_info{name: "font/fontello.svg.gz", size: 1707, mode: os.FileMode(436), modTime: time.Unix(1452019133, 0)} + info := bindata_file_info{name: "font/fontello.svg.gz", size: 1707, mode: os.FileMode(436), modTime: time.Unix(1452122793, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -169,7 +169,7 @@ func font_fontello_ttf_gz() (*asset, error) { return nil, err } - info := bindata_file_info{name: "font/fontello.ttf.gz", size: 3490, mode: os.FileMode(436), modTime: time.Unix(1452019133, 0)} + info := bindata_file_info{name: "font/fontello.ttf.gz", size: 3490, mode: os.FileMode(436), modTime: time.Unix(1452122793, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -189,7 +189,7 @@ func font_fontello_woff_gz() (*asset, error) { return nil, err } - info := bindata_file_info{name: "font/fontello.woff.gz", size: 3701, mode: os.FileMode(436), modTime: time.Unix(1452019133, 0)} + info := bindata_file_info{name: "font/fontello.woff.gz", size: 3701, mode: os.FileMode(436), modTime: time.Unix(1452122793, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -209,7 +209,7 @@ func index_html_gz() (*asset, error) { return nil, err } - info := bindata_file_info{name: "index.html.gz", size: 252, mode: os.FileMode(436), modTime: time.Unix(1452019133, 0)} + info := bindata_file_info{name: "index.html.gz", size: 252, mode: os.FileMode(436), modTime: time.Unix(1452122793, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/client/gulpfile.js b/client/gulpfile.js index 8ce51dd7..14dfcbfc 100644 --- a/client/gulpfile.js +++ b/client/gulpfile.js @@ -41,6 +41,9 @@ gulp.task('js', function(cb) { gutil.log('[webpack]', stats.toString({ colors: true })); + + if (stats.hasErrors()) process.exit(1); + cb(); }); }); diff --git a/client/package.json b/client/package.json index f6ba0421..0d29719d 100644 --- a/client/package.json +++ b/client/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "devDependencies": { - "babel-core": "^6.3.26", + "babel-core": "^6.4.0", "babel-eslint": "^5.0.0-beta6", "babel-loader": "^6.2.1", "babel-plugin-react-transform": "^2.0.0", @@ -13,7 +13,7 @@ "babel-preset-react": "^6.3.13", "babel-preset-stage-0": "^6.3.13", "eslint": "^1.10.3", - "eslint-config-airbnb": "^3.0.0", + "eslint-config-airbnb": "^3.0.1", "eslint-loader": "^1.2.0", "eslint-plugin-react": "^3.14.0", "express": "^4.13.3", @@ -31,7 +31,7 @@ "redux-devtools": "^3.0.1", "redux-devtools-dock-monitor": "^1.0.1", "redux-devtools-log-monitor": "^1.0.1", - "webpack": "^1.12.9", + "webpack": "^1.12.10", "webpack-dev-middleware": "^1.4.0", "webpack-hot-middleware": "^2.6.0" }, diff --git a/client/src/js/actions/server.js b/client/src/js/actions/server.js index 27a9dfa2..dc5c86b9 100644 --- a/client/src/js/actions/server.js +++ b/client/src/js/actions/server.js @@ -68,7 +68,7 @@ export function setNick(nick, server) { socket: { type: 'nick', data: { - 'new': nick, + new: nick, server } } diff --git a/client/src/js/components/ChatTitle.js b/client/src/js/components/ChatTitle.js index af32db3f..d86d58eb 100644 --- a/client/src/js/components/ChatTitle.js +++ b/client/src/js/components/ChatTitle.js @@ -16,7 +16,7 @@ export default class ChatTitle extends Component { } else { disconnect(tab.server); } - } + }; render() { const { title, tab, channel, toggleSearch } = this.props; diff --git a/client/src/js/components/MessageBox.js b/client/src/js/components/MessageBox.js index 7156eb91..47d9e60d 100644 --- a/client/src/js/components/MessageBox.js +++ b/client/src/js/components/MessageBox.js @@ -8,7 +8,7 @@ import MessageLine from './MessageLine'; export default class MessageBox extends Component { state = { height: window.innerHeight - 100 - } + }; componentDidMount() { this.updateWidth(); @@ -43,12 +43,12 @@ export default class MessageBox extends Component { setWrapWidth(width); } } - } + }; handleResize = () => { this.updateWidth(); this.setState({ height: window.innerHeight - 100 }); - } + }; render() { const { tab, messages, select, openPrivateChat } = this.props; diff --git a/client/src/js/components/MessageHeader.js b/client/src/js/components/MessageHeader.js index 8f69a57f..7b5c82fa 100644 --- a/client/src/js/components/MessageHeader.js +++ b/client/src/js/components/MessageHeader.js @@ -12,7 +12,7 @@ export default class MessageHeader extends Component { openPrivateChat(message.server, message.from); select(message.server, message.from, true); - } + }; render() { const { message } = this.props; diff --git a/client/src/js/components/MessageInput.js b/client/src/js/components/MessageInput.js index 94c76ae3..4c4f7ec8 100644 --- a/client/src/js/components/MessageInput.js +++ b/client/src/js/components/MessageInput.js @@ -5,7 +5,7 @@ import pure from 'pure-render-decorator'; export default class MessageInput extends Component { state = { value: '' - } + }; handleKey = e => { const { tab, runCommand, sendMessage, addInputHistory, incrementInputHistory, @@ -34,11 +34,11 @@ export default class MessageInput extends Component { this.setState({ value: e.target.value }); resetInputHistory(); } - } + }; handleChange = e => { this.setState({ value: e.target.value }); - } + }; render() { return ( diff --git a/client/src/js/components/Navicon.js b/client/src/js/components/Navicon.js index fca1aaa6..5a9f570a 100644 --- a/client/src/js/components/Navicon.js +++ b/client/src/js/components/Navicon.js @@ -5,7 +5,7 @@ import { toggleMenu } from '../actions/tab'; @pure class Navicon extends Component { - handleClick = () => this.props.dispatch(toggleMenu()) + handleClick = () => this.props.dispatch(toggleMenu()); render() { return ( diff --git a/client/src/js/components/Search.js b/client/src/js/components/Search.js index 9d12bf16..4a549d9b 100644 --- a/client/src/js/components/Search.js +++ b/client/src/js/components/Search.js @@ -10,7 +10,7 @@ export default class Search extends Component { } } - handleSearch = e => this.props.onSearch(e.target.value) + handleSearch = e => this.props.onSearch(e.target.value); render() { const { search } = this.props; diff --git a/client/src/js/components/TabList.js b/client/src/js/components/TabList.js index 0e2b95df..226fa226 100644 --- a/client/src/js/components/TabList.js +++ b/client/src/js/components/TabList.js @@ -7,17 +7,17 @@ export default class TabList extends Component { handleTabClick = (server, target) => { this.props.select(server, target, target && target.charAt(0) !== '#'); this.props.hideMenu(); - } + }; handleConnectClick = () => { this.props.pushPath('/connect'); this.props.hideMenu(); - } + }; handleSettingsClick = () => { this.props.pushPath('/settings'); this.props.hideMenu(); - } + }; render() { const { channels, servers, privateChats, showMenu, selected } = this.props; diff --git a/client/src/js/components/TabListItem.js b/client/src/js/components/TabListItem.js index 157167a3..9752e8d6 100644 --- a/client/src/js/components/TabListItem.js +++ b/client/src/js/components/TabListItem.js @@ -6,7 +6,7 @@ export default class TabListItem extends Component { handleClick = () => { const { server, target, onClick } = this.props; onClick(server, target); - } + }; render() { const { target, content, selected } = this.props; diff --git a/client/src/js/components/UserList.js b/client/src/js/components/UserList.js index f3d2dbe6..c0228401 100644 --- a/client/src/js/components/UserList.js +++ b/client/src/js/components/UserList.js @@ -7,7 +7,7 @@ import UserListItem from './UserListItem'; export default class UserList extends Component { state = { height: window.innerHeight - 100 - } + }; componentDidMount() { window.addEventListener('resize', this.handleResize); @@ -19,7 +19,7 @@ export default class UserList extends Component { handleResize = () => { this.setState({ height: window.innerHeight - 100 }); - } + }; render() { const { tab, openPrivateChat, select } = this.props; diff --git a/client/src/js/components/UserListItem.js b/client/src/js/components/UserListItem.js index 81cff240..8e12dc13 100644 --- a/client/src/js/components/UserListItem.js +++ b/client/src/js/components/UserListItem.js @@ -8,7 +8,7 @@ export default class UserListItem extends Component { openPrivateChat(tab.server, user.nick); select(tab.server, user.nick, true); - } + }; render() { return

{this.props.user.renderName}

; diff --git a/client/src/js/containers/Chat.js b/client/src/js/containers/Chat.js index 70894185..1362b494 100644 --- a/client/src/js/containers/Chat.js +++ b/client/src/js/containers/Chat.js @@ -60,7 +60,7 @@ class Chat extends Component { if (tab.channel) { dispatch(searchMessages(tab.server, tab.channel, phrase)); } - } + }; render() { const { tab, channel, search, history, dispatch } = this.props; diff --git a/client/src/js/containers/Connect.js b/client/src/js/containers/Connect.js index a7e1fcb6..b6ad76d6 100644 --- a/client/src/js/containers/Connect.js +++ b/client/src/js/containers/Connect.js @@ -10,7 +10,7 @@ import { select } from '../actions/tab'; class Connect extends Component { state = { showOptionals: false - } + }; handleSubmit = (e) => { e.preventDefault(); @@ -38,11 +38,11 @@ class Connect extends Component { dispatch(join(channels, address)); } } - } + }; handleShowClick = () => { this.setState({ showOptionals: !this.state.showOptionals }); - } + }; render() { let optionals = null;