diff --git a/package-lock.json b/package-lock.json index d18d1c9..7b56442 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,6 @@ "readdir-enhanced": "^6.0.4", "resolve-pkg": "^2.0.0", "slugify": "^1.6.6", - "through2": "^4.0.2", "thumbsup-downsize": "^2.5.2", "url-join": "^4.0.1", "yargs": "^17.7.2", @@ -6645,27 +6644,6 @@ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, - "node_modules/through2": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", - "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", - "dependencies": { - "readable-stream": "3" - } - }, - "node_modules/through2/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/thumbsup-downsize": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/thumbsup-downsize/-/thumbsup-downsize-2.5.2.tgz", @@ -12233,26 +12211,6 @@ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, - "through2": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", - "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", - "requires": { - "readable-stream": "3" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, "thumbsup-downsize": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/thumbsup-downsize/-/thumbsup-downsize-2.5.2.tgz", diff --git a/package.json b/package.json index a85b391..839cf6f 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,6 @@ "readdir-enhanced": "^6.0.4", "resolve-pkg": "^2.0.0", "slugify": "^1.6.6", - "through2": "^4.0.2", "thumbsup-downsize": "^2.5.2", "url-join": "^4.0.1", "yargs": "^17.7.2", diff --git a/src/components/exiftool/stream.js b/src/components/exiftool/stream.js index 8b72753..9d946a4 100644 --- a/src/components/exiftool/stream.js +++ b/src/components/exiftool/stream.js @@ -4,7 +4,6 @@ const debug = require('debug')('thumbsup:debug') const error = require('debug')('thumbsup:error') const es = require('event-stream') const JSONStream = require('JSONStream') -const through2 = require('through2') /* Spawn a single process and send all the files to be parsed @@ -52,13 +51,6 @@ exports.parse = (rootFolder, filePaths) => { // parse every top-level object and emit it on the stream return es.pipeline( child.stdout, - through2(chunkToString), JSONStream.parse([true]) ) } - -function chunkToString (chunk, enc, callback) { - // convert to string to help JSONStream deal with odd encodings - this.push(chunk.toString()) - callback() -}