From ce46d63c472d20b841dbf130af433abfa3150528 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Fri, 9 Sep 2016 20:58:34 +0200 Subject: [PATCH] fix issue with v6.0.0 I have some `Error: Missing/invalid DB name` error thrown when using the latest release of pouchdb. This PR should fix this issue. For reference: https://github.com/pouchdb/pouchdb/pull/5435. --- lib/index.js | 2 +- package.json | 8 ++++---- test/test.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/index.js b/lib/index.js index 56ddb90..2ed52e7 100644 --- a/lib/index.js +++ b/lib/index.js @@ -34,7 +34,7 @@ exports.plugin.dump = utils.toPromise(function (writableStream, opts, callback) var PouchDB = self.constructor; - var output = new PouchDB(self._db_name, { + var output = new PouchDB(self.name, { adapter: 'writableStream' }); output.setupStream(writableStream); diff --git a/package.json b/package.json index a9e27bd..d7ba374 100644 --- a/package.json +++ b/package.json @@ -35,11 +35,11 @@ }, "dependencies": { "argsarray": "0.0.1", - "inherits": "~2.0.1", - "ndjson": "^1.4.3", + "inherits": "^2.0.3", "lodash.pick": "^4.0.0", - "pouchdb-promise": "^5.4.4", + "ndjson": "^1.4.3", "pouch-stream": "^0.4.0", + "pouchdb-promise": "^6.0.4", "through2": "^2.0.0" }, "devDependencies": { @@ -59,7 +59,7 @@ "mocha": "~1.18", "noms": "0.0.0", "phantomjs": "^1.9.7-5", - "pouchdb-memory": "^1.0.0", + "pouchdb-memory": "^6.0.0", "random-document-stream": "0.0.0", "request": "^2.36.0", "sauce-connect-launcher": "^0.4.2", diff --git a/test/test.js b/test/test.js index 7255c6c..897c31a 100644 --- a/test/test.js +++ b/test/test.js @@ -56,9 +56,9 @@ function tests(dbName, dbType) { next(null, null); }); db = new Pouch(dbName); - return db.then(function () { + return db.info().then(function () { remote = new Pouch(dbName + '_remote'); - return remote.then(function () {}); + return remote.info().then(function () {}); }); });