Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: release v6.162.0 #7897

Merged
merged 20 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ae4db1d
update trash icon to pencil icon, remove delete functionality in Inac…
scottheng96 Nov 13, 2024
0292de3
delete extra parenthesis
scottheng96 Nov 13, 2024
269b239
removed unused handleOpenDeleteModal
scottheng96 Nov 13, 2024
9860b76
resolved prettier lint formatting issue
scottheng96 Nov 13, 2024
c71d2bd
feat: remove openssl flag on deployment and build (#7882)
KenLSM Nov 13, 2024
d8f18e4
feat: upgrade to use v4 of artifacts action (#7881)
KenLSM Nov 13, 2024
85d66c6
trying to solve formatting issues
scottheng96 Nov 13, 2024
51bccf9
resolving prettier extra enter formatting
scottheng96 Nov 13, 2024
ff24fa2
resolved formatting issues with prettier extension
scottheng96 Nov 13, 2024
5dd2934
chore(deps): bump webpack from 5.91.0 to 5.96.1 in /react-email-previ…
dependabot[bot] Nov 13, 2024
36d342b
feat(twilio): remove twilio from fe (#7869)
KenLSM Nov 14, 2024
8a0050b
Merge pull request #7886 from opengovsg/release-al2
KenLSM Nov 14, 2024
e51e6dc
chore: update react-email deps (#7840)
KenLSM Nov 14, 2024
7394d00
removed edit function on entire step box
scottheng96 Nov 14, 2024
707e179
using primary colorScheme for pencil icon
scottheng96 Nov 14, 2024
02bcba6
Merge pull request #7885 from opengovsg/fix/replace-trash-icon
scottheng96 Nov 15, 2024
2a22489
fix(mail): failure to render mail (#7890)
KenLSM Nov 15, 2024
7201501
chore: remove jest-axios-mock, jest-localstorage-mock (#7893)
KenLSM Nov 15, 2024
c50a0c0
fix(deps): bump express-rate-limit from 7.4.0 to 7.4.1 (#7892)
dependabot[bot] Nov 15, 2024
c1b4ecf
chore: bump version to v6.162.0
KenLSM Nov 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ jobs:
key: ${{ runner.OS }}-node-modules-${{ hashFiles('**/package-lock.json') }}
- run: npm run build
env:
NODE_OPTIONS: '--max-old-space-size=4096 --openssl-legacy-provider'
NODE_OPTIONS: '--max-old-space-size=4096'
AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE: 1
- name: Upload build files
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: build-output
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
if: always()
with:
name: build-output
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
api-key: ${{ secrets.DD_API_KEY }}
- name: Build
env:
NODE_OPTIONS: --max-old-space-size=4096 --openssl-legacy-provider -r ${{ env.DD_TRACE_PACKAGE }}
NODE_OPTIONS: --max-old-space-size=4096 -r ${{ env.DD_TRACE_PACKAGE }}
VITE_APP_FORMSG_SDK_MODE: 'test'
run: npm run build
- name: Run Playwright tests (login)
Expand All @@ -46,7 +46,7 @@ jobs:
NODE_OPTIONS: -r ${{ env.DD_TRACE_PACKAGE }}
run: npx playwright test __tests__/e2e/encrypt-submission.spec.ts
timeout-minutes: 15
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,32 @@ 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.162.0](https://github.com/opengovsg/FormSG/compare/v6.161.0...v6.162.0)

- fix(deps): bump express-rate-limit from 7.4.0 to 7.4.1 [`#7892`](https://github.com/opengovsg/FormSG/pull/7892)
- chore: remove jest-axios-mock, jest-localstorage-mock [`#7893`](https://github.com/opengovsg/FormSG/pull/7893)
- fix(mail): failure to render mail [`#7890`](https://github.com/opengovsg/FormSG/pull/7890)
- fix: replace trash icon in MRF steps [`#7885`](https://github.com/opengovsg/FormSG/pull/7885)
- chore: update react-email deps [`#7840`](https://github.com/opengovsg/FormSG/pull/7840)
- build: merge release v6.161 to develop [`#7886`](https://github.com/opengovsg/FormSG/pull/7886)
- feat(twilio): remove twilio from fe [`#7869`](https://github.com/opengovsg/FormSG/pull/7869)
- chore(deps): bump webpack from 5.91.0 to 5.96.1 in /react-email-preview [`#7835`](https://github.com/opengovsg/FormSG/pull/7835)
- feat: upgrade to use v4 of artifacts action [`#7881`](https://github.com/opengovsg/FormSG/pull/7881)
- feat: remove openssl flag on deployment and build [`#7882`](https://github.com/opengovsg/FormSG/pull/7882)
- build: release v6.161.0 [`#7884`](https://github.com/opengovsg/FormSG/pull/7884)
- update trash icon to pencil icon, remove delete functionality in InactiveStepBlock [`ae4db1d`](https://github.com/opengovsg/FormSG/commit/ae4db1d772781b6733deba75eae8442bcd4e33df)
- removed edit function on entire step box [`7394d00`](https://github.com/opengovsg/FormSG/commit/7394d007a3fa8a92bbf8f2e04f584b57351a35ab)
- trying to solve formatting issues [`85d66c6`](https://github.com/opengovsg/FormSG/commit/85d66c6d4a7f2f5970821561a5d923350ffa13a1)

#### [v6.161.0](https://github.com/opengovsg/FormSG/compare/v6.160.0...v6.161.0)

> 13 November 2024

- build: merge release v6.160.0 to develop [`#7880`](https://github.com/opengovsg/FormSG/pull/7880)
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.12.2 to 8.14.0 in /shared [`#7877`](https://github.com/opengovsg/FormSG/pull/7877)
- fix: mrf be validation isSignatureTimeValid false positive [`#7878`](https://github.com/opengovsg/FormSG/pull/7878)
- build: release v6.160.0 [`#7873`](https://github.com/opengovsg/FormSG/pull/7873)
- chore: bump version to v6.161.0 [`7097551`](https://github.com/opengovsg/FormSG/commit/70975519829e332519a708b6e49df56dc2885452)

#### [v6.160.0](https://github.com/opengovsg/FormSG/compare/v6.159.0...v6.160.0)

Expand Down
11 changes: 2 additions & 9 deletions Dockerfile.development
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@ RUN chown 1001:1001 /mongodb_data

ENV CHROMIUM_BIN=/usr/bin/chromium-browser
ENV NODE_ENV=development
# --openssl-legacy-provider flag
# A breaking change in the SSL provider was introduced in node 17. This caused
# webpack 4 to break. This is an interim solution; we should investigate removing
# this flag once angular has been removed and we have upgraded to CRA5 (which uses
# webpack 5).
# See also:
# * https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported
# * https://github.com/webpack/webpack/issues/14532#issuecomment-1304378535
ENV NODE_OPTIONS="--max-old-space-size=2048 --openssl-legacy-provider"

ENV NODE_OPTIONS="--max-old-space-size=2048"
RUN apk update && apk upgrade && \
# Build dependencies for node_modules
apk add --virtual native-deps \
Expand Down
10 changes: 1 addition & 9 deletions Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,8 @@ RUN npm ci --legacy-peer-deps

COPY . ./

# --openssl-legacy-provider flag
# A breaking change in the SSL provider was introduced in node 17. This caused
# webpack 4 to break. This is an interim solution; we should investigate removing
# this flag once angular has been removed and we have upgraded to CRA5 (which uses
# webpack 5).
# See also:
# * https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported
# * https://github.com/webpack/webpack/issues/14532#issuecomment-1304378535
# These options are only used in the build stage, not the start stage.
ENV NODE_OPTIONS="--max-old-space-size=4096 --openssl-legacy-provider"
ENV NODE_OPTIONS="--max-old-space-size=4096"

RUN npm run build

Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ To install the relevant npm packages (frontend, backend and virus-scanner), run
npm install && npm --prefix serverless/virus-scanner install
```

To prevent breaking changes to webpack4 introduced in node 17 and above, enable the `--openssl-legacy-provider` flag:

```bash
export NODE_OPTIONS=--openssl-legacy-provider
```

If you are on Mac OS X, you may want to allow Docker to use more RAM (minimum of 4GB) by clicking on the Docker icon on the toolbar, clicking on the "Preferences" menu item, then clicking on the "Resources" link on the left.

### Running Locally
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.161.0",
"version": "6.162.0",
"homepage": ".",
"type": "module",
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
MOCK_FORM_FIELDS_WITH_MYINFO,
MOCK_FORM_LOGICS,
} from '~/mocks/msw/handlers/admin-form'
import { getFreeSmsQuota } from '~/mocks/msw/handlers/admin-form/twilio'
import { getUser, MOCK_USER } from '~/mocks/msw/handlers/user'

import {
Expand Down Expand Up @@ -56,7 +55,6 @@ const buildMswRoutes = (
delay: 0,
mockUser: { ...MOCK_USER, _id: 'adminFormTestUserId' as UserId },
}),
getFreeSmsQuota({ delay }),
]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
getAdminFormSubmissions,
patchAdminFormSettings,
} from '~/mocks/msw/handlers/admin-form'
import { getFreeSmsQuota } from '~/mocks/msw/handlers/admin-form/twilio'
import { getUser } from '~/mocks/msw/handlers/user'

import { ADMINFORM_ROUTE, ADMINFORM_SETTINGS_SUBROUTE } from '~constants/routes'
Expand Down Expand Up @@ -55,7 +54,6 @@ export default {
chromatic: { pauseAnimationAtEnd: true },
layout: 'fullscreen',
msw: [
getFreeSmsQuota(),
...createFormBuilderMocks(),
getAdminFormSettings(),
getAdminFormSubmissions(),
Expand All @@ -73,7 +71,6 @@ export const PreventActivation = Template.bind({})
PreventActivation.parameters = {
msw: [
...createFormBuilderMocks(),
getFreeSmsQuota(),
getAdminFormSubmissions(),
patchAdminFormSettings(),
getAdminFormSettings({
Expand Down Expand Up @@ -112,7 +109,6 @@ StorageModeSettings.parameters = {
storyDescription: `The passing secret key is ${storageModeKeypair.secretKey}`,
},
msw: [
getFreeSmsQuota(),
...createFormBuilderMocks({ responseMode: FormResponseMode.Encrypt }),
getAdminFormSettings({
mode: FormResponseMode.Encrypt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
FormPermissionsDto,
PermissionsUpdateDto,
PreviewFormViewDto,
SmsCountsDto,

Check warning on line 9 in frontend/src/features/admin-form/common/AdminViewFormService.ts

View workflow job for this annotation

GitHub Actions / frontend_lint

'SmsCountsDto' is defined but never used

Check warning on line 9 in frontend/src/features/admin-form/common/AdminViewFormService.ts

View workflow job for this annotation

GitHub Actions / frontend_lint

'SmsCountsDto' is defined but never used

Check warning on line 9 in frontend/src/features/admin-form/common/AdminViewFormService.ts

View workflow job for this annotation

GitHub Actions / frontend_lint

'SmsCountsDto' is defined but never used

Check warning on line 9 in frontend/src/features/admin-form/common/AdminViewFormService.ts

View workflow job for this annotation

GitHub Actions / frontend_lint

'SmsCountsDto' is defined but never used
} from '~shared/types/form/form'

import { ADMINFORM_USETEMPLATE_ROUTE } from '~constants/routes'
Expand Down Expand Up @@ -104,12 +104,6 @@
.then(transformAllIsoStringsToDate)
}

export const getFreeSmsQuota = async (formId: string) => {
return ApiService.get<SmsCountsDto>(
`${ADMIN_FORM_ENDPOINT}/${formId}/verified-sms/count/free`,
).then(({ data }) => data)
}

export const getFormCollaborators = async (
formId: string,
): Promise<FormPermissionsDto> => {
Expand Down
14 changes: 0 additions & 14 deletions frontend/src/features/admin-form/common/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ import { useUser } from '~features/user/queries'
import {
getAdminFormView,
getFormCollaborators,
getFreeSmsQuota,
previewForm,
viewFormTemplate,
} from './AdminViewFormService'

export const adminFormKeys = {
base: ['adminForm'] as const,
id: (id: string) => ['adminForm', id] as const,
freeSmsCount: (id: string) =>
[...adminFormKeys.id(id), 'freeSmsCount'] as const,
collaborators: (id: string) =>
[...adminFormKeys.id(id), 'collaborators'] as const,
previewForm: (id: string) =>
Expand Down Expand Up @@ -67,17 +64,6 @@ export const useAdminFormWithId = (
)
}

export const useFreeSmsQuota = () => {
const { formId } = useParams()
if (!formId) throw new Error('No formId provided to useFreeSmsQuota')

return useQuery(
adminFormKeys.freeSmsCount(formId),
() => getFreeSmsQuota(formId),
{ staleTime: 0 },
)
}

/**
* @params formId - The formId of the form to get the collaborators for.
* Params required as formId may come from various sources, either via url params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Meta, StoryFn } from '@storybook/react'
import { BasicField, MobileFieldBase } from '~shared/types'

import { createFormBuilderMocks } from '~/mocks/msw/handlers/admin-form'
import { getFreeSmsQuota } from '~/mocks/msw/handlers/admin-form/twilio'

import { EditFieldDrawerDecorator, StoryRouter } from '~utils/storybook'

Expand Down Expand Up @@ -33,7 +32,7 @@ export default {
parameters: {
// Required so skeleton "animation" does not hide content.
chromatic: { pauseAnimationAtEnd: true },
msw: [getFreeSmsQuota(), ...createFormBuilderMocks({}, 0)],
msw: [...createFormBuilderMocks({}, 0)],
},
args: {
field: DEFAULT_MOBILE_FIELD,
Expand All @@ -58,34 +57,5 @@ Default.args = {

export const Loading = Template.bind({})
Loading.parameters = {
msw: [
getFreeSmsQuota({ delay: 'infinite' }),
...createFormBuilderMocks({}, 0),
],
}

export const VerifiedQuotaExceeded = Template.bind({})
VerifiedQuotaExceeded.parameters = {
msw: [
getFreeSmsQuota({
override: {
freeSmsCounts: 10000,
quota: 10000,
},
}),
...createFormBuilderMocks({}, 0),
],
}

export const HasCustomCredentials = Template.bind({})
HasCustomCredentials.parameters = {
msw: [
getFreeSmsQuota({
override: {
freeSmsCounts: 10000,
quota: 10000,
},
}),
...createFormBuilderMocks({ msgSrvcName: 'custom-credentials' }, 0),
],
msw: [...createFormBuilderMocks({}, 0)],
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@ import Input from '~components/Input'
import Textarea from '~components/Textarea'
import Toggle from '~components/Toggle'

import { useFreeSmsQuota } from '~features/admin-form/common/queries'

import { CreatePageDrawerContentContainer } from '../../../../../common'
import { FormFieldDrawerActions } from '../common/FormFieldDrawerActions'
import { EditFieldProps } from '../common/types'
import { useEditFieldForm } from '../common/useEditFieldForm'

import { SmsCountMessage } from './SmsCountMessage'

const EDIT_MOBILE_KEYS = [
'title',
'description',
Expand Down Expand Up @@ -56,8 +52,6 @@ export const EditMobile = ({ field }: EditMobileProps): JSX.Element => {
[],
)

const { data: freeSmsCount } = useFreeSmsQuota()

return (
<>
<CreatePageDrawerContentContainer>
Expand Down Expand Up @@ -111,7 +105,6 @@ export const EditMobile = ({ field }: EditMobileProps): JSX.Element => {
)}
/>
</FormControl>
<SmsCountMessage freeSmsCount={freeSmsCount} />
</Box>
<FormFieldDrawerActions
isLoading={isLoading}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
createFormBuilderMocks,
getAdminFormCollaborators,
} from '~/mocks/msw/handlers/admin-form'
import { getFreeSmsQuota } from '~/mocks/msw/handlers/admin-form/twilio'
import { getUser } from '~/mocks/msw/handlers/user'

import { AdminFormCreatePageDecorator } from '~utils/storybook'
Expand All @@ -21,7 +20,6 @@ const buildMswRoutes = (
...createFormBuilderMocks(overrides, delay),
getUser(),
getAdminFormCollaborators(),
getFreeSmsQuota({ delay }),
]
}

Expand Down
Loading
Loading