compressing
Advanced tools
Comparing version 1.2.3 to 1.2.4
1.2.4 / 2018-07-13 | ||
================== | ||
* chore: replace multipipe with pump (#9) | ||
1.2.3 / 2017-07-27 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -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 @@ |
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
40652
744
+ Addedpump@^3.0.0
+ Addedpump@3.0.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
- Removedmultipipe@^1.0.2
- Removedduplexer2@0.1.4(transitive)
- Removedmultipipe@1.0.2(transitive)
- Removedobject-assign@4.1.1(transitive)