Socket
Socket
Sign inDemoInstall

compressing

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compressing - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

5

History.md
1.2.4 / 2018-07-13
==================
* chore: replace multipipe with pump (#9)
1.2.3 / 2017-07-27

@@ -3,0 +8,0 @@ ==================

6

lib/tgz/file_stream.js

@@ -7,3 +7,3 @@ 'use strict';

const stream = require('stream');
const pipe = require('multipipe');
const pump = require('pump');
const ready = require('get-ready');

@@ -28,3 +28,5 @@

pipe(tarStream, gzipStream).on('error', err => this.emit('error', err));
pump(tarStream, gzipStream, err => {
err && this.emit('error', err);
});

@@ -31,0 +33,0 @@ if (sourceType !== 'stream' && sourceType !== undefined) {

@@ -6,3 +6,3 @@ 'use strict';

const mkdirp = require('mkdirp');
const pipe = require('multipipe');
const pump = require('pump');

@@ -115,7 +115,8 @@ // file/fileBuffer/stream

entryCount++;
stream.pipe(fs.createWriteStream(fullpath, { mode: header.mode }))
.on('finish', () => {
successCount++;
done();
});
pump(stream, fs.createWriteStream(fullpath, { mode: header.mode }), err => {
if (err) return reject(err);
successCount++;
done();
});
});

@@ -149,3 +150,3 @@ } else { // directory

return new Promise((resolve, reject) => {
pipe(streams[0], streams[1], err => {
pump(streams[0], streams[1], err => {
if (err) return reject(err);

@@ -152,0 +153,0 @@ resolve();

{
"name": "compressing",
"version": "1.2.3",
"version": "1.2.4",
"description": "Everything you need for compressing and uncompressing",

@@ -40,3 +40,3 @@ "main": "index.js",

"mkdirp": "^0.5.1",
"multipipe": "^1.0.2",
"pump": "^3.0.0",
"streamifier": "^0.1.1",

@@ -43,0 +43,0 @@ "tar-stream": "^1.5.2",

@@ -83,8 +83,8 @@ # compressing

// You should take care of stream errors in caution, use multipipe to handle error in one place
const pipe = require('multipipe';)
// You should take care of stream errors in caution, use pump to handle error in one place
const pump = require('pump';)
const sourceStream = fs.createReadStream('file/path/to/compress')
const gzipStream = new compressing.gzip.FileStream();
const destStream = fs.createWriteStream('path/to/destination.gz');
pipe(sourceStream, gzipStream, destStream, handleError);
pump(sourceStream, gzipStream, destStream, handleError);
```

@@ -121,7 +121,7 @@

// You should take care of stream errors in caution, use multipipe to handle error in one place
// You should take care of stream errors in caution, use pump to handle error in one place
const tarStream = new compressing.tar.Stream();
tarStream.addEntry('dir/path/to/compress');
const destStream = fs.createWriteStream('path/to/destination.tar');
pipe(tarStream, destStream, handleError);
pump(tarStream, destStream, handleError);
```

@@ -128,0 +128,0 @@

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