You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2018/02/27 13:18:21 UTC

[couchdb-nano] branch travis-update created (now dfc3a25)

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

garren pushed a change to branch travis-update
in repository https://gitbox.apache.org/repos/asf/couchdb-nano.git.


      at dfc3a25  remove underscore and use lodash.isEmptry instead

This branch includes the following new commits:

     new 7b8f837  update travis.yml file
     new dfc3a25  remove underscore and use lodash.isEmptry instead

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
garren@apache.org.

[couchdb-nano] 02/02: remove underscore and use lodash.isEmptry instead

Posted by ga...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit dfc3a259c646c767b84301b179cebe78b98b1d88
Author: Garren Smith <ga...@gmail.com>
AuthorDate: Tue Feb 27 15:18:07 2018 +0200

    remove underscore and use lodash.isEmptry instead
---
 lib/nano.js  | 14 +++++++-------
 package.json |  6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/nano.js b/lib/nano.js
index 69fed84..02c04e1 100644
--- a/lib/nano.js
+++ b/lib/nano.js
@@ -17,7 +17,7 @@ var assert = require('assert');
 var querystring = require('querystring');
 var request = require('request');
 var errs = require('errs');
-var _ = require('underscore');
+var isEmpty = require('lodash.isempty');
 var follow = require('cloudant-follow');
 var logger = require('./logger');
 
@@ -35,7 +35,7 @@ module.exports = exports = nano = function dbScope(cfg) {
     'You must specify the endpoint url when invoking this module');
   assert.ok(/^https?:/.test(cfg.url), 'url is not valid');
 
-  cfg = _.clone(cfg);
+  cfg = Object.assign({}, cfg);
 
   serverScope.config = cfg;
   cfg.requestDefaults = cfg.requestDefaults || {jar: false};
@@ -84,7 +84,7 @@ module.exports = exports = nano = function dbScope(cfg) {
       callback = null;
     }
 
-    var qs = _.extend({}, opts.qs);
+    var qs = Object.assign({}, opts.qs);
 
     var headers = {
       'content-type': 'application/json',
@@ -116,7 +116,7 @@ module.exports = exports = nano = function dbScope(cfg) {
       req.multipart = opts.multipart;
     }
 
-    req.headers = _.extend(req.headers, opts.headers, cfg.defaultHeaders);
+    req.headers = Object.assign(req.headers, opts.headers, cfg.defaultHeaders);
 
     if (opts.path) {
       req.uri += '/' + opts.path;
@@ -154,7 +154,7 @@ module.exports = exports = nano = function dbScope(cfg) {
     }
 
     // http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options
-    if (typeof opts.qs === 'object' && !_.isEmpty(opts.qs)) {
+    if (typeof opts.qs === 'object' && !isEmpty(opts.qs)) {
       ['startkey', 'endkey', 'key', 'keys'].forEach(function(key) {
         if (key in opts.qs) {
           qs[key] = JSON.stringify(opts.qs[key]);
@@ -660,7 +660,7 @@ module.exports = exports = nano = function dbScope(cfg) {
       var docName = qs.docName;
       delete qs.docName;
 
-      doc = _.extend({_attachments: {}}, doc);
+      doc = Object.assign({_attachments: {}}, doc);
 
       var multipart = [];
 
@@ -839,7 +839,7 @@ module.exports = exports = nano = function dbScope(cfg) {
   }
 
   // server level exports
-  serverScope = _.extend(serverScope, {
+  serverScope = Object.assign(serverScope, {
     db: {
       create: createDb,
       get: getDb,
diff --git a/package.json b/package.json
index 0f40ef9..b09b6cc 100644
--- a/package.json
+++ b/package.json
@@ -17,11 +17,11 @@
     "database"
   ],
   "dependencies": {
-    "request": "~2.83.0",
     "cloudant-follow": "~0.16.1",
+    "debug": "^2.2.0",
     "errs": "^0.3.2",
-    "underscore": "^1.8.3",
-    "debug": "^2.2.0"
+    "lodash.isempty": "^4.4.0",
+    "request": "~2.83.0"
   },
   "devDependencies": {
     "async": "^2.1.2",

-- 
To stop receiving notification emails like this one, please contact
garren@apache.org.

[couchdb-nano] 01/02: update travis.yml file

Posted by ga...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7b8f837ed658efd8135396ad64397fc3ce4b522b
Author: Garren Smith <ga...@gmail.com>
AuthorDate: Tue Feb 27 15:17:23 2018 +0200

    update travis.yml file
---
 .travis.yml | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 3d8b7f4..60083b4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,9 @@
 language: "node_js"
 env: DEBUG=*
-branches:
-  only:
-    - master
-    - next
-    - rewrite
 node_js:
   - "node"
-  - "4"
   - "6"
-  - "7"
+  - "8"
 
 services:
   - docker

-- 
To stop receiving notification emails like this one, please contact
garren@apache.org.