Skip to content

Commit

Permalink
update tar to 4.4.8 (#211)
Browse files Browse the repository at this point in the history
* update tar to 4.4.8

* updated tests with new tar syntax

* resume entry events
  • Loading branch information
phrred authored and vladikoff committed Apr 20, 2019
1 parent b8ed0cc commit fd055e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"grunt-contrib-internal": "^1.1.0",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-nodeunit": "^1.0.0",
"tar": "^2.2.1",
"tar": "^4.4.8",
"unzip": "^0.1.5"
},
"keywords": [
Expand Down
6 changes: 4 additions & 2 deletions test/compress_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ exports.compress = {
'test.css', 'test.js'
];
var actual = [];
var parse = tar.Parse();
var parse = new tar.Parse();
fs.createReadStream(path.join('tmp', 'compress_test_files.tar')).pipe(parse);
parse.on('entry', function (entry) {
actual.push(entry.path);
entry.resume();
});
parse.on('end', function () {
actual.sort();
Expand All @@ -77,12 +78,13 @@ exports.compress = {
'test.css', 'test.js'
];
var actual = [];
var parse = tar.Parse();
var parse = new tar.Parse();
fs.createReadStream(path.join('tmp', 'compress_test_files.tgz'))
.pipe(zlib.createGunzip())
.pipe(parse);
parse.on('entry', function (entry) {
actual.push(entry.path);
entry.resume();
});
parse.on('end', function () {
actual.sort();
Expand Down

0 comments on commit fd055e9

Please sign in to comment.