From 00db3d3fc65f1a39299bfc4b1d70e0ffbfeb20da Mon Sep 17 00:00:00 2001 From: Justkant Date: Wed, 28 Oct 2015 17:26:54 +0800 Subject: [PATCH 1/4] update dependencies & fix ApiClient Add charset utf-8 to html assets to prevent future errors --- package.json | 17 ++++++++--------- src/helpers/ApiClient.js | 6 +++++- src/helpers/Html.js | 6 +++--- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 586bf9f..966eb70 100644 --- a/package.json +++ b/package.json @@ -88,17 +88,17 @@ } }, "dependencies": { - "babel": "5.8.23", - "babel-plugin-typecheck": "1.3.0", + "babel": "5.8.29", + "babel-plugin-typecheck": "2.0.0", "bcryptjs": "^2.3.0", "body-parser": "1.14.1", "compression": "^1.6.0", "cookie-parser": "^1.4.0", "express": "4.13.3", "file-loader": "0.8.4", - "history": "1.12.5", + "history": "1.12.6", "http-proxy": "1.12.0", - "jsonwebtoken": "^5.4.0", + "jsonwebtoken": "^5.4.1", "lru-memoize": "1.0.0", "map-props": "1.0.0", "ms": "^0.7.1", @@ -111,8 +111,7 @@ "react-dom": "0.14.0", "react-redux": "4.0.0", "react-router": "1.0.0-rc3", - "redux": "3.0.3", - "redux-form": "2.4.5", + "redux": "3.0.4", "redux-router": "^1.0.0-beta3", "serialize-javascript": "1.1.2", "serve-favicon": "2.3.0", @@ -124,12 +123,12 @@ }, "devDependencies": { "autoprefixer-stylus": "0.8.0", - "babel-core": "5.8.25", + "babel-core": "5.8.30", "babel-eslint": "4.1.3", "babel-loader": "5.3.2", "babel-plugin-react-transform": "1.1.1", - "babel-runtime": "5.8.25", - "better-npm-run": "0.0.2", + "babel-runtime": "5.8.29", + "better-npm-run": "0.0.3", "chai": "3.4.0", "clean-webpack-plugin": "0.1.3", "concurrently": "0.1.1", diff --git a/src/helpers/ApiClient.js b/src/helpers/ApiClient.js index 0bf8e5c..8fdd051 100644 --- a/src/helpers/ApiClient.js +++ b/src/helpers/ApiClient.js @@ -13,7 +13,7 @@ function formatUrl(path) { return '/api' + adjustedPath; } -export default class ApiClient { +class _ApiClient { constructor(req, res) { methods.forEach((method) => { this[method] = (path, { params, data } = {}) => { @@ -47,3 +47,7 @@ export default class ApiClient { }); } } + +const ApiClient = _ApiClient; + +export default ApiClient; diff --git a/src/helpers/Html.js b/src/helpers/Html.js index aaea203..297ea78 100644 --- a/src/helpers/Html.js +++ b/src/helpers/Html.js @@ -34,13 +34,13 @@ export default class Html extends Component { {/* styles (will be present only in production with webpack extract text plugin) */} {Object.keys(assets.styles).map((style, index) => + rel="stylesheet" type="text/css" charSet="UTF-8"/> )}
-