Comparing version 0.1.0 to 0.1.2
@@ -117,2 +117,5 @@ module.exports = EntryWriter | ||
}) | ||
.on("error", function (er) { | ||
me.emit("error", er) | ||
}) | ||
.end() | ||
@@ -119,0 +122,0 @@ } |
@@ -151,2 +151,4 @@ | ||
// console.error("1 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) | ||
// if adding that many digits will make it go over that length, | ||
@@ -160,8 +162,20 @@ // then add one to it. For example, if the string is: | ||
// character to the length, and the length includes the number | ||
// itself. In that case, just bump it up by 1. | ||
if (s.length > Math.pow(10, digits) - digits) digits ++ | ||
// itself. In that case, just bump it up again. | ||
if (s.length + digits >= Math.pow(10, digits)) digits += 1 | ||
// console.error("2 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) | ||
var len = digits + s.length | ||
// console.error("3 s=%j digits=%j s.length=%d len=%d", s.toString(), digits, s.length, len) | ||
var lenBuf = new Buffer("" + len) | ||
if (lenBuf.length + s.length !== len) { | ||
throw new Error("Bad length calculation\n"+ | ||
"len="+len+"\n"+ | ||
"lenBuf="+JSON.stringify(lenBuf.toString())+"\n"+ | ||
"lenBuf.length="+lenBuf.length+"\n"+ | ||
"digits="+digits+"\n"+ | ||
"s="+JSON.stringify(s.toString())+"\n"+ | ||
"s.length="+s.length) | ||
} | ||
return [new Buffer("" + len), s] | ||
return [lenBuf, s] | ||
} |
@@ -5,3 +5,3 @@ { | ||
"description": "tar for node", | ||
"version": "0.1.0", | ||
"version": "0.1.2", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
330088
4144
1