mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
Fixed import of bson-objectid in accordance to the typings
- there's a few different ways we can import it but I've chosen to append `.default` as we have done in several other places in the code
This commit is contained in:
parent
2422f4a95c
commit
e2ba19b0df
@ -1,7 +1,7 @@
|
||||
const debug = require('@tryghost/debug')('importer:base');
|
||||
const _ = require('lodash');
|
||||
const Promise = require('bluebird');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const errors = require('@tryghost/errors');
|
||||
const {sequence} = require('@tryghost/promise');
|
||||
const models = require('../../../../models');
|
||||
|
@ -1,5 +1,5 @@
|
||||
const {chunk} = require('lodash');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
const logging = require('@tryghost/logging');
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
const {chunk} = require('lodash');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const logging = require('@tryghost/logging');
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
const {createIrreversibleMigration} = require('../../utils');
|
||||
const logging = require('@tryghost/logging');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const security = require('@tryghost/security');
|
||||
|
||||
module.exports = createIrreversibleMigration(
|
||||
|
@ -1,5 +1,5 @@
|
||||
const {chunk} = require('lodash');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
const logging = require('@tryghost/logging');
|
||||
const errors = require('@tryghost/errors');
|
||||
|
@ -1,4 +1,4 @@
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const logging = require('@tryghost/logging');
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const {slugify} = require('@tryghost/string');
|
||||
const logging = require('@tryghost/logging');
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const {chunk} = require('lodash');
|
||||
const logging = require('@tryghost/logging');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
const logging = require('@tryghost/logging');
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
|
||||
module.exports = createTransactionalMigration(
|
||||
async function up(connection) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const {slugify} = require('@tryghost/string');
|
||||
const logging = require('@tryghost/logging');
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const uuid = require('uuid');
|
||||
const logging = require('@tryghost/logging');
|
||||
const startsWith = require('lodash/startsWith');
|
||||
|
@ -1,5 +1,5 @@
|
||||
const logging = require('@tryghost/logging');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const logging = require('@tryghost/logging');
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
const logging = require('@tryghost/logging');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
const logging = require('@tryghost/logging');
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
|
||||
// newsletter_show_header = false ->
|
||||
// newsletter_show_header_title = false
|
||||
|
@ -1,5 +1,5 @@
|
||||
const logging = require('@tryghost/logging');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const security = require('@tryghost/security');
|
||||
const {createTransactionalMigration} = require('../../utils');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
const _ = require('lodash');
|
||||
const bookshelf = require('bookshelf');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const plugins = require('@tryghost/bookshelf-plugins');
|
||||
const Promise = require('bluebird');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
const _ = require('lodash');
|
||||
const debug = require('@tryghost/debug')('models:base:model-events');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
|
||||
const schema = require('../../../data/schema');
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
const _ = require('lodash');
|
||||
|
||||
const Promise = require('bluebird');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const errors = require('@tryghost/errors');
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
const ghostBookshelf = require('./base');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const uuid = require('uuid');
|
||||
const urlUtils = require('../../shared/url-utils');
|
||||
|
||||
|
@ -3,7 +3,7 @@ const _ = require('lodash');
|
||||
const uuid = require('uuid');
|
||||
const crypto = require('crypto');
|
||||
const keypair = require('keypair');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const ghostBookshelf = require('./base');
|
||||
const tpl = require('@tryghost/tpl');
|
||||
const errors = require('@tryghost/errors');
|
||||
|
@ -1,7 +1,7 @@
|
||||
const _ = require('lodash');
|
||||
const Promise = require('bluebird');
|
||||
const validator = require('@tryghost/validator');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const ghostBookshelf = require('./base');
|
||||
const baseUtils = require('./base/utils');
|
||||
const limitService = require('../services/limits');
|
||||
|
@ -3,7 +3,7 @@ const Promise = require('bluebird');
|
||||
const debug = require('@tryghost/debug')('mega');
|
||||
const tpl = require('@tryghost/tpl');
|
||||
const moment = require('moment');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const errors = require('@tryghost/errors');
|
||||
const logging = require('@tryghost/logging');
|
||||
const settingsCache = require('../../../shared/settings-cache');
|
||||
|
@ -5,7 +5,7 @@ const _ = require('lodash');
|
||||
const errors = require('@tryghost/errors');
|
||||
const ghostVersion = require('@tryghost/version');
|
||||
const tpl = require('@tryghost/tpl');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
|
||||
const messages = {
|
||||
noPermissionToDismissNotif: 'You do not have permission to dismiss this notification.',
|
||||
|
@ -13,7 +13,7 @@ const mail = require('../mail');
|
||||
const SingleUseTokenProvider = require('../members/SingleUseTokenProvider');
|
||||
const urlUtils = require('../../../shared/url-utils');
|
||||
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const settingsHelpers = require('../settings-helpers');
|
||||
|
||||
const MAGIC_LINK_TOKEN_VALIDITY = 24 * 60 * 60 * 1000;
|
||||
|
@ -1,6 +1,6 @@
|
||||
const debug = require('@tryghost/debug')('themes');
|
||||
const fs = require('fs-extra');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
|
||||
const tpl = require('@tryghost/tpl');
|
||||
const logging = require('@tryghost/logging');
|
||||
|
@ -3,7 +3,7 @@ const {anyEtag, anyErrorId} = matchers;
|
||||
const assert = require('assert');
|
||||
|
||||
// @TODO: factor out these requires
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const testUtils = require('../../utils');
|
||||
const models = require('../../../core/server/models/index');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
const {agentProvider, mockManager, fixtureManager, matchers} = require('../../utils/e2e-framework');
|
||||
const {anyEtag, anyObjectId, anyUuid, anyISODateTime, anyISODate, anyString, anyArray, anyLocationFor, anyContentLength, anyErrorId, anyObject} = matchers;
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
|
||||
const assert = require('assert');
|
||||
const nock = require('nock');
|
||||
|
@ -3,7 +3,7 @@ const nock = require('nock');
|
||||
const path = require('path');
|
||||
const supertest = require('supertest');
|
||||
const _ = require('lodash');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const moment = require('moment-timezone');
|
||||
const testUtils = require('../../utils');
|
||||
const config = require('../../../core/shared/config');
|
||||
|
@ -3,7 +3,7 @@ const sinon = require('sinon');
|
||||
const testUtils = require('../../utils');
|
||||
const Promise = require('bluebird');
|
||||
const moment = require('moment-timezone');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const assert = require('assert');
|
||||
const _ = require('lodash');
|
||||
const validator = require('@tryghost/validator');
|
||||
|
@ -1,7 +1,7 @@
|
||||
require('should');
|
||||
const {agentProvider, fixtureManager, mockManager} = require('../../utils/e2e-framework');
|
||||
const moment = require('moment');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const models = require('../../../core/server/models');
|
||||
const sinon = require('sinon');
|
||||
const assert = require('assert');
|
||||
|
@ -1,7 +1,7 @@
|
||||
const _ = require('lodash');
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const moment = require('moment-timezone');
|
||||
const testUtils = require('../../../utils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
|
@ -1,6 +1,6 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const testUtils = require('../../../utils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
const localUtils = require('./utils');
|
||||
|
@ -1,6 +1,6 @@
|
||||
const should = require('should');
|
||||
const sinon = require('sinon');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const urlService = require('../../../../core/server/services/url');
|
||||
const getAuthorUrl = require('../../../../core/frontend/meta/author-url');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
const should = require('should');
|
||||
const sinon = require('sinon');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../../../utils');
|
||||
const urlUtils = require('../../../../../core/shared/url-utils');
|
||||
|
@ -1,6 +1,6 @@
|
||||
const should = require('should');
|
||||
const _ = require('lodash');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const testUtils = require('../../../../utils');
|
||||
const models = require('../../../../../core/server/models');
|
||||
|
||||
|
@ -4,7 +4,7 @@ const _ = require('lodash');
|
||||
const path = require('path');
|
||||
const fs = require('fs-extra');
|
||||
const uuid = require('uuid');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const KnexMigrator = require('knex-migrator');
|
||||
const {sequence} = require('@tryghost/promise');
|
||||
const knexMigrator = new KnexMigrator();
|
||||
|
@ -1,6 +1,6 @@
|
||||
const _ = require('lodash');
|
||||
const uuid = require('uuid');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const moment = require('moment');
|
||||
const constants = require('@tryghost/constants');
|
||||
const DataGenerator = {};
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
const _ = require('lodash');
|
||||
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const db = require('../../../../core/server/data/db');
|
||||
const markdownToMobiledoc = require('../data-generator').markdownToMobiledoc;
|
||||
const data = {};
|
||||
|
@ -4,7 +4,7 @@ const logging = require('@tryghost/logging');
|
||||
const tpl = require('@tryghost/tpl');
|
||||
const DomainEvents = require('@tryghost/domain-events');
|
||||
const {MemberCreatedEvent, SubscriptionCreatedEvent, MemberSubscribeEvent, SubscriptionCancelledEvent} = require('@tryghost/member-events');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const ObjectId = require('bson-objectid').default;
|
||||
const {NotFoundError} = require('@tryghost/errors');
|
||||
|
||||
const messages = {
|
||||
|
@ -1,5 +1,5 @@
|
||||
const should = require('should');
|
||||
const ObjectID = require('bson-objectid');
|
||||
const ObjectID = require('bson-objectid').default;
|
||||
const errors = require('../../../../lib/domain/errors');
|
||||
const Offer = require('../../../../lib/domain/models/Offer');
|
||||
const OfferName = require('../../../../lib/domain/models/OfferName');
|
||||
|
Loading…
Reference in New Issue
Block a user