Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unbzip2-stream

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unbzip2-stream - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

test/fixtures/truncated.bz2

12

index.js

@@ -56,10 +56,6 @@ var through = require('through');

} catch(e) {
if (e instanceof bz2.Bzip2Error) {
//console.error(e);
stream.emit('error', e);
broken = true;
return false;
} else {
throw e;
}
//console.error(e);
stream.emit('error', e);
broken = true;
return false;
}

@@ -66,0 +62,0 @@ }

{
"name": "unbzip2-stream",
"version": "1.0.8",
"version": "1.0.9",
"description": "streaming unbzip2 implementatio in pure javascript for node and browsers",

@@ -5,0 +5,0 @@ "keywords": [

@@ -36,1 +36,20 @@ var unbzip2Stream = require('../');

});
test('should emit error when stream is broken in a different way?', function(t) {
t.plan(1);
// this is the smallest truncated file I found that reproduced the bug, but
// longer files will also work.
var truncated = 'test/fixtures/truncated.bz2';
fs.createReadStream(truncated).
on('error', function (err) {
t.ok(false, "The file stream itself should not be failing.");
}).
pipe(unbzip2Stream()).
on('error', function (err) {
t.ok(true, err);
}).
on('close', function (err) {
t.ok(false, "Should not reach end of stream without failing.");
});
});

Sorry, the diff of this file is not supported yet

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