Skip to content

Commit

Permalink
Update utils.Promise for Pouchdb 6+
Browse files Browse the repository at this point in the history
Fixes #7
  • Loading branch information
nolanlawson committed Nov 22, 2017
1 parent 3546f7d commit ed7df1c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -33,9 +33,9 @@
"report-coverage": "npm test --coverage && istanbul check-coverage && istanbul-coveralls --no-rm"
},
"dependencies": {
"lie": "^2.6.0",
"inherits": "~2.0.1",
"argsarray": "0.0.1"
"argsarray": "0.0.1",
"inherits": "^2.0.3",
"native-or-lie": "^1.0.2"
},
"devDependencies": {
"bluebird": "^1.0.7",
Expand All @@ -52,7 +52,7 @@
"mkdirp": "^0.5.1",
"mocha": "~1.18",
"phantomjs": "^1.9.7-5",
"pouchdb": "^4.0.0",
"pouchdb": "^6.3.4",
"request": "^2.36.0",
"sauce-connect-launcher": "^0.4.2",
"selenium-standalone": "3.0.2",
Expand Down
8 changes: 1 addition & 7 deletions pouch-utils.js
@@ -1,12 +1,6 @@
'use strict';

var Promise;
/* istanbul ignore next */
if (typeof window !== 'undefined' && window.PouchDB) {
Promise = window.PouchDB.utils.Promise;
} else {
Promise = typeof global.Promise === 'function' ? global.Promise : require('lie');
}
var Promise = require('native-or-lie');
/* istanbul ignore next */
exports.once = function (fun) {
var called = false;
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Expand Up @@ -500,7 +500,7 @@ function tests(dbName, dbType) {
});
}

return PouchDB.utils.Promise.all(tasks.map(function (task) {
return Promise.all(tasks.map(function (task) {
return cache(task.key, task.value);
}));
});
Expand Down

0 comments on commit ed7df1c

Please sign in to comment.