Skip to content

Commit

Permalink
Merge pull request #391 from Freezystem/fix/remove-bluebird-from-couc…
Browse files Browse the repository at this point in the history
…hdb-adapter

Remove bluebird from moleculer-db-adapter-couchdb-nano
  • Loading branch information
icebob authored Aug 26, 2024
2 parents 10adf5e + 66046e4 commit 1b3cbf6
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const {ServiceBroker} = require("moleculer");
const StoreService = require("../../../moleculer-db/index");
const CouchAdapter = require("../../index");
const ModuleChecker = require("../../../moleculer-db/test/checker");
const Promise = require("bluebird");

const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));

// Create broker
const broker = new ServiceBroker({
Expand Down Expand Up @@ -36,7 +37,7 @@ const checker = new ModuleChecker(11);
// Start checks
function start() {
Promise.resolve()
.delay(500)
.then(() => delay(500))
.then(() => checker.execute())
.catch(console.error)
.then(() => broker.stop())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const {ServiceBroker} = require("moleculer");
const StoreService = require("../../../moleculer-db/index");
const ModuleChecker = require("../../../moleculer-db/test/checker");
const CouchAdapter = require("../../index");
const Promise = require("bluebird");

const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));

// Create broker
const broker = new ServiceBroker({
Expand Down Expand Up @@ -38,7 +39,7 @@ const checker = new ModuleChecker(21);
// Start checks
function start() {
Promise.resolve()
.delay(500)
.then(() => delay(500))
.then(() => checker.execute())
.catch(console.error)
.then(() => broker.stop())
Expand Down
49 changes: 27 additions & 22 deletions packages/moleculer-db-adapter-couchdb-nano/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/moleculer-db-adapter-couchdb-nano/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"node": ">= 8.x.x"
},
"dependencies": {
"bluebird": "^3.7.2",
"nano": "^9.0.5"
}
}
1 change: 0 additions & 1 deletion packages/moleculer-db-adapter-couchdb-nano/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"use strict";

const _ = require("lodash");
const Promise = require("bluebird");
const { ServiceSchemaError } = require("moleculer").Errors;
const Nano = require("nano");

Expand Down

0 comments on commit 1b3cbf6

Please sign in to comment.