Socket
Socket
Sign inDemoInstall

unzipper

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unzipper - npm Package Compare versions

Comparing version 0.10.7 to 0.10.8

31

lib/parse.js

@@ -181,10 +181,13 @@ var util = require('util');

self.stream(eof)
.pipe(inflater)
.on('error',function(err) { self.emit('error',err);})
.pipe(entry)
.on('finish', function() {
return fileSizeKnown ? self._readRecord() : self._processDataDescriptor(entry);
});
return null; // This prevents bluebird from throwing "promise created but not returned" warnings
return new Promise(function(resolve, reject) {
self.stream(eof)
.pipe(inflater)
.on('error',function(err) { self.emit('error',err);})
.pipe(entry)
.on('finish', function() {
return fileSizeKnown ?
self._readRecord().then(resolve).catch(reject) :
self._processDataDescriptor(entry).then(resolve).catch(reject);
});
});
});

@@ -197,3 +200,3 @@ });

var self = this;
self.pull(16).then(function(data) {
return self.pull(16).then(function(data) {
var vars = binary.parse(data)

@@ -207,3 +210,3 @@ .word32lu('dataDescriptorSignature')

entry.size = vars.uncompressedSize;
self._readRecord();
return self._readRecord();
});

@@ -214,3 +217,3 @@ };

var self = this;
self.pull(42).then(function(data) {
return self.pull(42).then(function(data) {

@@ -251,3 +254,3 @@ var vars = binary.parse(data)

var self = this;
self.pull(18).then(function(data) {
return self.pull(18).then(function(data) {

@@ -264,3 +267,3 @@ var vars = binary.parse(data)

self.pull(vars.commentLength).then(function(comment) {
return self.pull(vars.commentLength).then(function(comment) {
comment = comment.toString('utf8');

@@ -282,2 +285,2 @@ self.end();

module.exports = Parse;
module.exports = Parse;
{
"name": "unzipper",
"version": "0.10.7",
"version": "0.10.8",
"description": "Unzip cross-platform streaming API ",

@@ -5,0 +5,0 @@ "author": "Evan Oxfeld <eoxfeld@gmail.com>",

@@ -125,3 +125,3 @@ [![NPM Version][npm-image]][npm-url]

`unzipper.parseOne([regex])` is a convenience method that unzips only one file from the archive and pipes the contents down (not the entry itself). If no serch criteria is specified, the first file in the archive will be unzipped. Otherwise, each filename will be compared to the criteria and the first one to match will be unzipped and piped down. If no file matches then the the stream will end without any content.
`unzipper.parseOne([regex])` is a convenience method that unzips only one file from the archive and pipes the contents down (not the entry itself). If no search criteria is specified, the first file in the archive will be unzipped. Otherwise, each filename will be compared to the criteria and the first one to match will be unzipped and piped down. If no file matches then the the stream will end without any content.

@@ -128,0 +128,0 @@ Example:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc