Comparing version 4.0.2 to 4.0.3
@@ -112,3 +112,3 @@ 'use strict'; | ||
const inc = (name) => { | ||
const filename = name.replace(`${this._from}`, ''); | ||
const filename = name.replace(String(this._from), ''); | ||
this._names.push(filename); | ||
@@ -248,3 +248,3 @@ ++this._n; | ||
zipfile.readEntry(); | ||
zipfile.on('entry', (entry) => { | ||
zipfile.on('entry', async (entry) => { | ||
const {fileName} = entry; | ||
@@ -262,4 +262,6 @@ const fn = (error) => { | ||
if (/\/$/.test(fileName)) | ||
return mkdirp(name, fn); | ||
if (/\/$/.test(fileName)) { | ||
const [e] = await tryToCatch(mkdirp, name); | ||
return fn(e); | ||
} | ||
@@ -280,3 +282,2 @@ zipfile.openReadStream(entry, this._onOpenReadStream(async (readStream) => { | ||
const writeStream = fs.createWriteStream(fileName); | ||
await pipe([readStream, writeStream]); | ||
@@ -283,0 +284,0 @@ }; |
{ | ||
"name": "onezip", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "pack and extract .zip archives with emitter", | ||
@@ -22,6 +22,6 @@ "main": "lib/onezip.js", | ||
"glob": "^7.0.0", | ||
"mkdirp": "^0.5.1", | ||
"mkdirp": "^1.0.3", | ||
"pipe-io": "^4.0.0", | ||
"try-to-catch": "^2.0.0", | ||
"yargs-parser": "^16.0.0", | ||
"yargs-parser": "^17.0.0", | ||
"yauzl": "^2.6.0", | ||
@@ -33,10 +33,9 @@ "yazl": "^2.4.1" | ||
"eslint": "^6.4.0", | ||
"eslint-plugin-node": "^10.0.0", | ||
"eslint-plugin-putout": "^2.0.0", | ||
"madrun": "^3.0.3", | ||
"eslint-plugin-node": "^11.0.0", | ||
"eslint-plugin-putout": "^3.0.0", | ||
"madrun": "^5.0.1", | ||
"mock-require": "^3.0.2", | ||
"nodemon": "^1.11.0", | ||
"nyc": "^14.1.1", | ||
"putout": "^6.0.0", | ||
"redrun": "^7.0.0", | ||
"nodemon": "^2.0.2", | ||
"nyc": "^15.0.0", | ||
"putout": "^7.3.1", | ||
"rimraf": "^3.0.0", | ||
@@ -43,0 +42,0 @@ "supertape": "^1.2.3" |
Sorry, the diff of this file is not supported yet
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
18591
11
332
+ Addedmkdirp@1.0.4(transitive)
+ Addedyargs-parser@17.1.0(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedyargs-parser@16.1.0(transitive)
Updatedmkdirp@^1.0.3
Updatedyargs-parser@^17.0.0