From ba5db7987f68103d1a006d4dccfef7e6619931dd Mon Sep 17 00:00:00 2001 From: luizerasmo Date: Tue, 18 Sep 2018 10:35:07 -0300 Subject: [PATCH 1/4] Update project name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 65afd96..3e3ae1d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "extract-zip", + "name": "@vtex/extract-zip", "version": "1.6.7", "description": "unzip a zip file into a directory using 100% javascript", "main": "index.js", From 96b254000357c476dbe4d822a5b9f8db80bd4e59 Mon Sep 17 00:00:00 2001 From: luizerasmo Date: Tue, 18 Sep 2018 10:39:26 -0300 Subject: [PATCH 2/4] Add error handling on unzipping --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.js b/index.js index 8c193e4..8151143 100644 --- a/index.js +++ b/index.js @@ -32,6 +32,13 @@ module.exports = function (zipPath, opts, cb) { var cancelled = false + zipfile.on('error', function (err) { + if (err) { + cancelled = true + return cb(err) + } + }) + zipfile.readEntry() zipfile.on('close', function () { From 6c06fd85cca319f9ef84a3e0ce527338e57411dd Mon Sep 17 00:00:00 2001 From: luizerasmo Date: Tue, 18 Sep 2018 10:43:33 -0300 Subject: [PATCH 3/4] Update README with fork motivation --- readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/readme.md b/readme.md index af17885..a0ec4ff 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,7 @@ +# Fork motivation + +We forked this project in order to solve an error handling issue that was pending for several months in the original project. See [this PR in `builder-hub`](https://github.com/vtex/builder-hub/pull/216) for context. + # extract-zip Unzip written in pure JavaScript. Extracts a zip into a directory. Available as a library or a command line program. From fe9cf68e5b183883bf52bfca2cf2995978745691 Mon Sep 17 00:00:00 2001 From: luizerasmo Date: Tue, 18 Sep 2018 14:46:32 -0300 Subject: [PATCH 4/4] Release v1.7.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e3ae1d..81253c4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vtex/extract-zip", - "version": "1.6.7", + "version": "1.7.0", "description": "unzip a zip file into a directory using 100% javascript", "main": "index.js", "bin": {