From 9ba398ff85859445044bea7d90d057e2802824ac Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 17:57:10 +0800 Subject: [PATCH] refactor: gloal replacement of bson --- src/app/models/__tests__/admin_feedback.server.model.spec.ts | 2 +- .../models/__tests__/encrypt-submission.server.model.spec.ts | 2 +- src/app/models/__tests__/form.server.model.spec.ts | 2 +- src/app/models/__tests__/form_feedback.server.model.spec.ts | 2 +- src/app/models/__tests__/form_issue.server.model.spec.ts | 2 +- .../models/__tests__/form_statistics_total.server.model.spec.ts | 2 +- src/app/models/__tests__/login.server.model.spec.ts | 2 +- .../admin-feedback/__tests__/admin_feedback.service.spec.ts | 2 +- src/app/modules/auth/__tests__/auth.service.spec.ts | 2 +- src/app/modules/billing/__tests__/billing.controller.spec.ts | 2 +- src/app/modules/feedback/__tests__/feedback.service.spec.ts | 2 +- src/app/modules/form/__tests__/form.utils.spec.ts | 2 +- .../admin-form/__tests__/admin-form.issue.controller.spec.ts | 2 +- .../admin-form/__tests__/admin-form.payments.service.spec.ts | 2 +- .../form/admin-form/__tests__/admin-form.service.spec.ts | 2 +- .../modules/form/admin-form/__tests__/admin-form.utils.spec.ts | 2 +- src/app/modules/form/admin-form/admin-form.controller.ts | 2 +- .../form/public-form/__tests__/public-form.controller.spec.ts | 2 +- .../form/public-form/__tests__/public-form.service.spec.ts | 2 +- src/app/modules/issue/__tests__/issue.controller.spec.ts | 2 +- src/app/modules/issue/issue.service.ts | 2 +- src/app/modules/myinfo/__tests__/myinfo.service.spec.ts | 2 +- .../__tests__/encrypt-submission.controller.spec.ts | 2 +- .../__tests__/encrypt-submission.service.spec.ts | 2 +- .../__tests__/encrypt-submission.utils.spec.ts | 2 +- .../v3/admin/forms/__tests__/admin-forms.logic.routes.spec.ts | 2 +- .../v3/admin/forms/__tests__/admin-forms.presign.routes.spec.ts | 2 +- .../v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts | 2 +- .../v3/admin/forms/__tests__/admin-forms.twilio.routes.spec.ts | 2 +- .../routes/api/v3/corppass/__tests__/corppass.routes.spec.ts | 2 +- .../api/v3/forms/__tests__/public-forms.auth.routes.spec.ts | 2 +- .../api/v3/forms/__tests__/public-forms.form.routes.spec.ts | 2 +- .../v3/forms/__tests__/public-forms.verification.routes.spec.ts | 2 +- src/app/routes/api/v3/singpass/__tests/singpass.routes.spec.ts | 2 +- src/app/routes/api/v3/user/__tests__/user.routes.spec.ts | 2 +- src/shared/util/__tests__/logic.spec.ts | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/app/models/__tests__/admin_feedback.server.model.spec.ts b/src/app/models/__tests__/admin_feedback.server.model.spec.ts index 39f497c7fc..4a5ca6a636 100644 --- a/src/app/models/__tests__/admin_feedback.server.model.spec.ts +++ b/src/app/models/__tests__/admin_feedback.server.model.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { omit } from 'lodash' import mongoose from 'mongoose' diff --git a/src/app/models/__tests__/encrypt-submission.server.model.spec.ts b/src/app/models/__tests__/encrypt-submission.server.model.spec.ts index 518efda9d9..683e7b0c29 100644 --- a/src/app/models/__tests__/encrypt-submission.server.model.spec.ts +++ b/src/app/models/__tests__/encrypt-submission.server.model.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { pick, times } from 'lodash' import moment from 'moment-timezone' import mongoose from 'mongoose' diff --git a/src/app/models/__tests__/form.server.model.spec.ts b/src/app/models/__tests__/form.server.model.spec.ts index bd2e6bfe0c..dc3d307e9a 100644 --- a/src/app/models/__tests__/form.server.model.spec.ts +++ b/src/app/models/__tests__/form.server.model.spec.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import { generateDefaultField } from '__tests__/unit/backend/helpers/generate-form-data' import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { cloneDeep, map, merge, omit, orderBy, pick, range } from 'lodash' import mongoose, { Types } from 'mongoose' import { diff --git a/src/app/models/__tests__/form_feedback.server.model.spec.ts b/src/app/models/__tests__/form_feedback.server.model.spec.ts index 9ea95d75a6..bd4403bd72 100644 --- a/src/app/models/__tests__/form_feedback.server.model.spec.ts +++ b/src/app/models/__tests__/form_feedback.server.model.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { omit } from 'lodash' import mongoose from 'mongoose' diff --git a/src/app/models/__tests__/form_issue.server.model.spec.ts b/src/app/models/__tests__/form_issue.server.model.spec.ts index 3b9728680f..524051da29 100644 --- a/src/app/models/__tests__/form_issue.server.model.spec.ts +++ b/src/app/models/__tests__/form_issue.server.model.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { omit } from 'lodash' import mongoose from 'mongoose' diff --git a/src/app/models/__tests__/form_statistics_total.server.model.spec.ts b/src/app/models/__tests__/form_statistics_total.server.model.spec.ts index 69cb200106..b8894f7d56 100644 --- a/src/app/models/__tests__/form_statistics_total.server.model.spec.ts +++ b/src/app/models/__tests__/form_statistics_total.server.model.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import getFormStatisticsTotalModel from 'src/app/models/form_statistics_total.server.model' diff --git a/src/app/models/__tests__/login.server.model.spec.ts b/src/app/models/__tests__/login.server.model.spec.ts index 1a0c69348f..c023762114 100644 --- a/src/app/models/__tests__/login.server.model.spec.ts +++ b/src/app/models/__tests__/login.server.model.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { omit } from 'lodash' import moment from 'moment-timezone' import mongoose from 'mongoose' diff --git a/src/app/modules/admin-feedback/__tests__/admin_feedback.service.spec.ts b/src/app/modules/admin-feedback/__tests__/admin_feedback.service.spec.ts index cd02b702ad..cf5e1e4fca 100644 --- a/src/app/modules/admin-feedback/__tests__/admin_feedback.service.spec.ts +++ b/src/app/modules/admin-feedback/__tests__/admin_feedback.service.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import getAdminFeedbackModel from 'src/app/models/admin_feedback.server.model' diff --git a/src/app/modules/auth/__tests__/auth.service.spec.ts b/src/app/modules/auth/__tests__/auth.service.spec.ts index c6f70bde94..1b4c989398 100644 --- a/src/app/modules/auth/__tests__/auth.service.spec.ts +++ b/src/app/modules/auth/__tests__/auth.service.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import { err, errAsync, ok, okAsync } from 'neverthrow' diff --git a/src/app/modules/billing/__tests__/billing.controller.spec.ts b/src/app/modules/billing/__tests__/billing.controller.spec.ts index f699ac4fde..5fb0be655d 100644 --- a/src/app/modules/billing/__tests__/billing.controller.spec.ts +++ b/src/app/modules/billing/__tests__/billing.controller.spec.ts @@ -1,5 +1,5 @@ import expressHandler from '__tests__/unit/backend/helpers/jest-express' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import moment from 'moment-timezone' import { errAsync, okAsync } from 'neverthrow' diff --git a/src/app/modules/feedback/__tests__/feedback.service.spec.ts b/src/app/modules/feedback/__tests__/feedback.service.spec.ts index c2b1b49fb6..a24420e4a9 100644 --- a/src/app/modules/feedback/__tests__/feedback.service.spec.ts +++ b/src/app/modules/feedback/__tests__/feedback.service.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { compareAsc } from 'date-fns' import { omit, times } from 'lodash' import moment from 'moment-timezone' diff --git a/src/app/modules/form/__tests__/form.utils.spec.ts b/src/app/modules/form/__tests__/form.utils.spec.ts index 0161c7edad..9eb5e8a047 100644 --- a/src/app/modules/form/__tests__/form.utils.spec.ts +++ b/src/app/modules/form/__tests__/form.utils.spec.ts @@ -1,5 +1,5 @@ import { generateDefaultField } from '__tests__/unit/backend/helpers/generate-form-data' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { Types } from 'mongoose' import { FormFieldSchema } from 'src/types' diff --git a/src/app/modules/form/admin-form/__tests__/admin-form.issue.controller.spec.ts b/src/app/modules/form/admin-form/__tests__/admin-form.issue.controller.spec.ts index f1f20fe6e4..69782f62a7 100644 --- a/src/app/modules/form/admin-form/__tests__/admin-form.issue.controller.spec.ts +++ b/src/app/modules/form/admin-form/__tests__/admin-form.issue.controller.spec.ts @@ -1,4 +1,4 @@ -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { StatusCodes } from 'http-status-codes' import { errAsync, okAsync } from 'neverthrow' import { PassThrough } from 'stream' diff --git a/src/app/modules/form/admin-form/__tests__/admin-form.payments.service.spec.ts b/src/app/modules/form/admin-form/__tests__/admin-form.payments.service.spec.ts index 87b64c9055..3fd1e0a82b 100644 --- a/src/app/modules/form/admin-form/__tests__/admin-form.payments.service.spec.ts +++ b/src/app/modules/form/admin-form/__tests__/admin-form.payments.service.spec.ts @@ -1,4 +1,4 @@ -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import { PaymentsProductUpdateDto, diff --git a/src/app/modules/form/admin-form/__tests__/admin-form.service.spec.ts b/src/app/modules/form/admin-form/__tests__/admin-form.service.spec.ts index 09d3a2142f..93c767a935 100644 --- a/src/app/modules/form/admin-form/__tests__/admin-form.service.spec.ts +++ b/src/app/modules/form/admin-form/__tests__/admin-form.service.spec.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import { generateDefaultField } from '__tests__/unit/backend/helpers/generate-form-data' import { PresignedPost } from 'aws-sdk/clients/s3' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { assignIn, cloneDeep, merge, omit, pick } from 'lodash' import mongoose from 'mongoose' import { err, errAsync, ok, okAsync } from 'neverthrow' diff --git a/src/app/modules/form/admin-form/__tests__/admin-form.utils.spec.ts b/src/app/modules/form/admin-form/__tests__/admin-form.utils.spec.ts index 7c52b3f791..f31be99ba8 100644 --- a/src/app/modules/form/admin-form/__tests__/admin-form.utils.spec.ts +++ b/src/app/modules/form/admin-form/__tests__/admin-form.utils.spec.ts @@ -1,5 +1,5 @@ import { generateDefaultField } from '__tests__/unit/backend/helpers/generate-form-data' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { cloneDeep, omit, tail } from 'lodash' import { EditFieldActions } from 'src/shared/constants' diff --git a/src/app/modules/form/admin-form/admin-form.controller.ts b/src/app/modules/form/admin-form/admin-form.controller.ts index 10c0dd8add..0fbbef2d59 100644 --- a/src/app/modules/form/admin-form/admin-form.controller.ts +++ b/src/app/modules/form/admin-form/admin-form.controller.ts @@ -1,6 +1,6 @@ import JoiDate from '@joi/date' import axios from 'axios' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { celebrate, Joi as BaseJoi, Segments } from 'celebrate' import { AuthedSessionData } from 'express-session' import { StatusCodes } from 'http-status-codes' diff --git a/src/app/modules/form/public-form/__tests__/public-form.controller.spec.ts b/src/app/modules/form/public-form/__tests__/public-form.controller.spec.ts index f704f30357..b94e02874d 100644 --- a/src/app/modules/form/public-form/__tests__/public-form.controller.spec.ts +++ b/src/app/modules/form/public-form/__tests__/public-form.controller.spec.ts @@ -1,6 +1,6 @@ import expressHandler from '__tests__/unit/backend/helpers/jest-express' import { IPersonResponse } from '@opengovsg/myinfo-gov-client' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { Request } from 'express' import { err, errAsync, ok, okAsync } from 'neverthrow' diff --git a/src/app/modules/form/public-form/__tests__/public-form.service.spec.ts b/src/app/modules/form/public-form/__tests__/public-form.service.spec.ts index aae25c0511..fb5defe689 100644 --- a/src/app/modules/form/public-form/__tests__/public-form.service.spec.ts +++ b/src/app/modules/form/public-form/__tests__/public-form.service.spec.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import type { PartialDeep } from 'type-fest' diff --git a/src/app/modules/issue/__tests__/issue.controller.spec.ts b/src/app/modules/issue/__tests__/issue.controller.spec.ts index 60879d5664..d4660740da 100644 --- a/src/app/modules/issue/__tests__/issue.controller.spec.ts +++ b/src/app/modules/issue/__tests__/issue.controller.spec.ts @@ -1,5 +1,5 @@ import expressHandler from '__tests__/unit/backend/helpers/jest-express' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { merge, omit } from 'lodash' import { err, errAsync, ok, okAsync } from 'neverthrow' diff --git a/src/app/modules/issue/issue.service.ts b/src/app/modules/issue/issue.service.ts index b61c511163..aa55437743 100644 --- a/src/app/modules/issue/issue.service.ts +++ b/src/app/modules/issue/issue.service.ts @@ -1,4 +1,4 @@ -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { isEmpty } from 'lodash' import moment from 'moment-timezone' import mongoose, { Cursor as QueryCursor, QueryOptions } from 'mongoose' diff --git a/src/app/modules/myinfo/__tests__/myinfo.service.spec.ts b/src/app/modules/myinfo/__tests__/myinfo.service.spec.ts index 417d8814f4..dccf329a3b 100644 --- a/src/app/modules/myinfo/__tests__/myinfo.service.spec.ts +++ b/src/app/modules/myinfo/__tests__/myinfo.service.spec.ts @@ -2,7 +2,7 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' import { MyInfoGovClient } from '@opengovsg/myinfo-gov-client' import bcrypt from 'bcrypt' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import jwt from 'jsonwebtoken' import mongoose from 'mongoose' import { v4 as uuidv4 } from 'uuid' diff --git a/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.controller.spec.ts b/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.controller.spec.ts index 550d330025..12ed0b9806 100644 --- a/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.controller.spec.ts +++ b/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.controller.spec.ts @@ -1,5 +1,5 @@ import expressHandler from '__tests__/unit/backend/helpers/jest-express' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { StatusCodes } from 'http-status-codes' import { err, errAsync, ok, okAsync } from 'neverthrow' diff --git a/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.service.spec.ts b/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.service.spec.ts index 56002eb66e..f4def4988f 100644 --- a/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.service.spec.ts +++ b/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.service.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { clone, omit } from 'lodash' import mongoose from 'mongoose' import { errAsync, okAsync } from 'neverthrow' diff --git a/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.utils.spec.ts b/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.utils.spec.ts index dd673ec550..7dfdb232c0 100644 --- a/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.utils.spec.ts +++ b/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.utils.spec.ts @@ -1,4 +1,4 @@ -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { readFileSync } from 'fs' import { cloneDeep } from 'lodash' import moment from 'moment-timezone' diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.logic.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.logic.routes.spec.ts index b2040abb37..59a09b4df5 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.logic.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.logic.routes.spec.ts @@ -1,7 +1,7 @@ import { createAuthedSession } from '__tests__/integration/helpers/express-auth' import { setupApp } from '__tests__/integration/helpers/express-setup' import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import supertest, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.presign.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.presign.routes.spec.ts index 7b1ce46d32..c31db9d51b 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.presign.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.presign.routes.spec.ts @@ -3,7 +3,7 @@ import { createAuthedSession } from '__tests__/integration/helpers/express-auth' import { setupApp } from '__tests__/integration/helpers/express-setup' import { buildCelebrateError } from '__tests__/unit/backend/helpers/celebrate' import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import SparkMD5 from 'spark-md5' import supertest, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts index bd0391fcc8..24d240494b 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts @@ -11,7 +11,7 @@ import { } from '__tests__/unit/backend/helpers/generate-form-data' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import { jsonParseStringify } from '__tests__/unit/backend/helpers/serialize-data' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { omit } from 'lodash' import mongoose from 'mongoose' import supertest, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.twilio.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.twilio.routes.spec.ts index 03334d41a8..28ad725564 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.twilio.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.twilio.routes.spec.ts @@ -4,7 +4,7 @@ import { } from '__tests__/integration/helpers/express-auth' import { setupApp } from '__tests__/integration/helpers/express-setup' import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import { errAsync } from 'neverthrow' import supertest, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/corppass/__tests__/corppass.routes.spec.ts b/src/app/routes/api/v3/corppass/__tests__/corppass.routes.spec.ts index f7a6571501..36beb58b02 100644 --- a/src/app/routes/api/v3/corppass/__tests__/corppass.routes.spec.ts +++ b/src/app/routes/api/v3/corppass/__tests__/corppass.routes.spec.ts @@ -1,5 +1,5 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import fs from 'fs' import { JWTVerifyResult } from 'jose' import mongoose from 'mongoose' diff --git a/src/app/routes/api/v3/forms/__tests__/public-forms.auth.routes.spec.ts b/src/app/routes/api/v3/forms/__tests__/public-forms.auth.routes.spec.ts index 63b0df5149..5ad94e5c86 100644 --- a/src/app/routes/api/v3/forms/__tests__/public-forms.auth.routes.spec.ts +++ b/src/app/routes/api/v3/forms/__tests__/public-forms.auth.routes.spec.ts @@ -2,7 +2,7 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' import { buildCelebrateError } from '__tests__/unit/backend/helpers/celebrate' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import { jsonParseStringify } from '__tests__/unit/backend/helpers/serialize-data' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { StatusCodes } from 'http-status-codes' import { err, errAsync } from 'neverthrow' import supertest, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/forms/__tests__/public-forms.form.routes.spec.ts b/src/app/routes/api/v3/forms/__tests__/public-forms.form.routes.spec.ts index bd998c3034..f9bd606ff6 100644 --- a/src/app/routes/api/v3/forms/__tests__/public-forms.form.routes.spec.ts +++ b/src/app/routes/api/v3/forms/__tests__/public-forms.form.routes.spec.ts @@ -1,7 +1,7 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import MyInfoClient, { IMyInfoConfig } from '@opengovsg/myinfo-gov-client' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import jwt from 'jsonwebtoken' import { errAsync } from 'neverthrow' import supertest, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/forms/__tests__/public-forms.verification.routes.spec.ts b/src/app/routes/api/v3/forms/__tests__/public-forms.verification.routes.spec.ts index 09f671fdf4..f915ce3623 100644 --- a/src/app/routes/api/v3/forms/__tests__/public-forms.verification.routes.spec.ts +++ b/src/app/routes/api/v3/forms/__tests__/public-forms.verification.routes.spec.ts @@ -4,7 +4,7 @@ import MockTwilio from '__tests__/integration/helpers/twilio' import { generateDefaultField } from '__tests__/unit/backend/helpers/generate-form-data' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import bcrypt from 'bcrypt' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { subMinutes, subYears } from 'date-fns' import { StatusCodes } from 'http-status-codes' import _ from 'lodash' diff --git a/src/app/routes/api/v3/singpass/__tests/singpass.routes.spec.ts b/src/app/routes/api/v3/singpass/__tests/singpass.routes.spec.ts index 546ec7d196..8171b1c74d 100644 --- a/src/app/routes/api/v3/singpass/__tests/singpass.routes.spec.ts +++ b/src/app/routes/api/v3/singpass/__tests/singpass.routes.spec.ts @@ -1,5 +1,5 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { JWTVerifyResult } from 'jose' import mongoose from 'mongoose' import session, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/user/__tests__/user.routes.spec.ts b/src/app/routes/api/v3/user/__tests__/user.routes.spec.ts index 8683c6f2ae..79f7177548 100644 --- a/src/app/routes/api/v3/user/__tests__/user.routes.spec.ts +++ b/src/app/routes/api/v3/user/__tests__/user.routes.spec.ts @@ -2,7 +2,7 @@ import { createAuthedSession } from '__tests__/integration/helpers/express-auth' import { setupApp } from '__tests__/integration/helpers/express-setup' import { buildCelebrateError } from '__tests__/unit/backend/helpers/celebrate' import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { pick } from 'lodash' import mongoose from 'mongoose' import { errAsync, okAsync } from 'neverthrow' diff --git a/src/shared/util/__tests__/logic.spec.ts b/src/shared/util/__tests__/logic.spec.ts index a659fcf65a..1ab28a0d2c 100644 --- a/src/shared/util/__tests__/logic.spec.ts +++ b/src/shared/util/__tests__/logic.spec.ts @@ -1,4 +1,4 @@ -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { getApplicableIfFields,