Comparing version 7.0.0 to 7.1.0
@@ -7,2 +7,3 @@ 'use strict'; | ||
const contentDisposition = require('content-disposition'); | ||
const archiveType = require('archive-type'); | ||
const decompress = require('decompress'); | ||
@@ -100,3 +101,3 @@ const filenamify = require('filenamify'); | ||
if (!output) { | ||
return opts.extract ? decompress(data, opts) : data; | ||
return opts.extract && archiveType(data) ? decompress(data, opts) : data; | ||
} | ||
@@ -107,3 +108,3 @@ | ||
if (opts.extract) { | ||
if (opts.extract && archiveType(data)) { | ||
return decompress(data, path.dirname(outputFilepath), opts); | ||
@@ -110,0 +111,0 @@ } |
{ | ||
"name": "download", | ||
"version": "7.0.0", | ||
"description": "Download and extract files", | ||
"license": "MIT", | ||
"repository": "kevva/download", | ||
"author": { | ||
"email": "kevinmartensson@gmail.com", | ||
"name": "Kevin Mårtensson", | ||
"url": "github.com/kevva" | ||
}, | ||
"engines": { | ||
"node": ">=6" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"download", | ||
"extract", | ||
"http", | ||
"request", | ||
"url" | ||
], | ||
"dependencies": { | ||
"caw": "^2.0.1", | ||
"content-disposition": "^0.5.2", | ||
"decompress": "^4.2.0", | ||
"ext-name": "^5.0.0", | ||
"file-type": "^7.7.1", | ||
"filenamify": "^2.0.0", | ||
"get-stream": "^3.0.0", | ||
"got": "^8.3.1", | ||
"make-dir": "^1.2.0", | ||
"p-event": "^1.3.0", | ||
"pify": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"is-zip": "^1.0.0", | ||
"nock": "^9.2.5", | ||
"path-exists": "^3.0.0", | ||
"random-buffer": "^0.1.0", | ||
"rimraf": "^2.6.2", | ||
"xo": "*" | ||
} | ||
"name": "download", | ||
"version": "7.1.0", | ||
"description": "Download and extract files", | ||
"license": "MIT", | ||
"repository": "kevva/download", | ||
"author": { | ||
"email": "kevinmartensson@gmail.com", | ||
"name": "Kevin Mårtensson", | ||
"url": "github.com/kevva" | ||
}, | ||
"engines": { | ||
"node": ">=6" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"download", | ||
"extract", | ||
"http", | ||
"request", | ||
"url" | ||
], | ||
"dependencies": { | ||
"archive-type": "^4.0.0", | ||
"caw": "^2.0.1", | ||
"content-disposition": "^0.5.2", | ||
"decompress": "^4.2.0", | ||
"ext-name": "^5.0.0", | ||
"file-type": "^8.1.0", | ||
"filenamify": "^2.0.0", | ||
"get-stream": "^3.0.0", | ||
"got": "^8.3.1", | ||
"make-dir": "^1.2.0", | ||
"p-event": "^2.1.0", | ||
"pify": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"is-zip": "^1.0.0", | ||
"nock": "^9.2.5", | ||
"path-exists": "^3.0.0", | ||
"random-buffer": "^0.1.0", | ||
"rimraf": "^2.6.2", | ||
"xo": "*" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6689
92
12
+ Addedarchive-type@^4.0.0
+ Addedarchive-type@4.0.0(transitive)
+ Addedfile-type@4.4.08.1.0(transitive)
+ Addedp-event@2.3.1(transitive)
- Removedfile-type@7.7.1(transitive)
- Removedp-event@1.3.0(transitive)
- Removedp-timeout@1.2.1(transitive)
Updatedfile-type@^8.1.0
Updatedp-event@^2.1.0