Skip to content
This repository was archived by the owner on Dec 16, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 2.1.0 March 2, 2015

Add support for Node.js 0.12 and io.js 1.4

Fix failing image tests on Node.js 0.12 and io.js 1.4

Fix failing signature check on Node.js 0.12 and io.js 1.4

Remove unused async dependency


## 2.0.1 November 14, 2012

Fix addImage not working with buffers.
Expand Down
25 changes: 10 additions & 15 deletions lib/pass.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,15 @@ Pass.prototype.pipe = function(output) {
self.emit("error", lastError);
} else {
process.nextTick(function() {
self.signZip(zip, manifest, function(error) {
zip.close();
zip.on("end", function() {
self.emit("end");
});
zip.on("error", function(error) {
self.emit("error", error);
});
});
self.signZip(zip, manifest, function(error) {
zip.close();
zip.on("end", function() {
self.emit("end");
});
zip.on("error", function(error) {
self.emit("error", error);
});
});
});
}
}
Expand Down Expand Up @@ -354,7 +354,7 @@ function signManifest(template, manifest, callback) {
var sign = execFile("openssl", args, { stdio: "pipe" }, function(error, stdout, stderr) {
var trimmedStderr = stderr.trim();
// Windows outputs some unhelpful error messages, but still produces a valid signature
if (error || trimmedStderr != null && trimmedStderr != "Loading 'screen' into random state - done" && trimmedStderr != "Loading 'screen' into random state - done\r\nunable to write 'random state'") {
if (error || (trimmedStderr && trimmedStderr.indexOf('- done') < 0)) {
callback(new Error(stderr));
} else {
var signature = stdout.split(/\n\n/)[3];
Expand Down Expand Up @@ -393,11 +393,6 @@ function SHAWriteStream(manifest, filename, output) {
this.sha = Crypto.createHash("sha1");
output.on("close", this.emit.bind(this, "close"));
output.on("error", this.emit.bind(this, "error"));
var self = this;
this.on("pipe", function(source) {
source.on("data", self.write.bind(self));
source.resume();
});
}

inherits(SHAWriteStream, Stream);
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ "name": "passbook",
"description": "iOS Passbook for the Node hacker",
"homepage": "https://github.com/assaf/node-passbook",
"version": "2.0.3",
"version": "2.1.0",
"author": {
"name": "Assaf Arkin",
"email": "assaf@labnotes.org"
Expand All @@ -11,11 +11,10 @@
"node-passbook": "./bin/node-passbook"
},
"dependencies": {
"async": "0.2.9",
"cli": "0.4.5"
"cli": "0.6.5"
},
"devDependencies": {
"mocha": "1.12.0"
"mocha": "2.1.0"
},
"scripts": {
"test": "mocha"
Expand Down