From fd055e9ce474d977e7e95d64dd23d9ee5c7b85be Mon Sep 17 00:00:00 2001 From: Fred Hong Date: Sat, 20 Apr 2019 19:18:44 -0400 Subject: [PATCH] update tar to 4.4.8 (#211) * update tar to 4.4.8 * updated tests with new tar syntax * resume entry events --- package.json | 2 +- test/compress_test.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f782640..1dbe0fd 100644 --- a/package.json +++ b/package.json @@ -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": [ diff --git a/test/compress_test.js b/test/compress_test.js index 0eb8e4f..b6fdcc0 100644 --- a/test/compress_test.js +++ b/test/compress_test.js @@ -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(); @@ -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();