From a3c54f22c8bf2f635bd09412dbc41248ded022f3 Mon Sep 17 00:00:00 2001 From: Jonas Hermsmeier Date: Wed, 13 Sep 2017 13:56:51 +0200 Subject: [PATCH] refactor(image-stream): Remove Promise props resolve (#1726) This removes `Bluebird.props()` from the image type handlers, as it's just a remnant when some properties in the return value were Promises that needed resolving. Change-Type: patch Connects To: #1724 --- lib/image-stream/handlers.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/image-stream/handlers.js b/lib/image-stream/handlers.js index aa844034..04f1c527 100644 --- a/lib/image-stream/handlers.js +++ b/lib/image-stream/handlers.js @@ -54,7 +54,7 @@ module.exports = { * @returns {Promise} */ 'application/x-bzip2': (imagePath, options) => { - return Bluebird.props({ + return { path: imagePath, archiveExtension: fileExtensions.getLastFileExtension(imagePath), extension: fileExtensions.getPenultimateFileExtension(imagePath), @@ -67,7 +67,7 @@ module.exports = { } }, transform: unbzip2Stream() - }) + } }, /** @@ -94,7 +94,7 @@ module.exports = { } }) }).then((uncompressedSize) => { - return Bluebird.props({ + return { path: imagePath, archiveExtension: fileExtensions.getLastFileExtension(imagePath), extension: fileExtensions.getPenultimateFileExtension(imagePath), @@ -107,7 +107,7 @@ module.exports = { } }, transform: zlib.createGunzip() - }) + } }) }, @@ -223,7 +223,7 @@ module.exports = { * @returns {Promise} */ 'application/octet-stream': (imagePath, options) => { - return Bluebird.props({ + return { path: imagePath, extension: fileExtensions.getLastFileExtension(imagePath), stream: fs.createReadStream(imagePath), @@ -235,7 +235,7 @@ module.exports = { } }, transform: new PassThroughStream() - }) + } } }