From 79e368d783d7d7e2e32026782ec4e938f5c24585 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 24 Apr 2018 11:38:45 -0600 Subject: [PATCH] v1.0.4 backcompat with node v6 --- node.js | 4 ++-- package.json | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/node.js b/node.js index c64d8df..e3f0ecf 100644 --- a/node.js +++ b/node.js @@ -165,7 +165,7 @@ ACME._registerAccount = function (me, options) { if (me.debug) console.debug('[DEBUG] new account location:'); if (me.debug) console.debug(location); if (me.debug) console.debug(resp.toJSON()); - + /* { id: 5925245, @@ -601,7 +601,7 @@ ACME.create = function create(me) { }); }); }; - me.promisify = me.promisify || require('util').promisify; + me.promisify = me.promisify || require('util').promisify /*node v8+*/ || require('bluebird').promisify /*node v6*/; if ('function' !== typeof me.getUserAgentString) { diff --git a/package.json b/package.json index 5393f34..b906549 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "acme-v2", - "version": "1.0.3", + "version": "1.0.4", "description": "Free SSL. A framework for building Let's Encrypt v2 clients, and other ACME v2 (draft 11) clients. Successor to le-acme-core.js", "homepage": "https://git.coolaj86.com/coolaj86/acme-v2.js", "main": "node.js", @@ -41,5 +41,8 @@ "dependencies": { "request": "^2.85.0", "rsa-compat": "^1.3.0" + }, + "optionalDependencies": { + "bluebird": "^3.5.1" } }