Skip to content

Commit

Permalink
(#3839) - Use lie as promise polyfill everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
daleharvey committed Jun 7, 2015
1 parent ddb4d10 commit 685297d
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 18 deletions.
4 changes: 2 additions & 2 deletions lib/deps/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
if (typeof Promise === 'function') {
module.exports = Promise;
} else {
module.exports = require('bluebird');
}
module.exports = require('lie');
}
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
],
"dependencies": {
"argsarray": "0.0.1",
"bluebird": "^1.2.4",
"debug": "^2.1.2",
"double-ended-queue": "^2.0.0-0",
"es3ify": "^0.1.3",
Expand Down Expand Up @@ -113,7 +112,6 @@
"./lib/adapters/preferredAdapters.js": "./lib/adapters/preferredAdapters-browser.js",
"./lib/deps/buffer.js": "./lib/deps/buffer-browser.js",
"./lib/deps/migrate.js": "./lib/deps/migrate-browser.js",
"bluebird": "lie",
"fs": false,
"leveldown": false
}
Expand Down
3 changes: 0 additions & 3 deletions tests/component/test.headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
var http = require('http');
var PouchDB = require('../../lib');
var should = require("chai").should();
require('bluebird').onPossiblyUnhandledRejection(function (e, promise) {
throw e;
});

describe('test.headers.js', function () {

Expand Down
3 changes: 0 additions & 3 deletions tests/integration/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,6 @@ if (typeof module !== 'undefined' && module.exports) {
testDir = testDir.slice(-1) === '/' ? testDir : testDir + '/';
global.PouchDB.prefix = testDir + global.PouchDB.prefix;
require('../../lib/adapters/leveldb').use_prefix = true;
require('bluebird').onPossiblyUnhandledRejection(function (e, promise) {
throw e;
});
}
module.exports = testUtils;
}
4 changes: 1 addition & 3 deletions tests/performance/perf.attachments.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ function randomBlob(size) {

module.exports = function (PouchDB, opts) {

// need to use bluebird for promises everywhere, so we're comparing
// apples to apples
require('bluebird'); // var Promise = require('bluebird');
require('lie');
var utils = require('./utils');

var testCases = [
Expand Down
2 changes: 1 addition & 1 deletion tests/performance/perf.basics.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module.exports = function (PouchDB, opts) {

var Promise = require('bluebird');
var Promise = require('lie');
var utils = require('./utils');
var commonUtils = require('../common-utils.js');

Expand Down
4 changes: 1 addition & 3 deletions tests/performance/perf.views.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

module.exports = function (PouchDB, opts) {

// need to use bluebird for promises everywhere, so we're comparing
// apples to apples
var Promise = require('bluebird');
var Promise = require('lie');
var utils = require('./utils');

function makeTestDocs() {
Expand Down
2 changes: 1 addition & 1 deletion tests/performance/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var reporter = require('./perf.reporter');
var test = require('tape');
var commonUtils = require('../common-utils.js');
var Promise = require('bluebird');
var Promise = require('lie');

var grep;
if (global.window && global.window.location && global.window.location.search) {
Expand Down

0 comments on commit 685297d

Please sign in to comment.