From 040361a8e17d8e31b3cff51fffeb9d88afaa8dbf Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Thu, 27 Apr 2017 19:41:18 +0000 Subject: [PATCH 1/2] fix(package): update fs-extra to version 3.0.0 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7daaf0ff..9b68b878 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "cheerio": "0.22.0", "css-url-parser": "^1.0.0", "debug": "^2.4.5", - "fs-extra": "^2.0.0", + "fs-extra": "^3.0.0", "he": "^1.1.0", "lodash": "^4.11.1", "normalize-url": "^1.5.3", From cbe8a2335c46382b38db899f7ddb7b2a3a41eaf9 Mon Sep 17 00:00:00 2001 From: s0ph1e Date: Sat, 29 Apr 2017 22:55:55 +0300 Subject: [PATCH 2/2] Remove unnecessary promisification --- lib/resource-saver/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/resource-saver/index.js b/lib/resource-saver/index.js index 11196ac3..1ea09623 100644 --- a/lib/resource-saver/index.js +++ b/lib/resource-saver/index.js @@ -3,10 +3,7 @@ const path = require('path'); const _ = require('lodash'); const Promise = require('bluebird'); - const fs = require('fs-extra'); -const outputFileAsync = Promise.promisify(fs.outputFile); -const removeAsync = Promise.promisify(fs.remove); const supportedOptions = [ 'directory' ]; @@ -35,7 +32,7 @@ class ResourceSaver { saveResource (resource) { const filename = path.join(this.absoluteDirectoryPath, resource.getFilename()); const text = resource.getText(); - return outputFileAsync(filename, text, { encoding: 'binary' }).then(() => { + return fs.outputFile(filename, text, { encoding: 'binary' }).then(() => { this.loadedResources.push(resource); }); } @@ -46,7 +43,7 @@ class ResourceSaver { */ errorCleanup () { if (!_.isEmpty(this.loadedResources)) { - return removeAsync(this.absoluteDirectoryPath); + return fs.remove(this.absoluteDirectoryPath); } return Promise.resolve(); }