Update client dependencies

This commit is contained in:
Ken-Håvard Lieng 2018-03-25 01:34:41 +01:00
parent 20c3855ced
commit 19bcc51eb4
13 changed files with 2973 additions and 1741 deletions

File diff suppressed because one or more lines are too long

View File

@ -8,10 +8,10 @@
["module-resolver", {
"root": ["./src/js"],
"alias": {
"components": "./components",
"containers": "./containers",
"state": "./state",
"util": "./util"
"components": "./src/js/components",
"containers": "./src/js/containers",
"state": "./src/js/state",
"util": "./src/js/util"
}
}]
],

View File

@ -8,15 +8,21 @@
"arrow-parens": 0,
"comma-dangle": [2, "never"],
"consistent-return": 0,
"function-paren-newline": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-autofocus": 0,
"jsx-a11y/no-noninteractive-element-interactions": 0,
"jsx-a11y/no-static-element-interactions": 0,
"new-cap": [2, { "capIsNewExceptions": ["Map", "List", "Record", "Set"] }],
"no-console": 0,
"no-param-reassign": 0,
"no-plusplus": 0,
"no-restricted-globals": 1,
"object-curly-newline": 0,
"react/jsx-filename-extension": 0,
"react/no-array-index-key": 0,
"react/prop-types": 0,
"react/prefer-stateless-function": 0
"react/prefer-stateless-function": 0,
"react/prop-types": 0
},
"globals": {
"DEV": true

View File

@ -6,10 +6,10 @@
"main": "index.js",
"devDependencies": {
"babel-core": "^6.23.1",
"babel-eslint": "^7.1.1",
"babel-jest": "^20.0.0",
"babel-eslint": "^8.2.2",
"babel-jest": "^22.4.3",
"babel-loader": "^7.0.0",
"babel-plugin-module-resolver": "^2.7.1",
"babel-plugin-module-resolver": "^3.1.1",
"babel-plugin-rewire": "^1.1.0",
"babel-plugin-transform-react-constant-elements": "^6.23.0",
"babel-plugin-transform-react-inline-elements": "^6.22.0",
@ -18,26 +18,26 @@
"babel-preset-stage-0": "^6.22.0",
"brotli": "^1.3.1",
"css-loader": "^0.28.0",
"eslint": "^3.15.0",
"eslint-config-airbnb": "^14.1.0",
"eslint-import-resolver-babel-module": "^3.0.0",
"eslint-loader": "^1.6.1",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-import-resolver-babel-module": "^4.0.0",
"eslint-loader": "^2.0.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"express": "^4.14.1",
"express-http-proxy": "^1.0.1",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^4.0.0",
"gulp-autoprefixer": "^5.0.0",
"gulp-cached": "^1.1.1",
"gulp-concat": "^2.6.1",
"gulp-cssnano": "^2.1.2",
"gulp-util": "^3.0.8",
"jest": "^20.0.0",
"style-loader": "^0.18.0",
"jest": "^22.4.3",
"style-loader": "^0.20.3",
"through2": "^2.0.3",
"webpack": "^3.0.0",
"webpack-dev-middleware": "^1.10.0",
"webpack": "^4.1.1",
"webpack-dev-middleware": "^3.0.1",
"webpack-hot-middleware": "^2.17.0"
},
"dependencies": {
@ -49,9 +49,9 @@
"immutable": "^3.8.1",
"js-cookie": "^2.1.4",
"lodash": "^4.17.4",
"react": "^15.4.2",
"react-dom": "^15.4.2",
"react-hot-loader": "next",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-hot-loader": "^4.0.0",
"react-redux": "^5.0.2",
"react-virtualized": "^9.3.0",
"redux": "^3.6.0",

View File

@ -1,7 +1,7 @@
import debounce from 'lodash/debounce';
const debounceKey = action => {
const key = action.socket.debounce.key;
const { key } = action.socket.debounce;
if (key) {
return `${action.type} ${key}`;
}

View File

@ -3,7 +3,7 @@ import { setCharWidth } from 'state/app';
import { stringWidth } from 'util';
export default function fonts({ store }) {
let charWidth = localStorage.charWidth;
let { charWidth } = localStorage;
if (charWidth) {
store.dispatch(setCharWidth(parseFloat(charWidth)));
}

View File

@ -3,9 +3,10 @@ import debounce from 'lodash/debounce';
import { getSelectedTab } from 'state/tab';
import { observe } from 'util/observe';
const saveTab = debounce(tab =>
Cookie.set('tab', tab.toString(), { expires: 30 })
, 1000);
const saveTab = debounce(
tab => Cookie.set('tab', tab.toString(), { expires: 30 }),
1000
);
export default function storage({ store }) {
observe(store, getSelectedTab, tab => {

View File

@ -15,7 +15,7 @@ const modePrefixes = [
{ mode: 'a', prefix: '&' }, // Admin
{ mode: 'o', prefix: '@' }, // Op
{ mode: 'h', prefix: '%' }, // Halfop
{ mode: 'v', prefix: '+' } // Voice
{ mode: 'v', prefix: '+' } // Voice
];
function updateRenderName(user) {
@ -41,7 +41,7 @@ function loadUser(nick) {
for (let i = 0; i < modePrefixes.length; i++) {
if (nick[0] === modePrefixes[i].prefix) {
mode = modePrefixes[i].mode;
({ mode } = modePrefixes[i]);
}
}
@ -57,7 +57,7 @@ function compareUsers(a, b) {
b = b.renderName.toLowerCase();
for (let i = 0; i < modePrefixes.length; i++) {
const prefix = modePrefixes[i].prefix;
const { prefix } = modePrefixes[i];
if (a[0] === prefix && b[0] !== prefix) {
return -1;
@ -165,7 +165,7 @@ export default createReducer(Map(), {
}
return users.update(i, u => {
let mode = u.mode;
let { mode } = u;
let j = remove.length;
while (j--) {
mode = mode.replace(remove[j], '');

View File

@ -101,7 +101,7 @@ function initMessage(message, tab, state) {
message.content = message.content.replace(/\s\s+/g, ' ');
if (message.content.indexOf('\x01ACTION') === 0) {
const from = message.from;
const { from } = message;
message.from = null;
message.type = 'action';
message.content = from + message.content.slice(7, -1);

View File

@ -76,7 +76,7 @@ export function select(server, name, doReplace) {
export function updateSelection() {
return (dispatch, getState) => {
const state = getState();
const history = state.tab.history;
const { history } = state.tab;
const { servers } = state;
const { server } = state.tab.selected;

View File

@ -1,15 +1,13 @@
var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'eval',
mode: 'development',
entry: [
'react-hot-loader/patch',
'webpack-hot-middleware/client',
'./src/js/index'
],
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/'
},
@ -22,9 +20,8 @@ module.exports = {
},
plugins: [
new webpack.DefinePlugin({
DEV: true,
DEV: true
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
new webpack.HotModuleReplacementPlugin()
]
};

View File

@ -1,12 +1,11 @@
var path = require('path');
var webpack = require('webpack');
module.exports = {
mode: 'production',
entry: [
'./src/js/index'
],
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
module: {
@ -18,18 +17,7 @@ module.exports = {
},
plugins: [
new webpack.DefinePlugin({
DEV: false,
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}),
new webpack.optimize.ModuleConcatenationPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
DEV: false
})
]
};

File diff suppressed because it is too large Load Diff