From cba2477cd464a3a1899d26d1e1df2b7051701b51 Mon Sep 17 00:00:00 2001 From: g-tejas Date: Wed, 19 Jun 2024 15:42:46 +0800 Subject: [PATCH 1/3] chore: bump version to v6.127.0 --- CHANGELOG.md | 41 ++++++++++++++++++++------------------ frontend/package-lock.json | 4 ++-- frontend/package.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 28 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60f84dbd1e..939f6c0f75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,29 @@ 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.126.0](https://github.com/opengovsg/FormSG/compare/v6.126.0...v6.126.0) +#### [v6.127.0](https://github.com/opengovsg/FormSG/compare/v6.127.0...v6.127.0) -- revert: "chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /serverless/virus-scanner" [`#7398`](https://github.com/opengovsg/FormSG/pull/7398) +#### [v6.127.0](https://github.com/opengovsg/FormSG/compare/v6.126.0...v6.127.0) + +> 19 June 2024 + +- feat: email <> storage mode parity [`#7350`](https://github.com/opengovsg/FormSG/pull/7350) +- chore: expose sgid temp route [`#7410`](https://github.com/opengovsg/FormSG/pull/7410) +- chore(myinfo): update date to 28 jun [`#7409`](https://github.com/opengovsg/FormSG/pull/7409) +- fix(payment): add joi validation on POST body for payment onboarding [`#7405`](https://github.com/opengovsg/FormSG/pull/7405) +- fix(deps): bump winston from 3.8.2 to 3.13.0 [`#7406`](https://github.com/opengovsg/FormSG/pull/7406) +- fix(deps): bump nodemailer and @types/nodemailer [`#7404`](https://github.com/opengovsg/FormSG/pull/7404) +- build: merge release v6.126.0 to develop [`#7403`](https://github.com/opengovsg/FormSG/pull/7403) +- build: release v6.126.0 [`#7397`](https://github.com/opengovsg/FormSG/pull/7397) +- chore(deps-dev): bump @types/jwk-to-pem from 2.0.1 to 2.0.3 [`#7400`](https://github.com/opengovsg/FormSG/pull/7400) +- feat: email <> storage mode parity (#7350) [`#2264`](https://github.com/opengovsg/FormSG/issues/2264) +- chore: bump version to v6.127.0 [`fefe87b`](https://github.com/opengovsg/FormSG/commit/fefe87b2316523795a4080bc35099f08528154a4) #### [v6.126.0](https://github.com/opengovsg/FormSG/compare/v6.125.0...v6.126.0) > 18 June 2024 +- revert: "chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /serverless/virus-scanner" [`#7398`](https://github.com/opengovsg/FormSG/pull/7398) - build: merge release v6.125.0 to develop [`#7396`](https://github.com/opengovsg/FormSG/pull/7396) - chore(deps-dev): bump stripe-event-types from 2.3.0 to 3.1.0 [`#7330`](https://github.com/opengovsg/FormSG/pull/7330) - fix: fix 4xx submission after stripe disconnect [`#7391`](https://github.com/opengovsg/FormSG/pull/7391) @@ -20,9 +35,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - fix(deps): bump type-fest from 4.20.0 to 4.20.1 in /shared [`#7393`](https://github.com/opengovsg/FormSG/pull/7393) - feat: conditionally render sex based on timezone [`#7376`](https://github.com/opengovsg/FormSG/pull/7376) - build: release v6.125.0 [`#7389`](https://github.com/opengovsg/FormSG/pull/7389) -- chore: bump version to v6.126.0 [`3d1a2f8`](https://github.com/opengovsg/FormSG/commit/3d1a2f899cb441905b5264b05f36b9fd8e5cf27a) +- chore: bump version to v6.126.0 [`a8b0d5d`](https://github.com/opengovsg/FormSG/commit/a8b0d5d261d5a367962337183c007096c6524680) -#### [v6.125.0](https://github.com/opengovsg/FormSG/compare/v6.124.1...v6.125.0) +#### [v6.125.0](https://github.com/opengovsg/FormSG/compare/v6.124.0...v6.125.0) > 13 June 2024 @@ -38,13 +53,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - build: merge release 6.124.1 into develop [`#7371`](https://github.com/opengovsg/FormSG/pull/7371) - fix: check for truthiness of fieldname in receiver [`#7370`](https://github.com/opengovsg/FormSG/pull/7370) - build: merge release v6.124.0 into develop [`#7369`](https://github.com/opengovsg/FormSG/pull/7369) -- chore: bump version to v6.125.0 [`756fb88`](https://github.com/opengovsg/FormSG/commit/756fb88671cf5ba22fb28475eea44a06f3c6f79d) - -#### [v6.124.1](https://github.com/opengovsg/FormSG/compare/v6.124.0...v6.124.1) - -> 7 June 2024 - - build: release v6.124.0 [`#7368`](https://github.com/opengovsg/FormSG/pull/7368) +- chore: bump version to v6.125.0 [`756fb88`](https://github.com/opengovsg/FormSG/commit/756fb88671cf5ba22fb28475eea44a06f3c6f79d) - chore: bump version to v6.124.1 [`08eba07`](https://github.com/opengovsg/FormSG/commit/08eba07169a64e1ba5f42589c05345d32ad91a98) - check for truthiness of fieldname in receiver [`429e1e9`](https://github.com/opengovsg/FormSG/commit/429e1e9a073da23cc7f329fae11ac4e0f1b7c66c) @@ -194,7 +204,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - chore: reverting package-lock changes [`040b962`](https://github.com/opengovsg/FormSG/commit/040b96284ea317de22d9de6cf872fd4116f24c51) - chore: bump version to v6.117.0 [`6eb4aca`](https://github.com/opengovsg/FormSG/commit/6eb4aca28514e3286c23c0834f9962de291a7fbc) -#### [v6.116.0](https://github.com/opengovsg/FormSG/compare/v6.115.1...v6.116.0) +#### [v6.116.0](https://github.com/opengovsg/FormSG/compare/v6.115.0...v6.116.0) > 8 April 2024 @@ -205,17 +215,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - fix(mrf): webhook be validation [`#7247`](https://github.com/opengovsg/FormSG/pull/7247) - chore: move react-dev-inspector to frontend/package.json [`#7245`](https://github.com/opengovsg/FormSG/pull/7245) - refactor: add exhaustive checks, use answerArray for arrays [`#7244`](https://github.com/opengovsg/FormSG/pull/7244) +- * chore(deps-dev): bump @types/express from 4.17.17 to 4.17.21 (#7233) [`#7241`](https://github.com/opengovsg/FormSG/pull/7241) - fix(deps): bump type-fest from 4.14.0 to 4.15.0 in /shared [`#7243`](https://github.com/opengovsg/FormSG/pull/7243) - chore: bump version to v6.116.0 [`31e1a33`](https://github.com/opengovsg/FormSG/commit/31e1a33c96d76b69c492f5212bc48a3dabe054af) -#### [v6.115.1](https://github.com/opengovsg/FormSG/compare/v6.115.0...v6.115.1) - -> 5 April 2024 - -- * chore(deps-dev): bump @types/express from 4.17.17 to 4.17.21 (#7233) [`#7241`](https://github.com/opengovsg/FormSG/pull/7241) -- fix: add check to block webhooks updates on mrf [`71ab0c5`](https://github.com/opengovsg/FormSG/commit/71ab0c592c15de5fddbffc9970a424af7a31d4ab) -- chore: bump version to 6.115.1 [`7d127b2`](https://github.com/opengovsg/FormSG/commit/7d127b2e8353a8a282acabe1c309cefb1e750f9c) - #### [v6.115.0](https://github.com/opengovsg/FormSG/compare/v6.114.1...v6.115.0) > 3 April 2024 diff --git a/frontend/package-lock.json b/frontend/package-lock.json index a245d8bfa0..37b92264b4 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "form-frontend", - "version": "6.126.0", + "version": "6.127.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "form-frontend", - "version": "6.126.0", + "version": "6.127.0", "hasInstallScript": true, "dependencies": { "@chakra-ui/react": "^1.8.6", diff --git a/frontend/package.json b/frontend/package.json index 06dc34863e..7e7d1617a7 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "form-frontend", - "version": "6.126.0", + "version": "6.127.0", "homepage": ".", "private": true, "dependencies": { diff --git a/package-lock.json b/package-lock.json index f20cdba720..1c4945a16c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "FormSG", - "version": "6.126.0", + "version": "6.127.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "FormSG", - "version": "6.126.0", + "version": "6.127.0", "hasInstallScript": true, "dependencies": { "@aws-sdk/client-cloudwatch-logs": "^3.536.0", diff --git a/package.json b/package.json index 9c20cfda90..a19aaf168d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "FormSG", "description": "Form Manager for Government", - "version": "6.126.0", + "version": "6.127.0", "homepage": "https://form.gov.sg", "authors": [ "FormSG " From a66cebf8528675c5153ce9c57fe53bb3e0026fdd Mon Sep 17 00:00:00 2001 From: g-tejas Date: Wed, 19 Jun 2024 18:03:05 +0800 Subject: [PATCH 2/3] fix: fix issue where duplicating forms fails --- .../DupeFormWizardProvider.tsx | 46 ++++++++++++------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/frontend/src/features/workspace/components/DuplicateFormModal/DupeFormWizardProvider.tsx b/frontend/src/features/workspace/components/DuplicateFormModal/DupeFormWizardProvider.tsx index 2580546d3e..485c704e0a 100644 --- a/frontend/src/features/workspace/components/DuplicateFormModal/DupeFormWizardProvider.tsx +++ b/frontend/src/features/workspace/components/DuplicateFormModal/DupeFormWizardProvider.tsx @@ -61,7 +61,8 @@ export const useDupeFormWizardContext = (): CreateFormWizardContextReturn => { const { dupeEmailModeFormMutation, - dupeStorageModeOrMultirespondentFormMutation, + dupeStorageModeFormMutation, + dupeMultirespondentModeFormMutation, } = useDuplicateFormMutations() const { activeWorkspace, isDefaultWorkspace } = useWorkspaceContext() @@ -72,23 +73,35 @@ export const useDupeFormWizardContext = (): CreateFormWizardContextReturn => { const handleCreateStorageModeOrMultirespondentForm = handleSubmit( ({ title, responseMode }) => { - if ( - !( - responseMode === FormResponseMode.Encrypt || - responseMode === FormResponseMode.Multirespondent - ) || - !activeFormMeta?._id - ) { + if (!activeFormMeta?._id) { return } - return dupeStorageModeOrMultirespondentFormMutation.mutate({ - formIdToDuplicate: activeFormMeta._id, - title, - responseMode, - publicKey: keypair.publicKey, - workspaceId, - }) + switch (responseMode) { + case FormResponseMode.Encrypt: + return dupeStorageModeFormMutation.mutate({ + formIdToDuplicate: activeFormMeta._id, + title, + responseMode, + publicKey: keypair.publicKey, + workspaceId, + }) + case FormResponseMode.Email: + return + case FormResponseMode.Multirespondent: + return dupeMultirespondentModeFormMutation.mutate({ + formIdToDuplicate: activeFormMeta._id, + title, + responseMode, + publicKey: keypair.publicKey, + workspaceId, + }) + default: { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _: never = responseMode + throw new Error('Invalid response mode') + } + } }, ) @@ -110,7 +123,8 @@ export const useDupeFormWizardContext = (): CreateFormWizardContextReturn => { isFetching: isWorkspaceLoading || isPreviewFormLoading, isLoading: dupeEmailModeFormMutation.isLoading || - dupeStorageModeOrMultirespondentFormMutation.isLoading, + dupeStorageModeFormMutation.isLoading || + dupeMultirespondentModeFormMutation.isLoading, keypair, currentStep, direction, From aebc91bcb3a39064ba9cd9310b8624b385a4e4f2 Mon Sep 17 00:00:00 2001 From: g-tejas Date: Wed, 19 Jun 2024 18:14:16 +0800 Subject: [PATCH 3/3] 6.127.1 --- CHANGELOG.md | 7 +++++-- frontend/package-lock.json | 4 ++-- frontend/package.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 939f6c0f75..92f71ab51a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,10 @@ 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.127.0](https://github.com/opengovsg/FormSG/compare/v6.127.0...v6.127.0) +#### [v6.127.1](https://github.com/opengovsg/FormSG/compare/v6.127.0...v6.127.1) + +- build: release v6.127.0 [`#7413`](https://github.com/opengovsg/FormSG/pull/7413) +- fix: fix issue where duplicating forms fails [`a66cebf`](https://github.com/opengovsg/FormSG/commit/a66cebf8528675c5153ce9c57fe53bb3e0026fdd) #### [v6.127.0](https://github.com/opengovsg/FormSG/compare/v6.126.0...v6.127.0) @@ -20,7 +23,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - build: release v6.126.0 [`#7397`](https://github.com/opengovsg/FormSG/pull/7397) - chore(deps-dev): bump @types/jwk-to-pem from 2.0.1 to 2.0.3 [`#7400`](https://github.com/opengovsg/FormSG/pull/7400) - feat: email <> storage mode parity (#7350) [`#2264`](https://github.com/opengovsg/FormSG/issues/2264) -- chore: bump version to v6.127.0 [`fefe87b`](https://github.com/opengovsg/FormSG/commit/fefe87b2316523795a4080bc35099f08528154a4) +- chore: bump version to v6.127.0 [`cba2477`](https://github.com/opengovsg/FormSG/commit/cba2477cd464a3a1899d26d1e1df2b7051701b51) #### [v6.126.0](https://github.com/opengovsg/FormSG/compare/v6.125.0...v6.126.0) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 37b92264b4..a2ec365257 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "form-frontend", - "version": "6.127.0", + "version": "6.127.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "form-frontend", - "version": "6.127.0", + "version": "6.127.1", "hasInstallScript": true, "dependencies": { "@chakra-ui/react": "^1.8.6", diff --git a/frontend/package.json b/frontend/package.json index 7e7d1617a7..6565204b3c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "form-frontend", - "version": "6.127.0", + "version": "6.127.1", "homepage": ".", "private": true, "dependencies": { diff --git a/package-lock.json b/package-lock.json index 1c4945a16c..c6e32f9214 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "FormSG", - "version": "6.127.0", + "version": "6.127.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "FormSG", - "version": "6.127.0", + "version": "6.127.1", "hasInstallScript": true, "dependencies": { "@aws-sdk/client-cloudwatch-logs": "^3.536.0", diff --git a/package.json b/package.json index a19aaf168d..192c9b9f1c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "FormSG", "description": "Form Manager for Government", - "version": "6.127.0", + "version": "6.127.1", "homepage": "https://form.gov.sg", "authors": [ "FormSG "