mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Removed Bluebird dependency (#17831)
refs https://github.com/TryGhost/Ghost/issues/14882 - this removes the last usage of Bluebird within Ghost and removes the dependency as it's no longer required within the codebase
This commit is contained in:
parent
1128655287
commit
687cf5a95c
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,6 @@
|
|||
const _ = require('lodash');
|
||||
const debug = require('@tryghost/debug')('models:base:raw-knex');
|
||||
const plugins = require('@tryghost/bookshelf-plugins');
|
||||
const Promise = require('bluebird');
|
||||
|
||||
const schema = require('../../../data/schema');
|
||||
|
||||
|
@ -166,10 +165,12 @@ module.exports = function (Bookshelf) {
|
|||
})();
|
||||
});
|
||||
|
||||
return Promise.props(props)
|
||||
.then((relationsToAttach) => {
|
||||
return Promise.all(Object.values(props))
|
||||
.then((relationsToAttachArray) => {
|
||||
debug('attach relations', modelName);
|
||||
|
||||
const relationsToAttach = _.zipObject(_.keys(props), relationsToAttachArray);
|
||||
|
||||
objects = _.map(objects, (object) => {
|
||||
_.each(Object.keys(relationsToAttach), (relation) => {
|
||||
if (!relationsToAttach[relation][object.id]) {
|
||||
|
|
|
@ -163,7 +163,6 @@
|
|||
"@tryghost/zip": "1.1.37",
|
||||
"amperize": "0.6.1",
|
||||
"analytics-node": "6.2.0",
|
||||
"bluebird": "3.7.2",
|
||||
"body-parser": "1.20.2",
|
||||
"bookshelf": "1.2.0",
|
||||
"bookshelf-relations": "2.6.0",
|
||||
|
|
Loading…
Add table
Reference in a new issue