decompress-tarbz2
Advanced tools
Comparing version 0.1.0 to 1.0.0
37
index.js
@@ -31,27 +31,30 @@ 'use strict'; | ||
.on('error', function (err) { | ||
return cb(err); | ||
cb(err); | ||
return; | ||
}) | ||
.on('entry', function (file) { | ||
var chunk = ''; | ||
if (file.type !== 'Directory') { | ||
var chunk = ''; | ||
file.on('data', function (data) { | ||
chunk += data.toString(); | ||
}); | ||
file.on('data', function (data) { | ||
chunk += data.toString(); | ||
}); | ||
file.on('end', function () { | ||
chunk = new Buffer(chunk, 'utf8'); | ||
file.on('end', function () { | ||
chunk = new Buffer(chunk, 'utf8'); | ||
if (opts.strip) { | ||
var f = path.basename(file.path); | ||
var p = path.dirname(file.path.split('/')); | ||
if (opts.strip) { | ||
var f = path.basename(file.path); | ||
var p = path.dirname(file.path.split('/')); | ||
if (Array.isArray(p)) { | ||
p = p.slice(opts.strip).join(path.sep); | ||
if (Array.isArray(p)) { | ||
p = p.slice(opts.strip).join(path.sep); | ||
} | ||
file.path = path.join(p, f); | ||
} | ||
file.path = path.join(p, f); | ||
} | ||
files.push({ contents: chunk, path: file.path }); | ||
}); | ||
files.push({ contents: chunk, path: file.path }); | ||
}); | ||
} | ||
}) | ||
@@ -58,0 +61,0 @@ .on('end', function () { |
{ | ||
"name": "decompress-tarbz2", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "decompress tar.bz2 plugin", | ||
@@ -31,12 +31,12 @@ "license": "MIT", | ||
"dependencies": { | ||
"archive-type": "^0.1.2", | ||
"archive-type": "^0.1.4", | ||
"rimraf": "^2.2.8", | ||
"seek-bzip": "^1.0.3", | ||
"simple-bufferstream": "0.0.4", | ||
"tar": "^0.1.19" | ||
"tar": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"decompress": "^0.3.0", | ||
"decompress": "^1.0.0", | ||
"mocha": "^1.18.2" | ||
} | ||
} |
@@ -7,3 +7,3 @@ # decompress-tarbz2 [![Build Status](https://travis-ci.org/kevva/decompress-tarbz2.svg?branch=master)](https://travis-ci.org/kevva/decompress-tarbz2) | ||
```bash | ||
```sh | ||
$ npm install --save decompress-tarbz2 | ||
@@ -10,0 +10,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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3212
52
1
+ Addedfstream@1.0.12(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedtar@1.0.3(transitive)
- Removedfstream@0.1.31(transitive)
- Removedgraceful-fs@3.0.12(transitive)
- Removednatives@1.1.6(transitive)
- Removedtar@0.1.20(transitive)
Updatedarchive-type@^0.1.4
Updatedtar@^1.0.0