mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-06-27 08:22:31 +00:00
Remove bluebird dependency, fix tests
This commit is contained in:
parent
da55984081
commit
393391a1fd
@ -13,9 +13,8 @@
|
||||
},
|
||||
"main": "src/Client.js",
|
||||
"dependencies": {
|
||||
"ipfs-log": "^1.1.4",
|
||||
"ipfs-log": "^1.1.5",
|
||||
"lazy.js": "^0.4.2",
|
||||
"lodash": "^4.3.0",
|
||||
"log4js": "^0.6.33",
|
||||
"orbit-common": "^0.2.4",
|
||||
"socket.io-client": "^1.4.5"
|
||||
@ -23,6 +22,7 @@
|
||||
"devDependencies": {
|
||||
"asyncawait": "^1.0.1",
|
||||
"eslint": "^2.3.0",
|
||||
"lodash": "^4.3.0",
|
||||
"mocha": "^2.3.4"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
const Lazy = require('lazy.js');
|
||||
const EventEmitter = require('events').EventEmitter;
|
||||
const Promise = require('bluebird');
|
||||
const logger = require('orbit-common/lib/logger')("orbit-db.OrbitDB");
|
||||
const Log = require('ipfs-log');
|
||||
const DBOperation = require('./db/Operation');
|
||||
@ -139,12 +138,11 @@ class OrbitDB {
|
||||
.map((f) => f.payload)
|
||||
.filter((f) => Lazy(this._cached).find((e) => e.hash === f.payload) === undefined);
|
||||
|
||||
Promise.map(payloadHashes, (f) => OrbitDB.fetchPayload(this._ipfs, f), { concurrency: 4 })
|
||||
.then((payloads) => {
|
||||
payloads.forEach((f) => this._cached.push(f));
|
||||
resolve();
|
||||
})
|
||||
.catch(reject);
|
||||
const promises = payloadHashes.map((f) => OrbitDB.fetchPayload(this._ipfs, f));
|
||||
Promise.all(promises).then((payloads) => {
|
||||
payloads.forEach((f) => this._cached.push(f));
|
||||
resolve();
|
||||
}).catch(reject);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ const username = 'testrunner';
|
||||
const password = '';
|
||||
|
||||
describe('Orbit Client', function() {
|
||||
this.timeout(2000);
|
||||
this.timeout(20000);
|
||||
|
||||
let client, db;
|
||||
let channel = 'abcdefgh';
|
||||
|
@ -11,7 +11,7 @@ const OrbitDB = require('../src/OrbitDB');
|
||||
const Log = require('ipfs-log');
|
||||
|
||||
// Mute logging
|
||||
// require('log4js').setGlobalLogLevel('ERROR');
|
||||
require('log4js').setGlobalLogLevel('ERROR');
|
||||
|
||||
// Orbit
|
||||
const username = 'testrunner';
|
||||
@ -19,7 +19,7 @@ const password = '';
|
||||
const user = { username: username };
|
||||
|
||||
describe('OrbitDB', function() {
|
||||
this.timeout(2000);
|
||||
this.timeout(20000);
|
||||
|
||||
let db, ipfs;
|
||||
let channel = 'orbit-db.test';
|
||||
|
Loading…
x
Reference in New Issue
Block a user