From ba2382b46985437d58a578649b067dd14aed0ad6 Mon Sep 17 00:00:00 2001 From: PeterRao Date: Fri, 30 Mar 2018 16:03:58 +0800 Subject: [PATCH] fix: _resumeMultipart not use yield --- lib/browser/managed_upload.js | 2 +- package.json | 3 +-- task/browser-test-build.js | 2 +- test/browser/browser.test.js | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/browser/managed_upload.js b/lib/browser/managed_upload.js index d3dd28930..ac7b68bb0 100644 --- a/lib/browser/managed_upload.js +++ b/lib/browser/managed_upload.js @@ -180,7 +180,7 @@ proto._resumeMultipart = function* _resumeMultipart(checkpoint, options) { } // start uploads jobs - const errors = this._thunkPool(jobs, parallel); + const errors = yield this._thunkPool(jobs, parallel); multipartFinish = true; // check errors after all jobs are completed diff --git a/package.json b/package.json index f90c0aa50..a8afc798f 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "url": "https://github.com/aliyun/oss-nodejs-sdk/issues" }, "engines": { - "node": ">=4" + "node": ">=6" }, "homepage": "https://github.com/aliyun/oss-nodejs-sdk", "devDependencies": { @@ -82,7 +82,6 @@ "karma-mocha": "^1.3.0", "mm": "^2.0.0", "mocha": "^3.5.3", - "platform": "^1.3.4", "promise-polyfill": "^6.0.2", "should": "^11.0.0", "sinon": "^1.17.7", diff --git a/task/browser-test-build.js b/task/browser-test-build.js index 64ccb33fb..087e97f93 100644 --- a/task/browser-test-build.js +++ b/task/browser-test-build.js @@ -63,7 +63,7 @@ function build(options, callback) { }).bundle(function(err, data) { if (err) return callback(err); var code = (data || '').toString(); - fs.unlink(stsConfFile); + fs.unlinkSync(stsConfFile); callback(null, code); }); }); diff --git a/test/browser/browser.test.js b/test/browser/browser.test.js index 48d0747aa..e7edaee7a 100644 --- a/test/browser/browser.test.js +++ b/test/browser/browser.test.js @@ -486,7 +486,6 @@ describe('browser', () => { yield new Promise((resolve) => { const fr = new FileReader(); fr.onload = function () { - console.log(fr.result); assert.equal(resultGet.content.toString(), fr.result); resolve(); };