This is an automated email from the ASF dual-hosted git repository.

glynnbird pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-nano.git


The following commit(s) were added to refs/heads/master by this push:
     new 2baa086  Pass request agent to cloudant-follow (#128)
2baa086 is described below

commit 2baa0863bd9f974ecf1455c125fb29d974594149
Author: Sam Smith <[email protected]>
AuthorDate: Wed Nov 14 07:10:25 2018 +0000

    Pass request agent to cloudant-follow (#128)
    
    * Pass request agent to cloudant-follow
    
    * Use cloudant-follow 0.18.0
---
 lib/nano.js           |  1 +
 package-lock.json     | 23 ++++++++++++++---------
 package.json          |  2 +-
 tests/helpers/unit.js |  5 +++++
 4 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/lib/nano.js b/lib/nano.js
index 2fa4408..3911d81 100644
--- a/lib/nano.js
+++ b/lib/nano.js
@@ -376,6 +376,7 @@ module.exports = exports = function dbScope (cfg) {
   function followDb (dbName, qs0, callback0) {
     const {opts, callback} = getCallback(qs0, callback0)
     opts.db = urlResolveFix(cfg.url, encodeURIComponent(dbName))
+    opts.httpAgent = httpAgent;
     if (typeof callback === 'function') {
       return followAgent(opts, callback)
     } else {
diff --git a/package-lock.json b/package-lock.json
index 2a2788b..fe86077 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -429,22 +429,27 @@
       }
     },
     "cloudant-follow": {
-      "version": "0.17.0",
-      "resolved": 
"https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.17.0.tgz";,
-      "integrity": 
"sha512-JQ1xvKAHh8rsnSVBjATLCjz/vQw1sWBGadxr2H69yFMwD7hShUGDwwEefdypaxroUJ/w6t1cSwilp/hRUxEW8w==",
+      "version": "0.18.0",
+      "resolved": 
"https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.0.tgz";,
+      "integrity": 
"sha512-jsplCsI0EpJvTrlgeuuYFrmrKGxm8TlSkyKzOLZa6fc6p+FNT8UDPAwYeh0yaT8IdI+sxT5DTdCD2G45HWpSaw==",
       "requires": {
         "browser-request": "~0.3.0",
-        "debug": "^3.0.0",
-        "request": "^2.83.0"
+        "debug": "^4.0.1",
+        "request": "^2.88.0"
       },
       "dependencies": {
         "debug": {
-          "version": "3.1.0",
-          "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz";,
-          "integrity": 
"sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz";,
+          "integrity": 
"sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==",
           "requires": {
-            "ms": "2.0.0"
+            "ms": "^2.1.1"
           }
+        },
+        "ms": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz";,
+          "integrity": 
"sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
         }
       }
     },
diff --git a/package.json b/package.json
index 253cf57..bb7fe86 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
   ],
   "dependencies": {
     "@types/request": "^2.47.1",
-    "cloudant-follow": "~0.17.0",
+    "cloudant-follow": "^0.18.0",
     "debug": "^2.2.0",
     "errs": "^0.3.2",
     "lodash.isempty": "^4.4.0",
diff --git a/tests/helpers/unit.js b/tests/helpers/unit.js
index 57441fe..4016c6f 100644
--- a/tests/helpers/unit.js
+++ b/tests/helpers/unit.js
@@ -89,6 +89,11 @@ helpers.unit = function (method, error) {
             stub.db = helpers.couch + stub.db
           }
 
+             if (method[1] === 'follow' || method[1] === 'followUpdates') {
+            assert.ok(typeof req.httpAgent, 'object');
+            delete req.httpAgent; // ignore 'httpAgent' in deep equal assert
+          }
+
           assert.deepEqual(req, stub)
           assert.end()
         })

Reply via email to