Comparing version 3.1.8 to 3.1.9
@@ -59,2 +59,3 @@ 'use strict' | ||
const ABORTED = Symbol('aborted') | ||
const DONE = Symbol('onDone') | ||
@@ -65,6 +66,10 @@ const noop = _ => true | ||
constructor (opt) { | ||
const start = process.hrtime() | ||
opt = opt || {} | ||
super(opt) | ||
if (opt.ondone) | ||
this.on(DONE, opt.ondone) | ||
else | ||
this.on(DONE, _ => (this.emit('end'), this.emit('close'))) | ||
this.strict = !!opt.strict | ||
@@ -74,2 +79,5 @@ this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize | ||
// have to set this so that streams are ok piping into it | ||
this.writable = true | ||
this[QUEUE] = new Yallist() | ||
@@ -327,3 +335,3 @@ this[BUFFER] = null | ||
} | ||
this[EMIT]('end') | ||
this[EMIT](DONE) | ||
} | ||
@@ -330,0 +338,0 @@ } |
@@ -35,13 +35,15 @@ 'use strict' | ||
constructor (opt) { | ||
super(opt) | ||
if (!opt) | ||
opt = {} | ||
this[PENDING] = 0 | ||
this[ENDED] = false | ||
this.on('end', _ => { | ||
opt.ondone = _ => { | ||
this[ENDED] = true | ||
this[MAYBECLOSE]() | ||
}) | ||
} | ||
super(opt) | ||
this[PENDING] = 0 | ||
this[ENDED] = false | ||
this.dirCache = opt.dirCache || new Map() | ||
@@ -48,0 +50,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "tar for node", | ||
"version": "3.1.8", | ||
"version": "3.1.9", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
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
116843
2648