Skip to content

Commit

Permalink
Merge pull request #7023 from opengovsg/release_v6.102.0
Browse files Browse the repository at this point in the history
build: release v6.102.0
  • Loading branch information
tshuli authored Jan 17, 2024
2 parents 1b0981b + f0dccf3 commit c0cad1c
Show file tree
Hide file tree
Showing 107 changed files with 3,637 additions and 3,332 deletions.
55 changes: 35 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,38 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v6.101.0](https://github.com/opengovsg/FormSG/compare/v6.99.0...v6.101.0)
#### [v6.102.0](https://github.com/opengovsg/FormSG/compare/v6.101.0...v6.102.0)

- fix: force mongodb connection to direct on localdev [`#7022`](https://github.com/opengovsg/FormSG/pull/7022)
- build: merge release v6.101.0 into develop [`#7019`](https://github.com/opengovsg/FormSG/pull/7019)
- build: release v6.101.0 [`#7013`](https://github.com/opengovsg/FormSG/pull/7013)
- fix(deps): bump follow-redirects from 1.15.2 to 1.15.4 [`#7011`](https://github.com/opengovsg/FormSG/pull/7011)
- build(deps): bump follow-redirects from 1.15.1 to 1.15.4 in /serverless/virus-scanner [`#7010`](https://github.com/opengovsg/FormSG/pull/7010)
- build(deps): bump follow-redirects from 1.15.2 to 1.15.4 in /frontend [`#7012`](https://github.com/opengovsg/FormSG/pull/7012)
- build: merge release 6.100.0 into develop [`#7009`](https://github.com/opengovsg/FormSG/pull/7009)
- feat(deps): update mongoose to 6 [`#6832`](https://github.com/opengovsg/FormSG/pull/6832)
- build: merge v6.99.0 into develop [`#7007`](https://github.com/opengovsg/FormSG/pull/7007)
- fix: update package-lock.json [`0a277d3`](https://github.com/opengovsg/FormSG/commit/0a277d32596ed8e4bdc743c2190dd97ba8ae55bb)
- chore: upgrade myinfo-gov-client and axios [`a51cb8c`](https://github.com/opengovsg/FormSG/commit/a51cb8cfb240c8ad8c1dfec42f1c55f93a9d2e9c)
- chore: bump version to 6.101.0 [`1bc479f`](https://github.com/opengovsg/FormSG/commit/1bc479f1f655db5e8e092566f6892c99b2745b35)

#### [v6.101.0](https://github.com/opengovsg/FormSG/compare/v6.100.0...v6.101.0)

> 9 January 2024

- build: release 6.100.0 [`#7008`](https://github.com/opengovsg/FormSG/pull/7008)
- build: release v6.99.0 [`#7006`](https://github.com/opengovsg/FormSG/pull/7006)
- chore: remove non encryption boundary fallback [`c2b1a33`](https://github.com/opengovsg/FormSG/commit/c2b1a33b90c2b06f1ce07722f7c9865a749b48c5)
- chore: bump version to 6.101.0 [`53bfb98`](https://github.com/opengovsg/FormSG/commit/53bfb98136a12abf5a3815805910ffb44f647b44)
- chore: upgrade myinfo-gov-client and axios [`8f1c7e0`](https://github.com/opengovsg/FormSG/commit/8f1c7e063de73a2528afce2f369b19ec640976db)
- chore: bump version to 6.100.0 [`b8e2acc`](https://github.com/opengovsg/FormSG/commit/b8e2accf72cf33aee96903304f349cc4da27b035)

#### [v6.100.0](https://github.com/opengovsg/FormSG/compare/v6.99.0...v6.100.0)

> 9 January 2024

- build: release v6.99.0 [`#7006`](https://github.com/opengovsg/FormSG/pull/7006)
- chore: remove old encrypt submission route [`02aacc2`](https://github.com/opengovsg/FormSG/commit/02aacc24a47d310dbc9aba51b69481ba41c2680c)
- chore: remove non encryption boundary fallback on frontend [`a1972f4`](https://github.com/opengovsg/FormSG/commit/a1972f4dd0106a0147be827e9fed0de57c84efe5)
- chore: remove feature flags [`0da0f61`](https://github.com/opengovsg/FormSG/commit/0da0f6143f32d9e33a9fcccda9900d031243fb97)

#### [v6.99.0](https://github.com/opengovsg/FormSG/compare/v6.98.0...v6.99.0)

Expand Down Expand Up @@ -92,14 +117,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix(deps): bump type-fest from 4.8.2 to 4.8.3 in /shared [`#6943`](https://github.com/opengovsg/FormSG/pull/6943)
- build: merge release v6.92.0 into develop [`#6934`](https://github.com/opengovsg/FormSG/pull/6934)
- build: release v6.92.0 [`#6932`](https://github.com/opengovsg/FormSG/pull/6932)
- feat: set secret key input to password type on activation modal [`#6933`](https://github.com/opengovsg/FormSG/pull/6933)
- chore: bump version to v6.92.0 [`28a8b9c`](https://github.com/opengovsg/FormSG/commit/28a8b9ca95f456c0f2c95d22813bf6d2ae1509ed)
- chore: bump version to v6.93.0 [`f7e9dcf`](https://github.com/opengovsg/FormSG/commit/f7e9dcf49f5104815f11ecad6c48d6e71a1e1bf8)

#### [v6.92.0](https://github.com/opengovsg/FormSG/compare/v6.91.1...v6.92.0)

> 28 November 2023

- feat: set secret key input to password type on activation modal [`#6933`](https://github.com/opengovsg/FormSG/pull/6933)
- fix: add myinfo errors to error map for storage-mode submissions [`#6931`](https://github.com/opengovsg/FormSG/pull/6931)
- feat(FE): set secret key input to password type [`#6930`](https://github.com/opengovsg/FormSG/pull/6930)
- feat: add prefills for variable payments [`#6899`](https://github.com/opengovsg/FormSG/pull/6899)
Expand All @@ -115,7 +139,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix: omit isVisible property from webhook response [`#6907`](https://github.com/opengovsg/FormSG/pull/6907)
- feat: charts [`#6790`](https://github.com/opengovsg/FormSG/pull/6790)
- build: merge release 6.90.0 to develop [`#6914`](https://github.com/opengovsg/FormSG/pull/6914)
- chore: bump version to v6.92.0 [`72fac02`](https://github.com/opengovsg/FormSG/commit/72fac021a92df588be577c25690b49e96796387d)
- chore: bump version to v6.92.0 [`28a8b9c`](https://github.com/opengovsg/FormSG/commit/28a8b9ca95f456c0f2c95d22813bf6d2ae1509ed)

#### [v6.91.1](https://github.com/opengovsg/FormSG/compare/v6.91.0...v6.91.1)

Expand Down Expand Up @@ -147,25 +171,17 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: merge release v6.89.1 into develop [`#6905`](https://github.com/opengovsg/FormSG/pull/6905)
- chore: bump version to v6.90.0 [`c03692e`](https://github.com/opengovsg/FormSG/commit/c03692e3d9aa64afa8007dffecfd9871542f4759)

#### [v6.89.2](https://github.com/opengovsg/FormSG/compare/v6.89.1...v6.89.2)
#### [v6.89.2](https://github.com/opengovsg/FormSG/compare/v6.89.0...v6.89.2)

> 17 November 2023

- fix: hotfix v6.89.1 for proper error handling in encrypt-submission middleware [`#6903`](https://github.com/opengovsg/FormSG/pull/6903)
- build: release v6.89.0 [`#6898`](https://github.com/opengovsg/FormSG/pull/6898)
- fix: remove myinfo child from storage mode [`#6901`](https://github.com/opengovsg/FormSG/pull/6901)
- chore: revert commit 6869 [`efab3cf`](https://github.com/opengovsg/FormSG/commit/efab3cf844113573d758b1b2c57147d5d0656a28)
- chore: bump version to 6.89.2 [`1f4e9f7`](https://github.com/opengovsg/FormSG/commit/1f4e9f70cd33ac2f015fb902de5243a4227e4981)
- fix: remove error block [`fb415fc`](https://github.com/opengovsg/FormSG/commit/fb415fcd7189a90056557c242ed98f1dc10e757e)

#### [v6.89.1](https://github.com/opengovsg/FormSG/compare/v6.89.0...v6.89.1)

> 16 November 2023

- build: release v6.89.0 [`#6898`](https://github.com/opengovsg/FormSG/pull/6898)
- fix: remove myinfo child from storage mode [`#6901`](https://github.com/opengovsg/FormSG/pull/6901)
- chore: bump version to 6.89.1 [`253dd25`](https://github.com/opengovsg/FormSG/commit/253dd2596844d28e5dc3caae298fc775fb1a3f75)
- fix: add error handling [`d6c4985`](https://github.com/opengovsg/FormSG/commit/d6c4985aa8e35dd2278af9b70d00d4e86a48bde1)
- fix: remove email mode from myinfo limit message [`5a45c98`](https://github.com/opengovsg/FormSG/commit/5a45c980dbe3fc8c15eacb3ff1827f3003fcbfc4)

#### [v6.89.0](https://github.com/opengovsg/FormSG/compare/v6.88.0...v6.89.0)

> 15 November 2023
Expand Down Expand Up @@ -202,22 +218,21 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix: add case for SGID MyInfo when field value is missing [`#6874`](https://github.com/opengovsg/FormSG/pull/6874)
- build: merge release v6.86.0 into develop [`#6873`](https://github.com/opengovsg/FormSG/pull/6873)
- build: release v6.86.0 [`#6866`](https://github.com/opengovsg/FormSG/pull/6866)
- chore: use non-testing branch for font-wqy-zenhei [`#6867`](https://github.com/opengovsg/FormSG/pull/6867)
- chore: bump version to v6.86.0 [`1eec9b6`](https://github.com/opengovsg/FormSG/commit/1eec9b63c914b56b7b10adffd03554e07fde0f3a)
- chore: bump version to v6.87.0 [`5054803`](https://github.com/opengovsg/FormSG/commit/50548038804b03f30ce6d23b4d43b7a8cf7d9620)

#### [v6.86.0](https://github.com/opengovsg/FormSG/compare/v6.85.1...v6.86.0)

> 6 November 2023

- chore: use non-testing branch for font-wqy-zenhei [`#6867`](https://github.com/opengovsg/FormSG/pull/6867)
- chore: update credits and terms of use [`#6865`](https://github.com/opengovsg/FormSG/pull/6865)
- fix: add cloudflareinsights as allowable csp [`#6864`](https://github.com/opengovsg/FormSG/pull/6864)
- feat: optimise submission query [`#6863`](https://github.com/opengovsg/FormSG/pull/6863)
- chore(dockerfile): update mocktwilio to start asap [`#6862`](https://github.com/opengovsg/FormSG/pull/6862)
- fix: only render delete button if owner [`#6837`](https://github.com/opengovsg/FormSG/pull/6837)
- build: merge release v6.85.1 into develop [`#6861`](https://github.com/opengovsg/FormSG/pull/6861)
- fix: hotfix v6.85.1 to prevent creation of SGID_MyInfo storage mode forms [`#6860`](https://github.com/opengovsg/FormSG/pull/6860)
- chore: bump version to v6.86.0 [`1c827cd`](https://github.com/opengovsg/FormSG/commit/1c827cd11844649ca303bb5dc9987db5367637c9)
- chore: bump version to v6.86.0 [`1eec9b6`](https://github.com/opengovsg/FormSG/commit/1eec9b63c914b56b7b10adffd03554e07fde0f3a)

#### [v6.85.1](https://github.com/opengovsg/FormSG/compare/v6.85.0...v6.85.1)

Expand Down
2 changes: 1 addition & 1 deletion __tests__/e2e/email-submission.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test.describe('Email form submission', () => {
})
test.afterAll(async () => {
// Clean up db
db.models = {}
await db.dropCollection(Form.collection.name)
await db.close()
})

Expand Down
2 changes: 1 addition & 1 deletion __tests__/e2e/encrypt-submission.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ test.describe('Storage form submission', () => {
})
test.afterAll(async () => {
// Clean up db
db.models = {}
await db.dropCollection(Form.collection.name)
await db.close()
})

Expand Down
11 changes: 2 additions & 9 deletions __tests__/e2e/setup/globalSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ async function globalSetup(): Promise<void> {
checkMD5: true,
},
})
await mongod.start()

const uri = await mongod.getUri(true)
const uri = mongod.getUri()
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(global as any).__MONGOINSTANCE = mongod
process.env.MONGO_URI = `${uri.slice(0, uri.lastIndexOf('/'))}/${
Expand All @@ -27,14 +28,6 @@ async function globalSetup(): Promise<void> {

// The following is to make sure the database is clean before an test starts
await mongoose.connect(process.env.MONGO_URI, {
// Avoid using deprecated URL string parser in MongoDB driver
useNewUrlParser: true,
useUnifiedTopology: true,
// Avoid using deprecated collection.ensureIndex internally
useCreateIndex: true,
// upgrade to mongo driver's native findOneAndUpdate function instead of
// findAndModify.
useFindAndModify: false,
promiseLibrary: global.Promise,
})
await mongoose.disconnect()
Expand Down
11 changes: 4 additions & 7 deletions __tests__/e2e/utils/database.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import mongoose, { Model } from 'mongoose'

const dbUri = 'mongodb://127.0.0.1:3000/formsg'

// Get absolute path of file
const spec = (path: string): any => {
const fullPath = `${process.env.PWD}/${path}`
Expand All @@ -11,11 +9,10 @@ const spec = (path: string): any => {
/**
* Connects to mongo-memory-server instance.
*/
export const makeMongooseFixtures = async (): Promise<mongoose.Connection> => {
const connection = await mongoose.createConnection(dbUri, {
reconnectTries: 5,
useNewUrlParser: true,
})
export const makeMongooseFixtures = (): Promise<mongoose.Connection> => {
const dbUri = 'mongodb://127.0.0.1:3000/test' // TODO: hardcoding uri as the port and path are fixed and doesn't respect values in __tests__/e2e/setup/setupConfig.ts

const connection = mongoose.createConnection(dbUri).asPromise()
return connection
}

Expand Down
3 changes: 1 addition & 2 deletions __tests__/setup/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class MemoryDatabaseServer {
checkMD5: true,
},
instance: {},
autoStart: false,
})
}

Expand All @@ -21,7 +20,7 @@ class MemoryDatabaseServer {
}

getConnectionString() {
return this.mongod.getUri(true)
return this.mongod.getUri()
}
}

Expand Down
40 changes: 17 additions & 23 deletions __tests__/unit/backend/helpers/jest-db.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import MemoryDatabaseServer from '__tests__/setup/database'
import { ObjectID } from 'bson'
import mongoose from 'mongoose'
import mongoose, { Schema, Types } from 'mongoose'
import { FormResponseMode } from 'shared/types'

import getAgencyModel from 'src/app/models/agency.server.model'
Expand Down Expand Up @@ -31,14 +30,9 @@ import {
* Connect to the in-memory database
*/
const connect = async (): Promise<typeof mongoose> => {
const dbUrl = await MemoryDatabaseServer.getConnectionString()

const conn = await mongoose.connect(dbUrl, {
useNewUrlParser: true,
useUnifiedTopology: true,
useCreateIndex: true,
useFindAndModify: false,
})
await MemoryDatabaseServer.start()
const dbUrl = MemoryDatabaseServer.getConnectionString()
const conn = await mongoose.connect(dbUrl)
return conn
}

Expand Down Expand Up @@ -91,8 +85,8 @@ const insertUser = async ({
mailName = 'test',
apiToken,
}: {
agencyId: ObjectID
userId?: ObjectID
agencyId: Schema.Types.ObjectId
userId?: Schema.Types.ObjectId
mailName?: string
mailDomain?: string
apiToken?: UserApiToken
Expand Down Expand Up @@ -122,7 +116,7 @@ const insertFormCollectionReqs = async ({
betaFlags,
apiToken,
}: {
userId?: ObjectID
userId?: Schema.Types.ObjectId
mailName?: string
mailDomain?: string
shortName?: string
Expand All @@ -139,7 +133,7 @@ const insertFormCollectionReqs = async ({

const user = await User.create({
email: `${mailName}@${mailDomain}`,
_id: userId ?? new ObjectID(),
_id: userId ?? new Types.ObjectId(),
agency: agency._id,
flags,
betaFlags,
Expand All @@ -157,8 +151,8 @@ const insertEmailForm = async ({
shortName = 'govtest',
formOptions = {},
}: {
formId?: ObjectID
userId?: ObjectID
formId?: Schema.Types.ObjectId
userId?: Schema.Types.ObjectId
mailName?: string
mailDomain?: string
shortName?: string
Expand Down Expand Up @@ -201,8 +195,8 @@ const insertEncryptForm = async ({
formOptions = {},
userBetaFlags,
}: {
formId?: ObjectID
userId?: ObjectID
formId?: Schema.Types.ObjectId
userId?: Schema.Types.ObjectId
mailName?: string
mailDomain?: string
shortName?: string
Expand Down Expand Up @@ -248,8 +242,8 @@ const insertFormWithMsgSrvcName = async ({
formOptions = {},
msgSrvcName = 'mockMsgSrvcname',
}: {
formId?: ObjectID
userId?: ObjectID
formId?: Schema.Types.ObjectId
userId?: Schema.Types.ObjectId
mailName?: string
mailDomain?: string
shortName?: string
Expand Down Expand Up @@ -294,7 +288,7 @@ const insertFormSubmission = async ({
version = '1',
encryptedContent = 'encryptedContent',
}: {
formId?: ObjectID
formId?: Schema.Types.ObjectId
submissionType?: string
version?: string
encryptedContent?: string
Expand All @@ -320,8 +314,8 @@ const insertFormFeedback = async ({
rating = '5',
comment = 'FormSG rocks!',
}: {
formId?: ObjectID
submissionId?: ObjectID
formId?: Schema.Types.ObjectId
submissionId?: Schema.Types.ObjectId
rating?: string
comment?: string
} = {}): Promise<{
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
- '9229:9229' # Node debugger port
environment:
- NODE_ENV=development
- DB_HOST=mongodb://database:27017/formsg
- DB_HOST=mongodb://database:27017/formsg?directConnection=true
- APP_NAME=FormSG
- APP_URL=http://localhost:5001
- FE_APP_URL=http://localhost:3000
Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

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

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "form-frontend",
"version": "6.99.0",
"version": "6.100.0",
"homepage": ".",
"private": true,
"dependencies": {
Expand Down
Loading

0 comments on commit c0cad1c

Please sign in to comment.