Comparing version 0.10.4 to 0.10.5
@@ -96,3 +96,7 @@ var binary = require('binary'); | ||
sourceSize = size; | ||
source.stream(Math.max(0,size-tailSize)).pipe(endDir); | ||
source.stream(Math.max(0,size-tailSize)) | ||
.on('error', function (error) { endDir.emit('error', error) }) | ||
.pipe(endDir); | ||
return endDir.pull(signature); | ||
@@ -166,3 +170,3 @@ }) | ||
}); | ||
},{concurrency: opts.concurrency || 1}); | ||
}, opts.concurrency > 1 ? {concurrency: opts.concurrency || undefined} : undefined); | ||
}); | ||
@@ -169,0 +173,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
var fs = require('fs'); | ||
var fs = require('graceful-fs'); | ||
var Promise = require('bluebird'); | ||
@@ -3,0 +3,0 @@ var directory = require('./directory'); |
@@ -86,3 +86,3 @@ var Promise = require('bluebird'); | ||
entry.vars.then(function(vars) { | ||
var fileSizeKnown = !(vars.flags & 0x08), | ||
var fileSizeKnown = !(vars.flags & 0x08) || vars.compressedSize > 0, | ||
eof; | ||
@@ -89,0 +89,0 @@ |
@@ -167,3 +167,3 @@ var util = require('util'); | ||
var fileSizeKnown = !(vars.flags & 0x08), | ||
var fileSizeKnown = !(vars.flags & 0x08) || vars.compressedSize > 0, | ||
eof; | ||
@@ -170,0 +170,0 @@ |
{ | ||
"name": "unzipper", | ||
"version": "0.10.4", | ||
"version": "0.10.5", | ||
"description": "Unzip cross-platform streaming API ", | ||
@@ -32,2 +32,3 @@ "author": "Evan Oxfeld <eoxfeld@gmail.com>", | ||
"fstream": "^1.0.12", | ||
"graceful-fs": "^4.2.2", | ||
"listenercount": "~1.0.1", | ||
@@ -34,0 +35,0 @@ "readable-stream": "~2.3.6", |
12
test.js
@@ -1,6 +0,10 @@ | ||
const fs = require('fs') | ||
const unzipper = require('./unzip'); | ||
fs.createReadStream('./testData/compressed-standard/archive.zip') | ||
.pipe(unzipper.Extract({path:'public/icons'})) | ||
.on('finish',() => console.log('finish')) | ||
async function main() { | ||
const zip = await unzipper.Open.file('./scorm-file-test.zip'); | ||
await zip.extract({path:'/home/zjonsson/git/node-unzipper/tmp'}); | ||
console.log('done'); | ||
} | ||
main().then(console.log,console.log) |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
51129
998
2
10
+ Addedgraceful-fs@^4.2.2