mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 15:27:17 +00:00
refactor(image-stream): get rid of isstream
(#1244)
The dependency is not yet removed from `npm-shrinkwrap.json` given that there another one that keeps requiring it. Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit is contained in:
parent
bc2512ac5e
commit
8a12e9cf94
@ -19,7 +19,7 @@
|
||||
const _ = require('lodash');
|
||||
const Bluebird = require('bluebird');
|
||||
const fs = Bluebird.promisifyAll(require('fs'));
|
||||
const isStream = require('isstream');
|
||||
const stream = require('stream');
|
||||
const utils = require('./utils');
|
||||
const handlers = require('./handlers');
|
||||
const supportedFileTypes = require('./supported');
|
||||
@ -119,7 +119,9 @@ exports.getImageMetadata = (file) => {
|
||||
// destroy() it, to avoid dangling open file descriptors etc.
|
||||
image.stream.destroy();
|
||||
|
||||
return _.omitBy(image, isStream);
|
||||
return _.omitBy(image, (property) => {
|
||||
return property instanceof stream.Stream;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -86,7 +86,6 @@
|
||||
"gzip-uncompressed-size": "^1.0.0",
|
||||
"immutable": "^3.8.1",
|
||||
"is-elevated": "^2.0.1",
|
||||
"isstream": "^0.1.2",
|
||||
"lodash": "^4.5.1",
|
||||
"lodash-deep": "^2.0.0",
|
||||
"lzma-native": "^1.5.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user