From efd044fad663241695d9c5f1fc558e563528a268 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Mon, 16 Oct 2017 11:08:33 +0800 Subject: [PATCH 1/2] chore: upgrade vue to 2.5.x --- package.json | 8 ++++---- start/package.json | 4 ++-- yarn.lock | 24 ++++++++++++------------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index d1e3fb782b..92befe2339 100644 --- a/package.json +++ b/package.json @@ -109,13 +109,13 @@ "source-map-support": "^0.5.0", "tappable": "^1.1.0", "url-loader": "^0.6.2", - "vue": "~2.4.4", + "vue": "~2.5.2", "vue-loader": "^13.0.5", "vue-meta": "^1.2.0", "vue-router": "^2.7.0", - "vue-server-renderer": "~2.4.4", - "vue-template-compiler": "~2.4.4", - "vuex": "^2.4.1", + "vue-server-renderer": "~2.5.2", + "vue-template-compiler": "~2.5.2", + "vuex": "^3.0.0", "webpack": "^3.6.0", "webpack-bundle-analyzer": "^2.9.0", "webpack-dev-middleware": "^1.12.0", diff --git a/start/package.json b/start/package.json index 49f2857e24..c3a0b495a8 100644 --- a/start/package.json +++ b/start/package.json @@ -62,11 +62,11 @@ "serve-static": "^1.13.1", "compression": "^1.7.1", "fs-extra": "^4.0.2", - "vue-server-renderer": "~2.4.4", + "vue-server-renderer": "~2.5.2", "@nuxtjs/youch": "3.1.0", "source-map": "^0.6.1", "connect": "^3.6.5", - "vue": "~2.4.4", + "vue": "~2.5.2", "vue-meta": "^1.2.0", "lru-cache": "^4.1.1", "server-destroy": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index 2fc4e425be..9d2a96d2c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6680,9 +6680,9 @@ vue-router@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-2.7.0.tgz#16d424493aa51c3c8cce8b7c7210ea4c3a89aff1" -vue-server-renderer@~2.4.4: - version "2.4.4" - resolved "https://registry.yarnpkg.com/vue-server-renderer/-/vue-server-renderer-2.4.4.tgz#bd59cf4e42dfaf2c9e388af8837b5420dd51360d" +vue-server-renderer@~2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/vue-server-renderer/-/vue-server-renderer-2.5.2.tgz#c96a4368caa3fd298a528f1bf40632d8f696ff25" dependencies: chalk "^1.1.3" hash-sum "^1.0.2" @@ -6700,9 +6700,9 @@ vue-style-loader@^3.0.0: hash-sum "^1.0.2" loader-utils "^1.0.2" -vue-template-compiler@~2.4.4: - version "2.4.4" - resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.4.4.tgz#2cde3b704124985c27d50b5387c9691ba515fb57" +vue-template-compiler@~2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.2.tgz#6f198ebc677b8f804315cd33b91e849315ae7177" dependencies: de-indent "^1.0.2" he "^1.1.0" @@ -6711,13 +6711,13 @@ vue-template-es2015-compiler@^1.5.3: version "1.5.3" resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.5.3.tgz#22787de4e37ebd9339b74223bc467d1adee30545" -vue@~2.4.4: - version "2.4.4" - resolved "https://registry.yarnpkg.com/vue/-/vue-2.4.4.tgz#ea9550b96a71465fd2b8b17b61673b3561861789" +vue@~2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.2.tgz#fd367a87bae7535e47f9dc5c9ec3b496e5feb5a4" -vuex@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/vuex/-/vuex-2.4.1.tgz#7890b650ba8565b70937b4e7670577082dfe8bc1" +vuex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.0.0.tgz#98b4b5c4954b1c1c1f5b29fa0476a23580315814" watchpack@^1.4.0: version "1.4.0" From f8bc7e23838f38b76cb8b05a98b1878090966d15 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Mon, 16 Oct 2017 11:29:09 +0800 Subject: [PATCH 2/2] refactor: renderToString now returns a Promise if no callback is passed --- lib/core/renderer.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/core/renderer.js b/lib/core/renderer.js index dd0b5ddf8e..ee5f279c84 100644 --- a/lib/core/renderer.js +++ b/lib/core/renderer.js @@ -3,7 +3,6 @@ import serialize from 'serialize-javascript' import generateETag from 'etag' import fresh from 'fresh' import Tapable from 'tappable' -import pify from 'pify' import serveStatic from 'serve-static' import compression from 'compression' import _ from 'lodash' @@ -167,9 +166,6 @@ export default class Renderer extends Tapable { runInNewContext: false, basedir: this.options.rootDir }, this.options.render.bundleRenderer)) - - // Promisify renderToString - this.bundleRenderer.renderToString = pify(this.bundleRenderer.renderToString) } useMiddleware (m) {