From 9cb552b7576e1aea0562994d99e76f1087f86e94 Mon Sep 17 00:00:00 2001 From: Kar Rui Lau Date: Wed, 10 Mar 2021 17:25:46 +0800 Subject: [PATCH 01/28] feat: remove status key in ApplicationError class (#1338) * Also updates meta key in ApplicationError constructor to unknown type --- .../modules/auth/__tests__/auth.controller.spec.ts | 12 ++++++------ src/app/modules/auth/auth.errors.ts | 6 ++---- src/app/modules/core/core.errors.ts | 12 +++--------- src/app/modules/submission/submission.errors.ts | 6 ++---- src/app/modules/submission/submission.service.ts | 8 ++++---- src/app/modules/user/user.errors.ts | 8 +++----- src/app/modules/webhook/webhook.errors.ts | 6 ++---- src/app/services/sms/sms.errors.ts | 10 ++-------- src/app/services/sms/sms.service.ts | 6 ++++-- 9 files changed, 28 insertions(+), 46 deletions(-) diff --git a/src/app/modules/auth/__tests__/auth.controller.spec.ts b/src/app/modules/auth/__tests__/auth.controller.spec.ts index 0639c61bd0..5f231d734f 100644 --- a/src/app/modules/auth/__tests__/auth.controller.spec.ts +++ b/src/app/modules/auth/__tests__/auth.controller.spec.ts @@ -47,7 +47,7 @@ describe('auth.controller', () => { expect(mockRes.sendStatus).toBeCalledWith(200) }) - it('should return with ApplicationError status and message when retrieving agency returns an ApplicationError', async () => { + it('should return 401 when retrieving agency returns an InvalidDomainError', async () => { // Arrange const expectedError = new InvalidDomainError() const mockRes = expressHandler.mockResponse() @@ -59,7 +59,7 @@ describe('auth.controller', () => { await AuthController.handleCheckUser(MOCK_REQ, mockRes, jest.fn()) // Assert - expect(mockRes.status).toBeCalledWith(expectedError.status) + expect(mockRes.status).toBeCalledWith(401) expect(mockRes.json).toBeCalledWith(expectedError.message) }) }) @@ -91,7 +91,7 @@ describe('auth.controller', () => { expect(MockMailService.sendLoginOtp).toHaveBeenCalledTimes(1) }) - it('should return with ApplicationError status and message when retrieving agency returns an ApplicationError', async () => { + it('should return 401 when retrieving agency returns InvalidDomainError', async () => { // Arrange const expectedError = new InvalidDomainError() const mockRes = expressHandler.mockResponse() @@ -103,7 +103,7 @@ describe('auth.controller', () => { await AuthController.handleLoginSendOtp(MOCK_REQ, mockRes, jest.fn()) // Assert - expect(mockRes.status).toBeCalledWith(expectedError.status) + expect(mockRes.status).toBeCalledWith(401) expect(mockRes.json).toBeCalledWith({ message: expectedError.message }) }) @@ -189,7 +189,7 @@ describe('auth.controller', () => { expect(mockRes.json).toBeCalledWith(mockUser.toObject()) }) - it('should return with ApplicationError status and message when retrieving agency returns an ApplicationError', async () => { + it('should return 401 when retrieving agency returns InvalidDomainError', async () => { // Arrange const expectedError = new InvalidDomainError() const mockRes = expressHandler.mockResponse() @@ -201,7 +201,7 @@ describe('auth.controller', () => { await AuthController.handleLoginVerifyOtp(MOCK_REQ, mockRes, jest.fn()) // Assert - expect(mockRes.status).toBeCalledWith(expectedError.status) + expect(mockRes.status).toBeCalledWith(401) expect(mockRes.json).toBeCalledWith(expectedError.message) }) diff --git a/src/app/modules/auth/auth.errors.ts b/src/app/modules/auth/auth.errors.ts index 3f6ae71de2..0a93cb2973 100644 --- a/src/app/modules/auth/auth.errors.ts +++ b/src/app/modules/auth/auth.errors.ts @@ -1,17 +1,15 @@ -import { StatusCodes } from 'http-status-codes' - import { ApplicationError } from '../core/core.errors' export class InvalidDomainError extends ApplicationError { constructor( message = 'This is not a whitelisted public service email domain. Please log in with your official government or government-linked email address.', ) { - super(message, StatusCodes.UNAUTHORIZED) + super(message) } } export class InvalidOtpError extends ApplicationError { constructor(message = 'OTP has expired. Please request for a new OTP.') { - super(message, StatusCodes.UNPROCESSABLE_ENTITY) + super(message) } } diff --git a/src/app/modules/core/core.errors.ts b/src/app/modules/core/core.errors.ts index 4d82563eab..86a6fff233 100644 --- a/src/app/modules/core/core.errors.ts +++ b/src/app/modules/core/core.errors.ts @@ -6,15 +6,11 @@ import { FeatureNames } from 'src/config/feature-manager' */ export class ApplicationError extends Error { /** - * Http status code for the error to be returned in the response. + * Meta object to be logged by the application logger, if any. */ - status: number - /** - * Meta string to be logged by the application logger, if any. - */ - meta?: string + meta?: unknown - constructor(message?: string, status?: number, meta?: string) { + constructor(message?: string, meta?: unknown) { super() Error.captureStackTrace(this, this.constructor) @@ -23,8 +19,6 @@ export class ApplicationError extends Error { this.message = message || 'Something went wrong. Please try again.' - this.status = status || 500 - this.meta = meta } } diff --git a/src/app/modules/submission/submission.errors.ts b/src/app/modules/submission/submission.errors.ts index eb7316a77a..a5a6c7200d 100644 --- a/src/app/modules/submission/submission.errors.ts +++ b/src/app/modules/submission/submission.errors.ts @@ -1,5 +1,3 @@ -import { StatusCodes } from 'http-status-codes' - import { ResponseMode } from '../../../types' import { ApplicationError } from '../core/core.errors' @@ -8,8 +6,8 @@ import { ApplicationError } from '../core/core.errors' * when some form fields are missing from the submission */ export class ConflictError extends ApplicationError { - constructor(message: string, meta?: string) { - super(message, StatusCodes.CONFLICT, meta) + constructor(message: string, meta?: unknown) { + super(message, meta) } } diff --git a/src/app/modules/submission/submission.service.ts b/src/app/modules/submission/submission.service.ts index 64fa39ed5b..45f7ce5beb 100644 --- a/src/app/modules/submission/submission.service.ts +++ b/src/app/modules/submission/submission.service.ts @@ -65,10 +65,10 @@ const getFilteredResponses = ( ({ _id }) => _id, ) return err( - new ConflictError( - 'Some form fields are missing', - `formId="${form._id}" onlyInForm="${onlyInForm}"`, - ), + new ConflictError('Some form fields are missing', { + formId: form._id, + onlyInForm, + }), ) } return ok(results) diff --git a/src/app/modules/user/user.errors.ts b/src/app/modules/user/user.errors.ts index d6f88cf54a..2dd756ac92 100644 --- a/src/app/modules/user/user.errors.ts +++ b/src/app/modules/user/user.errors.ts @@ -1,15 +1,13 @@ -import { StatusCodes } from 'http-status-codes' - import { ApplicationError } from '../core/core.errors' export class InvalidOtpError extends ApplicationError { - constructor(message: string, meta?: string) { - super(message, StatusCodes.UNPROCESSABLE_ENTITY, meta) + constructor(message: string) { + super(message) } } export class MissingUserError extends ApplicationError { constructor(message = 'User not found') { - super(message, StatusCodes.BAD_REQUEST) + super(message) } } diff --git a/src/app/modules/webhook/webhook.errors.ts b/src/app/modules/webhook/webhook.errors.ts index a06e37ae02..e31d8e9035 100644 --- a/src/app/modules/webhook/webhook.errors.ts +++ b/src/app/modules/webhook/webhook.errors.ts @@ -1,5 +1,3 @@ -import { StatusCodes } from 'http-status-codes' - import { ApplicationError } from '../core/core.errors' /** @@ -7,7 +5,7 @@ import { ApplicationError } from '../core/core.errors' * if the submissionWebhookView is null or the webhookUrl is an invalid URL */ export class WebhookValidationError extends ApplicationError { - constructor(message: string, meta?: string) { - super(message, StatusCodes.UNPROCESSABLE_ENTITY, meta) + constructor(message: string) { + super(message) } } diff --git a/src/app/services/sms/sms.errors.ts b/src/app/services/sms/sms.errors.ts index a7f11c906b..730ef21607 100644 --- a/src/app/services/sms/sms.errors.ts +++ b/src/app/services/sms/sms.errors.ts @@ -1,16 +1,10 @@ import { ApplicationError } from '../../modules/core/core.errors' export class SmsSendError extends ApplicationError { - code?: number - sendStatus: unknown - constructor( message = 'Error sending OTP. Please try again later and if the problem persists, contact us.', - code?: number, - sendStatus?: unknown, + meta?: unknown, ) { - super(message) - this.code = code - this.sendStatus = sendStatus + super(message, meta) } } diff --git a/src/app/services/sms/sms.service.ts b/src/app/services/sms/sms.service.ts index 22bc872fa1..125035d077 100644 --- a/src/app/services/sms/sms.service.ts +++ b/src/app/services/sms/sms.service.ts @@ -1,5 +1,6 @@ import { SecretsManager } from 'aws-sdk' import dedent from 'dedent-js' +import { get } from 'lodash' import mongoose from 'mongoose' import { ResultAsync } from 'neverthrow' import NodeCache from 'node-cache' @@ -168,7 +169,7 @@ const send = async ( // Sent but with error code. // Throw error to be caught in catch block. if (!sid || errorCode) { - throw new SmsSendError(errorMessage, errorCode, status) + throw new SmsSendError(errorMessage, { errorCode, status }) } // Log success @@ -230,7 +231,8 @@ const send = async ( // Invalid number error code, throw a more reasonable error for error // handling. // See https://www.twilio.com/docs/api/errors/21211 - if (err?.code === 21211) { + // err.meta.errorCode may exist if SmsSendError is thrown inside the `then` block. + if (err?.code === 21211 || get(err, 'meta.errorCode') === 21211) { const invalidOtpError = new Error(VfnErrors.InvalidMobileNumber) invalidOtpError.name = VfnErrors.SendOtpFailed throw invalidOtpError From aa0fea0a683bb1174a6c5b76aa77077d64b07eed Mon Sep 17 00:00:00 2001 From: Yuan Ruo Date: Thu, 11 Mar 2021 06:30:27 +0800 Subject: [PATCH 02/28] build: remove unused await-to-js (#1345) --- package-lock.json | 5 ----- package.json | 1 - 2 files changed, 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2cb62bfa90..843aa53c51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6419,11 +6419,6 @@ } } }, - "await-to-js": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/await-to-js/-/await-to-js-2.1.1.tgz", - "integrity": "sha512-CHBC6gQGCIzjZ09tJ+XmpQoZOn4GdWePB4qUweCaKNJ0D3f115YdhmYVTZ4rMVpiJ3cFzZcTYK1VMYEICV4YXw==" - }, "aws-info": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aws-info/-/aws-info-1.2.0.tgz", diff --git a/package.json b/package.json index 0c7bffd482..8842455653 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,6 @@ "angular-translate-loader-partial": "^2.18.4", "angular-ui-bootstrap": "~2.5.6", "angular-ui-router": "~1.0.29", - "await-to-js": "^2.1.1", "aws-info": "^1.2.0", "aws-sdk": "^2.859.0", "axios": "^0.21.1", From f12b8b3b9305ddd4959e9abb4ecd5f6b25598d56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 11:05:57 +0800 Subject: [PATCH 03/28] chore(deps-dev): bump @babel/preset-env from 7.13.9 to 7.13.10 (#1333) Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.13.9 to 7.13.10. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.13.10/packages/babel-preset-env) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 344 +++++++++------------------------------------- package.json | 2 +- 2 files changed, 68 insertions(+), 278 deletions(-) diff --git a/package-lock.json b/package-lock.json index 843aa53c51..e87ea8f9d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -808,9 +808,9 @@ "dev": true }, "@babel/highlight": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", - "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -819,9 +819,9 @@ } }, "@babel/parser": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.9.tgz", - "integrity": "sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", + "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==", "dev": true }, "@babel/template": { @@ -1743,174 +1743,11 @@ "@babel/helper-plugin-utils": "^7.13.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "dev": true, - "requires": { - "@babel/highlight": "^7.12.13" - } - }, - "@babel/generator": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", - "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", - "dev": true, - "requires": { - "@babel/types": "^7.13.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, - "@babel/helper-create-class-features-plugin": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.8.tgz", - "integrity": "sha512-qioaRrKHQbn4hkRKDHbnuQ6kAxmmOF+kzKGnIfxPK4j2rckSJCpKzr/SSTlohSCiE3uAQpNDJ9FIh4baeE8W+w==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-member-expression-to-functions": "^7.13.0", - "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/helper-replace-supers": "^7.13.0", - "@babel/helper-split-export-declaration": "^7.12.13" - } - }, - "@babel/helper-function-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/types": "^7.12.13" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", - "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", - "dev": true, - "requires": { - "@babel/types": "^7.12.13" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.0.tgz", - "integrity": "sha512-yvRf8Ivk62JwisqV1rFRMxiSMDGnN6KH1/mDMmIrij4jztpQNRoHqqMG3U6apYbGRPJpgPalhva9Yd06HlUxJQ==", - "dev": true, - "requires": { - "@babel/types": "^7.13.0" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", - "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", - "dev": true, - "requires": { - "@babel/types": "^7.12.13" - } - }, "@babel/helper-plugin-utils": { "version": "7.13.0", "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", "dev": true - }, - "@babel/helper-replace-supers": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.0.tgz", - "integrity": "sha512-Segd5me1+Pz+rmN/NFBOplMbZG3SqRJOBlY+mA0SxAv6rjj7zJqr1AVr3SfzUVTLCv7ZLU5FycOM/SBGuLPbZw==", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.13.0", - "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", - "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", - "dev": true, - "requires": { - "@babel/types": "^7.12.13" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true - }, - "@babel/highlight": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", - "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.9.tgz", - "integrity": "sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw==", - "dev": true - }, - "@babel/template": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", - "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.12.13", - "@babel/types": "^7.12.13" - } - }, - "@babel/traverse": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz", - "integrity": "sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.0", - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.0", - "@babel/types": "^7.13.0", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" - } - }, - "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", - "to-fast-properties": "^2.0.0" - } - }, - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } } } }, @@ -2395,9 +2232,9 @@ "dev": true }, "@babel/highlight": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", - "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -2406,9 +2243,9 @@ } }, "@babel/parser": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.9.tgz", - "integrity": "sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", + "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==", "dev": true }, "@babel/template": { @@ -2681,9 +2518,9 @@ "dev": true }, "@babel/highlight": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", - "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -2692,9 +2529,9 @@ } }, "@babel/parser": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.9.tgz", - "integrity": "sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", + "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==", "dev": true }, "@babel/template": { @@ -3074,13 +2911,13 @@ } }, "@babel/preset-env": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.13.9.tgz", - "integrity": "sha512-mcsHUlh2rIhViqMG823JpscLMesRt3QbMsv1+jhopXEb3W2wXvQ9QoiOlZI9ZbR3XqPtaFpZwEZKYqGJnGMZTQ==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.13.10.tgz", + "integrity": "sha512-nOsTScuoRghRtUsRr/c69d042ysfPHcu+KOB4A9aAO9eJYqrkat+LF8G1yp1HD18QiwixT2CisZTr/0b3YZPXQ==", "dev": true, "requires": { "@babel/compat-data": "^7.13.8", - "@babel/helper-compilation-targets": "^7.13.8", + "@babel/helper-compilation-targets": "^7.13.10", "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-validator-option": "^7.12.17", "@babel/plugin-proposal-async-generator-functions": "^7.13.8", @@ -3178,17 +3015,16 @@ "@babel/types": "^7.12.13" } }, - "@babel/helper-create-class-features-plugin": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.8.tgz", - "integrity": "sha512-qioaRrKHQbn4hkRKDHbnuQ6kAxmmOF+kzKGnIfxPK4j2rckSJCpKzr/SSTlohSCiE3uAQpNDJ9FIh4baeE8W+w==", + "@babel/helper-compilation-targets": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.10.tgz", + "integrity": "sha512-/Xju7Qg1GQO4mHZ/Kcs6Au7gfafgZnwm+a7sy/ow/tV1sHeraRUHbjdat8/UvDor4Tez+siGKDk6zIKtCPKVJA==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-member-expression-to-functions": "^7.13.0", - "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/helper-replace-supers": "^7.13.0", - "@babel/helper-split-export-declaration": "^7.12.13" + "@babel/compat-data": "^7.13.8", + "@babel/helper-validator-option": "^7.12.17", + "browserslist": "^4.14.5", + "semver": "^6.3.0" } }, "@babel/helper-function-name": { @@ -3235,17 +3071,6 @@ "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", "dev": true }, - "@babel/helper-remap-async-to-generator": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.13.0.tgz", - "integrity": "sha512-pUQpFBE9JvC9lrQbpX0TmeNIy5s7GnZjna2lhhcHC7DzgBs6fWn722Y5cfwgrtrqc7NAJwMvOa0mKhq6XaE4jg==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.12.13", - "@babel/helper-wrap-function": "^7.13.0", - "@babel/types": "^7.13.0" - } - }, "@babel/helper-replace-supers": { "version": "7.13.0", "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.0.tgz", @@ -3273,22 +3098,10 @@ "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", "dev": true }, - "@babel/helper-wrap-function": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.13.0.tgz", - "integrity": "sha512-1UX9F7K3BS42fI6qd2A4BjKzgGjToscyZTdp1DjknHLCIvpgne6918io+aL5LXFcER/8QWiwpoY902pVEqgTXA==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" - } - }, "@babel/highlight": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", - "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -3297,45 +3110,11 @@ } }, "@babel/parser": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.9.tgz", - "integrity": "sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", + "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==", "dev": true }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.8.tgz", - "integrity": "sha512-rPBnhj+WgoSmgq+4gQUtXx/vOcU+UYtjy1AA/aeD61Hwj410fwYyqfUcRP3lR8ucgliVJL/G7sXcNUecC75IXA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-remap-async-to-generator": "^7.13.0", - "@babel/plugin-syntax-async-generators": "^7.8.4" - } - }, - "@babel/plugin-proposal-class-properties": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.13.0.tgz", - "integrity": "sha512-KnTDjFNC1g+45ka0myZNvSBFLhNCLN+GeGYLDEA8Oq7MZ6yMgfLoIRh86GRT0FjtJhZw8JyUskP9uvj5pHM9Zg==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.13.0", - "@babel/helper-plugin-utils": "^7.13.0" - } - }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.13.8.tgz", - "integrity": "sha512-DhB2EuB1Ih7S3/IRX5AFVgZ16k3EzfRbq97CxAVI1KSYcW+lexV8VZb7G7L8zuPVSdQMRn0kiBpf/Yzu9ZKH0g==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.13.8", - "@babel/helper-compilation-targets": "^7.13.8", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.13.0" - } - }, "@babel/plugin-syntax-class-properties": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", @@ -3363,17 +3142,6 @@ "@babel/helper-plugin-utils": "^7.13.0" } }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.13.0.tgz", - "integrity": "sha512-3j6E004Dx0K3eGmhxVJxwwI89CTJrce7lg3UrtFuDAVQ/2+SJ/h/aSFOeE6/n0WB1GsOffsJp6MnPQNQ8nmwhg==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-remap-async-to-generator": "^7.13.0" - } - }, "@babel/plugin-transform-block-scoping": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz", @@ -3407,15 +3175,6 @@ "@babel/helper-plugin-utils": "^7.13.0" } }, - "@babel/plugin-transform-parameters": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.13.0.tgz", - "integrity": "sha512-Jt8k/h/mIwE2JFEOb3lURoY5C85ETcYPnbuAJ96zRBzh1XHtQZfs62ChZ6EP22QlC8c7Xqr9q+e1SU5qttwwjw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0" - } - }, "@babel/template": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", @@ -3455,6 +3214,25 @@ "to-fast-properties": "^2.0.0" } }, + "browserslist": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", + "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001181", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.649", + "escalade": "^3.1.1", + "node-releases": "^1.1.70" + } + }, + "caniuse-lite": { + "version": "1.0.30001197", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001197.tgz", + "integrity": "sha512-8aE+sqBqtXz4G8g35Eg/XEaFr2N7rd/VQ6eABGBmNtcB8cN6qNJhMi6oSFy4UWWZgqgL3filHT8Nha4meu3tsw==", + "dev": true + }, "debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -3464,6 +3242,18 @@ "ms": "2.1.2" } }, + "electron-to-chromium": { + "version": "1.3.684", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.684.tgz", + "integrity": "sha512-GV/vz2EmmtRSvfGSQ5A0Lucic//IRSDijgL15IgzbBEEnp4rfbxeUSZSlBfmsj7BQvE4sBdgfsvPzLCnp6L21w==", + "dev": true + }, + "node-releases": { + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "dev": true + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", diff --git a/package.json b/package.json index 8842455653..cb39cd64eb 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,7 @@ "devDependencies": { "@babel/core": "^7.13.8", "@babel/plugin-transform-runtime": "^7.13.9", - "@babel/preset-env": "^7.13.9", + "@babel/preset-env": "^7.13.10", "@opengovsg/mockpass": "^2.6.5", "@types/bcrypt": "^3.0.0", "@types/bluebird": "^3.5.33", From 1179b1bc51f238986dadf9becb571f9716932f84 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 11:06:10 +0800 Subject: [PATCH 04/28] chore(deps-dev): bump @typescript-eslint/eslint-plugin (#1336) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.16.1 to 4.17.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.17.0/packages/eslint-plugin) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 56 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index e87ea8f9d9..366c8db42e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5128,13 +5128,13 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.16.1.tgz", - "integrity": "sha512-SK777klBdlkUZpZLC1mPvyOWk9yAFCWmug13eAjVQ4/Q1LATE/NbcQL1xDHkptQkZOLnPmLUA1Y54m8dqYwnoQ==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.17.0.tgz", + "integrity": "sha512-/fKFDcoHg8oNan39IKFOb5WmV7oWhQe1K6CDaAVfJaNWEhmfqlA24g+u1lqU5bMH7zuNasfMId4LaYWC5ijRLw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.16.1", - "@typescript-eslint/scope-manager": "4.16.1", + "@typescript-eslint/experimental-utils": "4.17.0", + "@typescript-eslint/scope-manager": "4.17.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.15", @@ -5144,43 +5144,43 @@ }, "dependencies": { "@typescript-eslint/experimental-utils": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.16.1.tgz", - "integrity": "sha512-0Hm3LSlMYFK17jO4iY3un1Ve9x1zLNn4EM50Lia+0EV99NdbK+cn0er7HC7IvBA23mBg3P+8dUkMXy4leL33UQ==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.17.0.tgz", + "integrity": "sha512-ZR2NIUbnIBj+LGqCFGQ9yk2EBQrpVVFOh9/Kd0Lm6gLpSAcCuLLe5lUCibKGCqyH9HPwYC0GIJce2O1i8VYmWA==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.16.1", - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/typescript-estree": "4.16.1", + "@typescript-eslint/scope-manager": "4.17.0", + "@typescript-eslint/types": "4.17.0", + "@typescript-eslint/typescript-estree": "4.17.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/scope-manager": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.16.1.tgz", - "integrity": "sha512-6IlZv9JaurqV0jkEg923cV49aAn8V6+1H1DRfhRcvZUrptQ+UtSKHb5kwTayzOYTJJ/RsYZdcvhOEKiBLyc0Cw==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.17.0.tgz", + "integrity": "sha512-OJ+CeTliuW+UZ9qgULrnGpPQ1bhrZNFpfT/Bc0pzNeyZwMik7/ykJ0JHnQ7krHanFN9wcnPK89pwn84cRUmYjw==", "dev": true, "requires": { - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/visitor-keys": "4.16.1" + "@typescript-eslint/types": "4.17.0", + "@typescript-eslint/visitor-keys": "4.17.0" } }, "@typescript-eslint/types": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.16.1.tgz", - "integrity": "sha512-nnKqBwMgRlhzmJQF8tnFDZWfunXmJyuXj55xc8Kbfup4PbkzdoDXZvzN8//EiKR27J6vUSU8j4t37yUuYPiLqA==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.17.0.tgz", + "integrity": "sha512-RN5z8qYpJ+kXwnLlyzZkiJwfW2AY458Bf8WqllkondQIcN2ZxQowAToGSd9BlAUZDB5Ea8I6mqL2quGYCLT+2g==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.16.1.tgz", - "integrity": "sha512-m8I/DKHa8YbeHt31T+UGd/l8Kwr0XCTCZL3H4HMvvLCT7HU9V7yYdinTOv1gf/zfqNeDcCgaFH2BMsS8x6NvJg==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.17.0.tgz", + "integrity": "sha512-lRhSFIZKUEPPWpWfwuZBH9trYIEJSI0vYsrxbvVvNyIUDoKWaklOAelsSkeh3E2VBSZiNe9BZ4E5tYBZbUczVQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/visitor-keys": "4.16.1", + "@typescript-eslint/types": "4.17.0", + "@typescript-eslint/visitor-keys": "4.17.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -5189,12 +5189,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.16.1.tgz", - "integrity": "sha512-s/aIP1XcMkEqCNcPQtl60ogUYjSM8FU2mq1O7y5cFf3Xcob1z1iXWNB6cC43Op+NGRTFgGolri6s8z/efA9i1w==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.17.0.tgz", + "integrity": "sha512-WfuMN8mm5SSqXuAr9NM+fItJ0SVVphobWYkWOwQ1odsfC014Vdxk/92t4JwS1Q6fCA/ABfCKpa3AVtpUKTNKGQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.16.1", + "@typescript-eslint/types": "4.17.0", "eslint-visitor-keys": "^2.0.0" } }, diff --git a/package.json b/package.json index cb39cd64eb..d901d789a3 100644 --- a/package.json +++ b/package.json @@ -194,7 +194,7 @@ "@types/uid-generator": "^2.0.2", "@types/uuid": "^8.3.0", "@types/validator": "^13.1.3", - "@typescript-eslint/eslint-plugin": "^4.16.1", + "@typescript-eslint/eslint-plugin": "^4.17.0", "@typescript-eslint/parser": "^4.17.0", "auto-changelog": "^2.2.1", "axios-mock-adapter": "^1.19.0", From f9b4c8df8b7abb2ffbc399e4360e794af41ce80b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 11:08:51 +0800 Subject: [PATCH 05/28] fix(deps): bump aws-sdk from 2.859.0 to 2.861.0 (#1347) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.859.0 to 2.861.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.859.0...v2.861.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 366c8db42e..f78526d655 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6215,9 +6215,9 @@ "integrity": "sha512-24q5Rh3bno7ldoyCq99d6hpnLI+PAMocdeVaaGt/5BTQMprvDwQToHfNnruqN11odCHZZIQbRBw+nZo1lTCH9g==" }, "aws-sdk": { - "version": "2.859.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.859.0.tgz", - "integrity": "sha512-1OnEpmJ72n6Y1NR+2wMPV2JFovDwM0ARwkjVKq5K1rcs7lkUuCG8N4A7Zy8hz5qwkpvig0FJFDtNmsziM+pwAA==", + "version": "2.861.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.861.0.tgz", + "integrity": "sha512-qb7YttyMLk0URhbNWBBZQZXDhKJy/url1GYeIlfgpQ/JQC5B2tOuJ66fPBoHyDuV6B9CQv/UorRFw1n15lvSEw==", "requires": { "buffer": "4.9.2", "events": "1.1.1", diff --git a/package.json b/package.json index d901d789a3..63b83a3be8 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "angular-ui-bootstrap": "~2.5.6", "angular-ui-router": "~1.0.29", "aws-info": "^1.2.0", - "aws-sdk": "^2.859.0", + "aws-sdk": "^2.861.0", "axios": "^0.21.1", "bcrypt": "^5.0.1", "bluebird": "^3.5.2", From 49d95309770aaf6948c93baf2b51367271cbadd1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 11:39:40 +0800 Subject: [PATCH 06/28] fix(deps): bump connect-mongo from 4.2.2 to 4.3.1 (#1346) * fix(deps): bump connect-mongo from 4.2.2 to 4.3.1 Bumps [connect-mongo](https://github.com/jdesboeufs/connect-mongo) from 4.2.2 to 4.3.1. - [Release notes](https://github.com/jdesboeufs/connect-mongo/releases) - [Changelog](https://github.com/jdesboeufs/connect-mongo/blob/master/CHANGELOG.md) - [Commits](https://github.com/jdesboeufs/connect-mongo/compare/v4.2.2...v4.3.1) Signed-off-by: dependabot[bot] * ref: use new client option Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Antariksh --- package-lock.json | 6 +++--- package.json | 2 +- src/loaders/express/session.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index f78526d655..55e7394c89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8222,9 +8222,9 @@ } }, "connect-mongo": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-4.2.2.tgz", - "integrity": "sha512-HueEAPZoeGpzbfLTHBXSs6SwNZv275nz3Kxyak5aT+RlBz8/ljTw0wO1f3NwjWxkJdBd12mVb7/aYopS7tzq4A==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-4.3.1.tgz", + "integrity": "sha512-R8X9vQ3ahHLd9ZYzjKbtfnGdW/ReY6EmjJv1IOKaT3v9ZJQdV1cE6peDBoNW4Pd2XmNqOVCywvy2ov2a5/Cnsg==", "requires": { "debug": "^4.3.1", "kruptein": "^3.0.0", diff --git a/package.json b/package.json index 63b83a3be8..da0ee11ae6 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "busboy": "^0.3.1", "celebrate": "^13.0.4", "compression": "~1.7.2", - "connect-mongo": "^4.2.2", + "connect-mongo": "^4.3.1", "convict": "^6.0.0", "convict-format-with-validator": "^6.0.0", "cookie-parser": "~1.4.0", diff --git a/src/loaders/express/session.ts b/src/loaders/express/session.ts index 34aedc0a9c..fb00658852 100644 --- a/src/loaders/express/session.ts +++ b/src/loaders/express/session.ts @@ -15,7 +15,7 @@ const sessionMiddlewares = (connection: Connection): RequestHandler[] => { cookie: config.cookieSettings, name: 'connect.sid', store: MongoStore.create({ - clientPromise: Promise.resolve(connection.getClient()), + client: connection.getClient(), }), }) From f33bf68b552f6ec8d0c13a4706b22d3ad8c6e558 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 12:18:56 +0800 Subject: [PATCH 07/28] chore(deps-dev): bump eslint-plugin-jest from 24.1.9 to 24.2.1 (#1351) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.1.9 to 24.2.1. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v24.1.9...v24.2.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 52 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 55e7394c89..d73b7f64d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5240,15 +5240,15 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.16.1.tgz", - "integrity": "sha512-0Hm3LSlMYFK17jO4iY3un1Ve9x1zLNn4EM50Lia+0EV99NdbK+cn0er7HC7IvBA23mBg3P+8dUkMXy4leL33UQ==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.17.0.tgz", + "integrity": "sha512-ZR2NIUbnIBj+LGqCFGQ9yk2EBQrpVVFOh9/Kd0Lm6gLpSAcCuLLe5lUCibKGCqyH9HPwYC0GIJce2O1i8VYmWA==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.16.1", - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/typescript-estree": "4.16.1", + "@typescript-eslint/scope-manager": "4.17.0", + "@typescript-eslint/types": "4.17.0", + "@typescript-eslint/typescript-estree": "4.17.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } @@ -5348,29 +5348,29 @@ } }, "@typescript-eslint/scope-manager": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.16.1.tgz", - "integrity": "sha512-6IlZv9JaurqV0jkEg923cV49aAn8V6+1H1DRfhRcvZUrptQ+UtSKHb5kwTayzOYTJJ/RsYZdcvhOEKiBLyc0Cw==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.17.0.tgz", + "integrity": "sha512-OJ+CeTliuW+UZ9qgULrnGpPQ1bhrZNFpfT/Bc0pzNeyZwMik7/ykJ0JHnQ7krHanFN9wcnPK89pwn84cRUmYjw==", "dev": true, "requires": { - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/visitor-keys": "4.16.1" + "@typescript-eslint/types": "4.17.0", + "@typescript-eslint/visitor-keys": "4.17.0" } }, "@typescript-eslint/types": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.16.1.tgz", - "integrity": "sha512-nnKqBwMgRlhzmJQF8tnFDZWfunXmJyuXj55xc8Kbfup4PbkzdoDXZvzN8//EiKR27J6vUSU8j4t37yUuYPiLqA==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.17.0.tgz", + "integrity": "sha512-RN5z8qYpJ+kXwnLlyzZkiJwfW2AY458Bf8WqllkondQIcN2ZxQowAToGSd9BlAUZDB5Ea8I6mqL2quGYCLT+2g==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.16.1.tgz", - "integrity": "sha512-m8I/DKHa8YbeHt31T+UGd/l8Kwr0XCTCZL3H4HMvvLCT7HU9V7yYdinTOv1gf/zfqNeDcCgaFH2BMsS8x6NvJg==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.17.0.tgz", + "integrity": "sha512-lRhSFIZKUEPPWpWfwuZBH9trYIEJSI0vYsrxbvVvNyIUDoKWaklOAelsSkeh3E2VBSZiNe9BZ4E5tYBZbUczVQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/visitor-keys": "4.16.1", + "@typescript-eslint/types": "4.17.0", + "@typescript-eslint/visitor-keys": "4.17.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -5414,12 +5414,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.16.1.tgz", - "integrity": "sha512-s/aIP1XcMkEqCNcPQtl60ogUYjSM8FU2mq1O7y5cFf3Xcob1z1iXWNB6cC43Op+NGRTFgGolri6s8z/efA9i1w==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.17.0.tgz", + "integrity": "sha512-WfuMN8mm5SSqXuAr9NM+fItJ0SVVphobWYkWOwQ1odsfC014Vdxk/92t4JwS1Q6fCA/ABfCKpa3AVtpUKTNKGQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.16.1", + "@typescript-eslint/types": "4.17.0", "eslint-visitor-keys": "^2.0.0" }, "dependencies": { @@ -10748,9 +10748,9 @@ } }, "eslint-plugin-jest": { - "version": "24.1.9", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.1.9.tgz", - "integrity": "sha512-dobHZxHQGiwpNuI/CNU69Q0T8oBWfJjhroOPD0vBUBbAuKzzjcflT7dqKj6NBvhNs5TfdBofX9GGswmQL2iKzQ==", + "version": "24.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.2.1.tgz", + "integrity": "sha512-s24ve8WUu3DLVidvlSzaqlOpTZre9lTkZTAO+a7X0WMtj8HraWTiTEkW3pbDT1xVxqEHMWSv+Kx7MyqR50nhBw==", "dev": true, "requires": { "@typescript-eslint/experimental-utils": "^4.0.1" diff --git a/package.json b/package.json index da0ee11ae6..1f506e1b66 100644 --- a/package.json +++ b/package.json @@ -210,7 +210,7 @@ "eslint-config-prettier": "^8.1.0", "eslint-plugin-angular": "^4.0.1", "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jest": "^24.1.9", + "eslint-plugin-jest": "^24.2.1", "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-simple-import-sort": "^7.0.0", "eslint-plugin-typesafe": "^0.5.2", From eeb9b286b89c3246eb8eb489f028d57370f964e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 12:19:19 +0800 Subject: [PATCH 08/28] fix(deps): bump libphonenumber-js from 1.9.12 to 1.9.13 (#1352) Bumps [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) from 1.9.12 to 1.9.13. - [Release notes](https://gitlab.com/catamphetamine/libphonenumber-js/tags) - [Changelog](https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/CHANGELOG.md) - [Commits](https://gitlab.com/catamphetamine/libphonenumber-js/commits/master) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d73b7f64d8..970c13bded 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15611,9 +15611,9 @@ } }, "libphonenumber-js": { - "version": "1.9.12", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.9.12.tgz", - "integrity": "sha512-UNSBMB+lIn2XJtESlW4qDMxeZWcHhk50n8NlxQOlomrjDMTwNlq7UdD4gOR/ibS54M4Pw0mRFw6geddRBHGHNw==" + "version": "1.9.13", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.9.13.tgz", + "integrity": "sha512-DOvAj9Now6KqP+L1Q3JrM3iNhH/mXiOPTj6kxb9OnJbYsVYRlVdvRY1kCpU3Tz9VegIEi6MgDrviBaAnvB3aSw==" }, "lie": { "version": "3.3.0", diff --git a/package.json b/package.json index 1f506e1b66..f3a233283b 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "json-stringify-safe": "^5.0.1", "jszip": "^3.6.0", "jwt-decode": "^3.1.2", - "libphonenumber-js": "^1.9.12", + "libphonenumber-js": "^1.9.13", "lodash": "^4.17.21", "moment-timezone": "0.5.33", "mongodb-uri": "^0.9.7", From d09e819058db32eb588b6f448a43f44826cb61c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 12:21:15 +0800 Subject: [PATCH 09/28] chore(deps-dev): bump @babel/plugin-transform-runtime (#1331) Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.13.9 to 7.13.10. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.13.10/packages/babel-plugin-transform-runtime) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 970c13bded..4fe9b91a94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2762,9 +2762,9 @@ } }, "@babel/plugin-transform-runtime": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.9.tgz", - "integrity": "sha512-XCxkY/wBI6M6Jj2mlWxkmqbKPweRanszWbF3Tyut+hKh+PHcuIH/rSr/7lmmE7C3WW+HSIm2GT+d5jwmheuB0g==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.10.tgz", + "integrity": "sha512-Y5k8ipgfvz5d/76tx7JYbKQTcgFSU6VgJ3kKQv4zGTKr+a9T/KBvfRvGtSFgKDQGt/DBykQixV0vNWKIdzWErA==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.12.13", diff --git a/package.json b/package.json index f3a233283b..014b55e9a4 100644 --- a/package.json +++ b/package.json @@ -159,7 +159,7 @@ }, "devDependencies": { "@babel/core": "^7.13.8", - "@babel/plugin-transform-runtime": "^7.13.9", + "@babel/plugin-transform-runtime": "^7.13.10", "@babel/preset-env": "^7.13.10", "@opengovsg/mockpass": "^2.6.5", "@types/bcrypt": "^3.0.0", From e6f58a985ce2181c14f6c354ea690d0f69107c60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 12:27:21 +0800 Subject: [PATCH 10/28] fix(deps): bump @opengovsg/spcp-auth-client from 1.4.0 to 1.4.2 (#1353) Bumps [@opengovsg/spcp-auth-client](https://github.com/opengovsg/spcp-auth-client) from 1.4.0 to 1.4.2. - [Release notes](https://github.com/opengovsg/spcp-auth-client/releases) - [Commits](https://github.com/opengovsg/spcp-auth-client/compare/v1.4.0...v1.4.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 49 ++++++++++++++++++++++++++++++++++++++--------- package.json | 2 +- 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4fe9b91a94..ebbe277643 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4234,21 +4234,49 @@ "integrity": "sha512-YqR6GIsum9K7Cg6wOTxwJnKP+KDOxbZ9dnQE2/M47vP0ynXyTadvwflGBukzJ/MhzrS2R6buNhFjFnVJRXJinw==" }, "@opengovsg/spcp-auth-client": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@opengovsg/spcp-auth-client/-/spcp-auth-client-1.4.0.tgz", - "integrity": "sha512-5dstOdhAPGgFMLaYJgHBOSL/y7GiMM+rj9cFqOiKYuFQl4uMrkgPij1yTlxLe3NVXBjuhVS0ZiEyV/EUtnF13g==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@opengovsg/spcp-auth-client/-/spcp-auth-client-1.4.2.tgz", + "integrity": "sha512-mpfiapWknNW2+5A5r9NVjPz3r3KRD3jtIcHaKljd895FPgR0gzbY3bQBTiPSbeNATJphqqwLdsZmf2/EsCgs6w==", "requires": { "base-64": "^1.0.0", "jsonwebtoken": "^8.3.0", - "lodash": "^4.17.11", - "request": "^2.87.0", + "lodash": "^4.17.21", + "request": "^2.88.2", "xml-crypto": "^2.0.0", - "xml-encryption": "^1.2.1", + "xml-encryption": "^1.2.2", "xml2json-light": "^1.0.6", - "xmldom": "^0.4.0", + "xmldom": "^0.5.0", "xpath": "0.0.32" }, "dependencies": { + "xml-encryption": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-1.2.2.tgz", + "integrity": "sha512-s0Fax5BpCZqLzYGtlmilUoi/kyhj8dHqaMOvTAQLifkDS4QVfIuBqhEj9POtk3YbZ0tSxp/hvbGj3iCOM1ej8w==", + "requires": { + "escape-html": "^1.0.3", + "node-forge": "^0.10.0", + "xmldom": "~0.1.15", + "xpath": "0.0.27" + }, + "dependencies": { + "xmldom": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", + "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==" + }, + "xpath": { + "version": "0.0.27", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.27.tgz", + "integrity": "sha512-fg03WRxtkCV6ohClePNAECYsmpKKTv5L8y/X3Dn1hQrec3POx2jHZ/0P2qQ6HvsrU1BmeqXcof3NGGueG6LxwQ==" + } + } + }, + "xmldom": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.5.0.tgz", + "integrity": "sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA==" + }, "xpath": { "version": "0.0.32", "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz", @@ -25648,6 +25676,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-1.2.1.tgz", "integrity": "sha512-hn5w3l5p2+nGjlmM0CAhMChDzVGhW+M37jH35Z+GJIipXbn9PUlAIRZ6I5Wm7ynlqZjFrMAr83d/CIp9VZJMTA==", + "dev": true, "requires": { "escape-html": "^1.0.3", "node-forge": "^0.10.0", @@ -25658,7 +25687,8 @@ "xmldom": { "version": "0.1.31", "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", - "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==" + "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==", + "dev": true } } }, @@ -25696,7 +25726,8 @@ "xmldom": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.4.0.tgz", - "integrity": "sha512-2E93k08T30Ugs+34HBSTQLVtpi6mCddaY8uO+pMNk1pqSjV5vElzn4mmh6KLxN3hki8rNcHSYzILoh3TEWORvA==" + "integrity": "sha512-2E93k08T30Ugs+34HBSTQLVtpi6mCddaY8uO+pMNk1pqSjV5vElzn4mmh6KLxN3hki8rNcHSYzILoh3TEWORvA==", + "dev": true }, "xmlhttprequest-ssl": { "version": "1.5.5", diff --git a/package.json b/package.json index 014b55e9a4..80f516b0f7 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@opengovsg/formsg-sdk": "^0.8.4-beta.0", "@opengovsg/myinfo-gov-client": "=4.0.0-beta.0", "@opengovsg/ng-file-upload": "^12.2.15", - "@opengovsg/spcp-auth-client": "^1.4.0", + "@opengovsg/spcp-auth-client": "^1.4.2", "@sentry/browser": "^6.2.1", "@sentry/integrations": "^6.2.1", "@stablelib/base64": "^1.0.0", From 8acae857385ca6bab11373ea66d0d915eab15ee8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 19:27:55 +0800 Subject: [PATCH 11/28] chore(deps-dev): bump @babel/core from 7.13.8 to 7.13.10 (#1354) Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.13.8 to 7.13.10. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.13.10/packages/babel-core) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 87 +++++++++++++++++++++++++++++++++++------------ package.json | 2 +- 2 files changed, 66 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebbe277643..bce2a22cb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,17 +20,17 @@ "dev": true }, "@babel/core": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.8.tgz", - "integrity": "sha512-oYapIySGw1zGhEFRd6lzWNLWFX2s5dA/jm+Pw/+59ZdXtjyIuwlXbrId22Md0rgZVop+aVoqow2riXhBLNyuQg==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.10.tgz", + "integrity": "sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.0", - "@babel/helper-compilation-targets": "^7.13.8", + "@babel/generator": "^7.13.9", + "@babel/helper-compilation-targets": "^7.13.10", "@babel/helper-module-transforms": "^7.13.0", - "@babel/helpers": "^7.13.0", - "@babel/parser": "^7.13.4", + "@babel/helpers": "^7.13.10", + "@babel/parser": "^7.13.10", "@babel/template": "^7.12.13", "@babel/traverse": "^7.13.0", "@babel/types": "^7.13.0", @@ -63,6 +63,18 @@ "source-map": "^0.5.0" } }, + "@babel/helper-compilation-targets": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.10.tgz", + "integrity": "sha512-/Xju7Qg1GQO4mHZ/Kcs6Au7gfafgZnwm+a7sy/ow/tV1sHeraRUHbjdat8/UvDor4Tez+siGKDk6zIKtCPKVJA==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.8", + "@babel/helper-validator-option": "^7.12.17", + "browserslist": "^4.14.5", + "semver": "^6.3.0" + } + }, "@babel/helper-function-name": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", @@ -99,9 +111,9 @@ "dev": true }, "@babel/highlight": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", - "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -110,9 +122,9 @@ } }, "@babel/parser": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.9.tgz", - "integrity": "sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", + "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==", "dev": true }, "@babel/template": { @@ -154,6 +166,25 @@ "to-fast-properties": "^2.0.0" } }, + "browserslist": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", + "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001181", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.649", + "escalade": "^3.1.1", + "node-releases": "^1.1.70" + } + }, + "caniuse-lite": { + "version": "1.0.30001198", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001198.tgz", + "integrity": "sha512-r5GGgESqOPZzwvdLVER374FpQu2WluCF1Z2DSiFJ89KSmGjT0LVKjgv4NcAqHmGWF9ihNpqRI9KXO9Ex4sKsgA==", + "dev": true + }, "debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -163,6 +194,12 @@ "ms": "2.1.2" } }, + "electron-to-chromium": { + "version": "1.3.685", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.685.tgz", + "integrity": "sha512-C3oFZNkJ8lz85ADqr3hzpjBc2ciejMRN2SCd/D0hwcqpr6MGxfdN/j89VN6l+ERTuCUvhg0VYsf40Q4qTz4bhQ==", + "dev": true + }, "json5": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", @@ -172,6 +209,12 @@ "minimist": "^1.2.5" } }, + "node-releases": { + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "dev": true + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -1351,9 +1394,9 @@ } }, "@babel/helpers": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.0.tgz", - "integrity": "sha512-aan1MeFPxFacZeSz6Ld7YZo5aPuqnKlD7+HZY75xQsueczFccP9A7V05+oe0XpLwHK3oLorPe9eaAUljL7WEaQ==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", + "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", "dev": true, "requires": { "@babel/template": "^7.12.13", @@ -1417,9 +1460,9 @@ "dev": true }, "@babel/highlight": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", - "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -1428,9 +1471,9 @@ } }, "@babel/parser": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.9.tgz", - "integrity": "sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", + "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==", "dev": true }, "@babel/template": { diff --git a/package.json b/package.json index 80f516b0f7..dc08bce183 100644 --- a/package.json +++ b/package.json @@ -158,7 +158,7 @@ "winston-cloudwatch": "^2.5.0" }, "devDependencies": { - "@babel/core": "^7.13.8", + "@babel/core": "^7.13.10", "@babel/plugin-transform-runtime": "^7.13.10", "@babel/preset-env": "^7.13.10", "@opengovsg/mockpass": "^2.6.5", From f5ad53a6beb049ae057b75aeb0dcc3b5d28cbe28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 11:42:02 +0800 Subject: [PATCH 12/28] fix(deps): bump @sentry/integrations from 6.2.1 to 6.2.2 (#1360) Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.2.1 to 6.2.2. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/6.2.1...6.2.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index bce2a22cb9..035f2e62af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4409,12 +4409,12 @@ } }, "@sentry/integrations": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-6.2.1.tgz", - "integrity": "sha512-UBvuil/b9M5HGH6aBDzTiIVRsmpC/wqwDKy28IO05XLdalmKgJ9C1EQhoyN6xw+1lINpXXFtfq4NhfgZgWbc7Q==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-6.2.2.tgz", + "integrity": "sha512-B7oaQD3+dVZpgQIOWK19F12fxHKcU7AJXdcjw/gHRMLulLTYjGSFwgVS/zdaC+4W/zGO/HpZjFqqXqqRP9ipEg==", "requires": { - "@sentry/types": "6.2.1", - "@sentry/utils": "6.2.1", + "@sentry/types": "6.2.2", + "@sentry/utils": "6.2.2", "localforage": "^1.8.1", "tslib": "^1.9.3" } @@ -4437,16 +4437,16 @@ } }, "@sentry/types": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.2.1.tgz", - "integrity": "sha512-h0OV1QT+fv5ojfK5/+iEXClu33HirmvbjcQC2jf05IHj9yXIOWy6EB10S8nBjuLiiFqQiAQYj3FN9Ip4eN8NJA==" + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.2.2.tgz", + "integrity": "sha512-Y/1sRtw3a5JU4YdNBig8lLSVJ1UdYtuge+QP1CVLcLSAbq07Ok1bvF+Z+BlNcnHqle2Fl8aKuryG5Yu86enOyQ==" }, "@sentry/utils": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-6.2.1.tgz", - "integrity": "sha512-6kQgM/yBPdXu+3qbJnI6HBcWztN9QfiMkH++ZiKk4ERhg9d2LYWlze478uTU5Fyo/JQYcp+McpjtjpR9QIrr0g==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-6.2.2.tgz", + "integrity": "sha512-qaee6X6VDNZ8HeO83/veaKw0KuhDE7j1R+Yryme3PywFzsoTzutDrEQjb7gvcHAhBaAYX8IHUBHgxcFI9BxI+w==", "requires": { - "@sentry/types": "6.2.1", + "@sentry/types": "6.2.2", "tslib": "^1.9.3" } }, diff --git a/package.json b/package.json index dc08bce183..4164fbbf98 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@opengovsg/ng-file-upload": "^12.2.15", "@opengovsg/spcp-auth-client": "^1.4.2", "@sentry/browser": "^6.2.1", - "@sentry/integrations": "^6.2.1", + "@sentry/integrations": "^6.2.2", "@stablelib/base64": "^1.0.0", "JSONStream": "^1.3.5", "abortcontroller-polyfill": "^1.7.1", From 397cf0384bd008696b794b6edcd752a652d1edb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 11:42:11 +0800 Subject: [PATCH 13/28] chore(deps-dev): bump @opengovsg/mockpass from 2.6.5 to 2.6.6 (#1359) Bumps [@opengovsg/mockpass](https://github.com/opengovsg/mockpass) from 2.6.5 to 2.6.6. - [Release notes](https://github.com/opengovsg/mockpass/releases) - [Commits](https://github.com/opengovsg/mockpass/compare/v2.6.5...v2.6.6) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 20 ++++++++++---------- package.json | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 035f2e62af..b417965514 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4222,9 +4222,9 @@ } }, "@opengovsg/mockpass": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/@opengovsg/mockpass/-/mockpass-2.6.5.tgz", - "integrity": "sha512-5/V29lr5mEHSG5A1Tsok3palmHnVzqPHCjvxjjH7ey6/Hf6wsCJ7LUZcTR213cyfH/SLM55nYF5quBpcalQd6w==", + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/@opengovsg/mockpass/-/mockpass-2.6.6.tgz", + "integrity": "sha512-JARvdTNQfaHVR68Y3NeCrFpik97BQ0NjdYdr9x/WTOQagWPqecDDsWE0mmF0yFtFQ1olFLP6XfSY8AfRf1/wPw==", "dev": true, "requires": { "base-64": "^1.0.0", @@ -4241,7 +4241,7 @@ "uuid": "^8.0.0", "xml-crypto": "^2.0.0", "xml-encryption": "^1.2.0", - "xmldom": "^0.4.0", + "xmldom": "^0.5.0", "xpath": "0.0.32" }, "dependencies": { @@ -25716,9 +25716,9 @@ } }, "xml-encryption": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-1.2.1.tgz", - "integrity": "sha512-hn5w3l5p2+nGjlmM0CAhMChDzVGhW+M37jH35Z+GJIipXbn9PUlAIRZ6I5Wm7ynlqZjFrMAr83d/CIp9VZJMTA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-1.2.2.tgz", + "integrity": "sha512-s0Fax5BpCZqLzYGtlmilUoi/kyhj8dHqaMOvTAQLifkDS4QVfIuBqhEj9POtk3YbZ0tSxp/hvbGj3iCOM1ej8w==", "dev": true, "requires": { "escape-html": "^1.0.3", @@ -25767,9 +25767,9 @@ "dev": true }, "xmldom": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.4.0.tgz", - "integrity": "sha512-2E93k08T30Ugs+34HBSTQLVtpi6mCddaY8uO+pMNk1pqSjV5vElzn4mmh6KLxN3hki8rNcHSYzILoh3TEWORvA==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.5.0.tgz", + "integrity": "sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA==", "dev": true }, "xmlhttprequest-ssl": { diff --git a/package.json b/package.json index 4164fbbf98..1b498b87fd 100644 --- a/package.json +++ b/package.json @@ -161,7 +161,7 @@ "@babel/core": "^7.13.10", "@babel/plugin-transform-runtime": "^7.13.10", "@babel/preset-env": "^7.13.10", - "@opengovsg/mockpass": "^2.6.5", + "@opengovsg/mockpass": "^2.6.6", "@types/bcrypt": "^3.0.0", "@types/bluebird": "^3.5.33", "@types/busboy": "^0.2.3", From 1083aa18d8836e59f186ac9368e420b3983cd93f Mon Sep 17 00:00:00 2001 From: tshuli <63710093+tshuli@users.noreply.github.com> Date: Mon, 15 Mar 2021 13:05:25 +0800 Subject: [PATCH 14/28] test: jest tests for mobile number validation, including signature validation (#1349) --- .../backend/helpers/generate-form-data.ts | 13 +- .../mobile-num-validation.spec.ts | 201 ++++++++++++++++++ 2 files changed, 213 insertions(+), 1 deletion(-) create mode 100644 tests/unit/backend/utils/field-validation/mobile-num-validation.spec.ts diff --git a/tests/unit/backend/helpers/generate-form-data.ts b/tests/unit/backend/helpers/generate-form-data.ts index 5142792d6c..5d61c33033 100644 --- a/tests/unit/backend/helpers/generate-form-data.ts +++ b/tests/unit/backend/helpers/generate-form-data.ts @@ -21,6 +21,8 @@ import { IField, IFieldSchema, IImageFieldSchema, + IMobileField, + IMobileFieldSchema, IShortTextFieldSchema, ISingleAnswerResponse, ITableFieldSchema, @@ -28,7 +30,9 @@ import { export const generateDefaultField = ( fieldType: BasicField, - customParams?: Partial, + customParams?: Partial< + IField | IAttachmentField | ICheckboxField | IMobileField + >, ): IFieldSchema => { const defaultParams = { title: `test ${fieldType} field title`, @@ -108,6 +112,13 @@ export const generateDefaultField = ( getQuestion: () => defaultParams.title, ...customParams, } as IDecimalFieldSchema + case BasicField.Mobile: + return { + ...defaultParams, + allowIntlNumbers: false, + getQuestion: () => defaultParams.title, + ...customParams, + } as IMobileFieldSchema default: return { ...defaultParams, diff --git a/tests/unit/backend/utils/field-validation/mobile-num-validation.spec.ts b/tests/unit/backend/utils/field-validation/mobile-num-validation.spec.ts new file mode 100644 index 0000000000..e9d727ec74 --- /dev/null +++ b/tests/unit/backend/utils/field-validation/mobile-num-validation.spec.ts @@ -0,0 +1,201 @@ +import { ValidateFieldError } from 'src/app/modules/submission/submission.errors' +import { validateField } from 'src/app/utils/field-validation' +import formsgSdk from 'src/config/formsg-sdk' +import { IFieldSchema } from 'src/types' +import { BasicField } from 'src/types/field/fieldTypes' + +import { + generateDefaultField, + generateNewSingleAnswerResponse, +} from '../../helpers/generate-form-data' + +type VerificationMock = { + authenticate: () => boolean +} + +describe('Mobile number validation tests', () => { + beforeEach(() => { + jest + .spyOn( + (formsgSdk.verification as unknown) as VerificationMock, + 'authenticate', + ) + .mockImplementation(() => true) + }) + + it('should allow empty answer for required logic field that is not visible', () => { + const formField = generateDefaultField(BasicField.Mobile) + const response = generateNewSingleAnswerResponse(BasicField.Mobile, { + answer: '', + isVisible: false, + }) + + const validateResult = validateField( + 'formId', + formField as IFieldSchema, + response, + ) + expect(validateResult.isOk()).toBe(true) + expect(validateResult._unsafeUnwrap()).toEqual(true) + }) + + it('should allow empty answer for optional field', () => { + const formField = generateDefaultField(BasicField.Mobile, { + required: false, + }) + const response = generateNewSingleAnswerResponse(BasicField.Mobile, { + answer: '', + }) + + const validateResult = validateField('formId', formField, response) + expect(validateResult.isOk()).toBe(true) + expect(validateResult._unsafeUnwrap()).toEqual(true) + }) + + it('should not allow empty answer for required field', () => { + const formField = generateDefaultField(BasicField.Mobile) + const response = generateNewSingleAnswerResponse(BasicField.Mobile, { + answer: '', + }) + + const validateResult = validateField('formId', formField, response) + expect(validateResult.isErr()).toBe(true) + expect(validateResult._unsafeUnwrapErr()).toEqual( + new ValidateFieldError('Invalid answer submitted'), + ) + }) + + it('should allow valid mobile numbers for mobile fieldType', () => { + const formField = generateDefaultField(BasicField.Mobile) + const response = generateNewSingleAnswerResponse(BasicField.Mobile, { + answer: '+6598765432', + }) + + const validateResult = validateField('formId', formField, response) + expect(validateResult.isOk()).toBe(true) + expect(validateResult._unsafeUnwrap()).toEqual(true) + }) + + it('should disallow mobile numbers without "+" prefix', () => { + const formField = generateDefaultField(BasicField.Mobile) + const response = generateNewSingleAnswerResponse(BasicField.Mobile, { + answer: '6598765432', + }) + + const validateResult = validateField('formId', formField, response) + expect(validateResult.isErr()).toBe(true) + expect(validateResult._unsafeUnwrapErr()).toEqual( + new ValidateFieldError('Invalid answer submitted'), + ) + }) + + it('should disallow home numbers on mobile fieldType', () => { + const formField = generateDefaultField(BasicField.Mobile) + const response = generateNewSingleAnswerResponse(BasicField.Mobile, { + answer: '+6565656565', + }) + + const validateResult = validateField('formId', formField, response) + expect(validateResult.isErr()).toBe(true) + expect(validateResult._unsafeUnwrapErr()).toEqual( + new ValidateFieldError('Invalid answer submitted'), + ) + }) + + it('should disallow international numbers when field does not allow for it', () => { + const formField = generateDefaultField(BasicField.Mobile) + const response = generateNewSingleAnswerResponse(BasicField.Mobile, { + answer: '+447851315617', + }) + + const validateResult = validateField('formId', formField, response) + expect(validateResult.isErr()).toBe(true) + expect(validateResult._unsafeUnwrapErr()).toEqual( + new ValidateFieldError('Invalid answer submitted'), + ) + }) + + it('should allow international numbers when field allows for it', () => { + const formField = generateDefaultField(BasicField.Mobile, { + allowIntlNumbers: true, + }) + const response = generateNewSingleAnswerResponse(BasicField.Mobile, { + answer: '+447851315617', + }) + + const validateResult = validateField('formId', formField, response) + expect(validateResult.isOk()).toBe(true) + expect(validateResult._unsafeUnwrap()).toEqual(true) + }) + it('should disallow responses submitted for hidden fields', () => { + const formField = generateDefaultField(BasicField.Mobile, { + allowIntlNumbers: true, + }) + const response = generateNewSingleAnswerResponse(BasicField.Mobile, { + answer: '+447851315617', + isVisible: false, + }) + + const validateResult = validateField('formId', formField, response) + expect(validateResult.isErr()).toBe(true) + expect(validateResult._unsafeUnwrapErr()).toEqual( + new ValidateFieldError('Attempted to submit response on a hidden field'), + ) + }) + + describe('signature validation', () => { + it('should allow mobile numbers if isVerifiable is true and signature is present and valid', () => { + const formField = generateDefaultField(BasicField.Mobile, { + isVerifiable: true, + }) + const response = generateNewSingleAnswerResponse(BasicField.Mobile, { + answer: '', + signature: 'some signature', + }) + + const validateResult = validateField('formId', formField, response) + expect(validateResult.isErr()).toBe(true) + expect(validateResult._unsafeUnwrapErr()).toEqual( + new ValidateFieldError('Invalid answer submitted'), + ) + }) + + it('should reject mobile numbers if isVerifiable is true but there is no signature present', () => { + const formField = generateDefaultField(BasicField.Mobile, { + isVerifiable: true, + }) + const response = generateNewSingleAnswerResponse(BasicField.Mobile, { + answer: '', + }) + + const validateResult = validateField('formId', formField, response) + expect(validateResult.isErr()).toBe(true) + expect(validateResult._unsafeUnwrapErr()).toEqual( + new ValidateFieldError('Invalid answer submitted'), + ) + }) + + it('should reject mobile numbers if isVerifiable is true and signature is present but invalid', () => { + jest + .spyOn( + (formsgSdk.verification as unknown) as VerificationMock, + 'authenticate', + ) + .mockImplementation(() => false) + + const formField = generateDefaultField(BasicField.Mobile, { + isVerifiable: true, + }) + const response = generateNewSingleAnswerResponse(BasicField.Mobile, { + answer: '', + signature: 'some invalid signature', + }) + + const validateResult = validateField('formId', formField, response) + expect(validateResult.isErr()).toBe(true) + expect(validateResult._unsafeUnwrapErr()).toEqual( + new ValidateFieldError('Invalid answer submitted'), + ) + }) + }) +}) From 9d07aa95787556f51688a242146af6d7154d44eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 13:50:53 +0800 Subject: [PATCH 15/28] chore(deps-dev): bump @types/node from 14.14.33 to 14.14.34 (#1364) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.33 to 14.14.34. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b417965514..2e194e8cfc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4889,9 +4889,9 @@ "dev": true }, "@types/node": { - "version": "14.14.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.33.tgz", - "integrity": "sha512-oJqcTrgPUF29oUP8AsUqbXGJNuPutsetaa9kTQAQce5Lx5dTYWV02ScBiT/k1BX/Z7pKeqedmvp39Wu4zR7N7g==" + "version": "14.14.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.34.tgz", + "integrity": "sha512-dBPaxocOK6UVyvhbnpFIj2W+S+1cBTkHQbFQfeeJhoKFbzYcVUGHvddeWPSucKATb3F0+pgDq0i6ghEaZjsugA==" }, "@types/nodemailer": { "version": "6.4.0", diff --git a/package.json b/package.json index 1b498b87fd..03ec79e0f5 100644 --- a/package.json +++ b/package.json @@ -182,7 +182,7 @@ "@types/json-stringify-safe": "^5.0.0", "@types/mongodb": "^3.6.9", "@types/mongodb-uri": "^0.9.0", - "@types/node": "^14.14.33", + "@types/node": "^14.14.34", "@types/nodemailer": "^6.4.0", "@types/nodemailer-direct-transport": "^1.0.31", "@types/opossum": "^4.1.1", From 80d0bf08ae4fe3e1f11abb1c130ca66b09706f34 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 13:55:21 +0800 Subject: [PATCH 16/28] fix(deps): bump @sentry/browser from 6.2.1 to 6.2.2 (#1358) Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.2.1 to 6.2.2. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/6.2.1...6.2.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 103 +++++++++++----------------------------------- package.json | 2 +- 2 files changed, 25 insertions(+), 80 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e194e8cfc..3dadd607f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4328,84 +4328,36 @@ } }, "@sentry/browser": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-6.2.1.tgz", - "integrity": "sha512-OAikFZ9EimD3noxMp8tA6Cf6qJcQ2U8k5QSgTPwdx+09nZOGJzbRFteK7WWmrS93ZJdzN61lpSQbg5v+bmmfbQ==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-6.2.2.tgz", + "integrity": "sha512-K5UGyEePtVPZIFMoiRafhd4Ov0M1kdozVsVKIPZrOpJyjQdPNX+fYDNL/h0nVmgOlE2S/uu4fl4mEfe/6aLShw==", "requires": { - "@sentry/core": "6.2.1", - "@sentry/types": "6.2.1", - "@sentry/utils": "6.2.1", + "@sentry/core": "6.2.2", + "@sentry/types": "6.2.2", + "@sentry/utils": "6.2.2", "tslib": "^1.9.3" - }, - "dependencies": { - "@sentry/types": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.2.1.tgz", - "integrity": "sha512-h0OV1QT+fv5ojfK5/+iEXClu33HirmvbjcQC2jf05IHj9yXIOWy6EB10S8nBjuLiiFqQiAQYj3FN9Ip4eN8NJA==" - }, - "@sentry/utils": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-6.2.1.tgz", - "integrity": "sha512-6kQgM/yBPdXu+3qbJnI6HBcWztN9QfiMkH++ZiKk4ERhg9d2LYWlze478uTU5Fyo/JQYcp+McpjtjpR9QIrr0g==", - "requires": { - "@sentry/types": "6.2.1", - "tslib": "^1.9.3" - } - } } }, "@sentry/core": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-6.2.1.tgz", - "integrity": "sha512-jPqQEtafxxDtLONhCbTHh/Uq8mZRhsfbwJTSVYfPVEe/ELfFZLQK7tP6rOh7zEWKbTkE0mE6XcaoH3ZRAhgrqg==", - "requires": { - "@sentry/hub": "6.2.1", - "@sentry/minimal": "6.2.1", - "@sentry/types": "6.2.1", - "@sentry/utils": "6.2.1", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-6.2.2.tgz", + "integrity": "sha512-qqWbvvXtymfXh7N5eEvk97MCnMURuyFIgqWdVD4MQM6yIfDCy36CyGfuQ3ViHTLZGdIfEOhLL9/f4kzf1RzqBA==", + "requires": { + "@sentry/hub": "6.2.2", + "@sentry/minimal": "6.2.2", + "@sentry/types": "6.2.2", + "@sentry/utils": "6.2.2", "tslib": "^1.9.3" - }, - "dependencies": { - "@sentry/types": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.2.1.tgz", - "integrity": "sha512-h0OV1QT+fv5ojfK5/+iEXClu33HirmvbjcQC2jf05IHj9yXIOWy6EB10S8nBjuLiiFqQiAQYj3FN9Ip4eN8NJA==" - }, - "@sentry/utils": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-6.2.1.tgz", - "integrity": "sha512-6kQgM/yBPdXu+3qbJnI6HBcWztN9QfiMkH++ZiKk4ERhg9d2LYWlze478uTU5Fyo/JQYcp+McpjtjpR9QIrr0g==", - "requires": { - "@sentry/types": "6.2.1", - "tslib": "^1.9.3" - } - } } }, "@sentry/hub": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-6.2.1.tgz", - "integrity": "sha512-pG7wCQeRpzeP6t0bT4T0X029R19dbDS3/qswF8BL6bg0AI3afjfjBAZm/fqn1Uwe/uBoMHVVdbxgJDZeQ5d4rQ==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-6.2.2.tgz", + "integrity": "sha512-VR6uQGRYt6RP633FHShlSLj0LUKGVrlTeSlwCoooWM5FR9lmi6akAaweuxpG78/kZvXrAWpjX6/nuYwHKGwzGA==", "requires": { - "@sentry/types": "6.2.1", - "@sentry/utils": "6.2.1", + "@sentry/types": "6.2.2", + "@sentry/utils": "6.2.2", "tslib": "^1.9.3" - }, - "dependencies": { - "@sentry/types": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.2.1.tgz", - "integrity": "sha512-h0OV1QT+fv5ojfK5/+iEXClu33HirmvbjcQC2jf05IHj9yXIOWy6EB10S8nBjuLiiFqQiAQYj3FN9Ip4eN8NJA==" - }, - "@sentry/utils": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-6.2.1.tgz", - "integrity": "sha512-6kQgM/yBPdXu+3qbJnI6HBcWztN9QfiMkH++ZiKk4ERhg9d2LYWlze478uTU5Fyo/JQYcp+McpjtjpR9QIrr0g==", - "requires": { - "@sentry/types": "6.2.1", - "tslib": "^1.9.3" - } - } } }, "@sentry/integrations": { @@ -4420,20 +4372,13 @@ } }, "@sentry/minimal": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.2.1.tgz", - "integrity": "sha512-wuSXB4Ayxv9rBEQ4pm7fnG4UU2ZPtPnnChoEfd4/mw1UthXSvmPFEn6O4pdo2G8fTkl8eqm6wT/Q7uIXMEmw+A==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.2.2.tgz", + "integrity": "sha512-l0IgoGQgg1lTd4qDU8bQn25sbZBg8PwIHfuTLbGMlRr1flDXHOM1UXajWK/UKbAPelnU7M2JBSVzgl7PwjprzA==", "requires": { - "@sentry/hub": "6.2.1", - "@sentry/types": "6.2.1", + "@sentry/hub": "6.2.2", + "@sentry/types": "6.2.2", "tslib": "^1.9.3" - }, - "dependencies": { - "@sentry/types": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.2.1.tgz", - "integrity": "sha512-h0OV1QT+fv5ojfK5/+iEXClu33HirmvbjcQC2jf05IHj9yXIOWy6EB10S8nBjuLiiFqQiAQYj3FN9Ip4eN8NJA==" - } } }, "@sentry/types": { diff --git a/package.json b/package.json index 03ec79e0f5..ad7415d4b3 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opengovsg/myinfo-gov-client": "=4.0.0-beta.0", "@opengovsg/ng-file-upload": "^12.2.15", "@opengovsg/spcp-auth-client": "^1.4.2", - "@sentry/browser": "^6.2.1", + "@sentry/browser": "^6.2.2", "@sentry/integrations": "^6.2.2", "@stablelib/base64": "^1.0.0", "JSONStream": "^1.3.5", From f60fdba57ee68d02a9779ade0068432725b3006f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 14:04:14 +0800 Subject: [PATCH 17/28] fix(deps): bump connect-mongo from 4.3.1 to 4.4.0 (#1357) Bumps [connect-mongo](https://github.com/jdesboeufs/connect-mongo) from 4.3.1 to 4.4.0. - [Release notes](https://github.com/jdesboeufs/connect-mongo/releases) - [Changelog](https://github.com/jdesboeufs/connect-mongo/blob/master/CHANGELOG.md) - [Commits](https://github.com/jdesboeufs/connect-mongo/compare/v4.3.1...v4.4.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3dadd607f4..04a551b71a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8238,9 +8238,9 @@ } }, "connect-mongo": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-4.3.1.tgz", - "integrity": "sha512-R8X9vQ3ahHLd9ZYzjKbtfnGdW/ReY6EmjJv1IOKaT3v9ZJQdV1cE6peDBoNW4Pd2XmNqOVCywvy2ov2a5/Cnsg==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-4.4.0.tgz", + "integrity": "sha512-TTv9SUeLazm7eAvrzDfcIbiRcgeK8Dhif6XLDxnL41S3/1+EtFUgdI+kx6lcZtEdobMY/ehLWtJ6+WTXtsQDvg==", "requires": { "debug": "^4.3.1", "kruptein": "^3.0.0", diff --git a/package.json b/package.json index ad7415d4b3..14c894e093 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "busboy": "^0.3.1", "celebrate": "^13.0.4", "compression": "~1.7.2", - "connect-mongo": "^4.3.1", + "connect-mongo": "^4.4.0", "convict": "^6.0.0", "convict-format-with-validator": "^6.0.0", "cookie-parser": "~1.4.0", From ad23e07b1fc09c5e508ab15ed7022145f58946ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 18:56:04 +0800 Subject: [PATCH 18/28] chore(deps-dev): bump ngrok from 3.4.0 to 3.4.1 (#1363) Bumps [ngrok](https://github.com/bubenshchykov/ngrok) from 3.4.0 to 3.4.1. - [Release notes](https://github.com/bubenshchykov/ngrok/releases) - [Changelog](https://github.com/bubenshchykov/ngrok/blob/master/CHANGELOG.md) - [Commits](https://github.com/bubenshchykov/ngrok/compare/v3.4.0...v3.4.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 04a551b71a..7da0315316 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9343,9 +9343,9 @@ } }, "decompress-zip": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.3.2.tgz", - "integrity": "sha512-Ab1QY4LrWMrUuo53lLnmGOby7v8ryqxJ+bKibKSiPisx+25mhut1dScVBXAYx14i/PqSrFZvR2FRRazhLbvL+g==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.3.3.tgz", + "integrity": "sha512-/fy1L4s+4jujqj3kNptWjilFw3E6De8U6XUFvqmh4npN3Vsypm3oT2V0bXcmbBWS+5j5tr4okYaFrOmyZkszEg==", "dev": true, "requires": { "binary": "^0.3.0", @@ -17544,9 +17544,9 @@ } }, "ngrok": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ngrok/-/ngrok-3.4.0.tgz", - "integrity": "sha512-fwgYlGQsLclMRVkGNhdWbeE5xx/xCoKr8zHoqRehOxGu4Ep14dAfe1u45rE0rqtUhWqTVfCl1lWV2rLUNizIDw==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/ngrok/-/ngrok-3.4.1.tgz", + "integrity": "sha512-OTm6Nmi6JINPbzkZff8ysA2WqMeNDg3sOPMFHW2CpatVD5yJxmX1qdyLq3QYNACTKNB3/K9jTkG4wUVpAFX9Dw==", "dev": true, "requires": { "@types/node": "^8.10.50", diff --git a/package.json b/package.json index 14c894e093..0d8a90ade1 100644 --- a/package.json +++ b/package.json @@ -232,7 +232,7 @@ "mockdate": "^3.0.2", "mockingoose": "^2.13.2", "mongodb-memory-server-core": "^6.9.6", - "ngrok": "^3.4.0", + "ngrok": "^3.4.1", "optimize-css-assets-webpack-plugin": "^5.0.1", "prettier": "^2.2.1", "proxyquire": "^2.1.3", From 99fc54d3851d0db905910ecbd9bb78b2dee9bcb9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 18:56:14 +0800 Subject: [PATCH 19/28] fix(deps): bump aws-sdk from 2.861.0 to 2.863.0 (#1367) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.861.0 to 2.863.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.861.0...v2.863.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7da0315316..8c36b6931a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6231,9 +6231,9 @@ "integrity": "sha512-24q5Rh3bno7ldoyCq99d6hpnLI+PAMocdeVaaGt/5BTQMprvDwQToHfNnruqN11odCHZZIQbRBw+nZo1lTCH9g==" }, "aws-sdk": { - "version": "2.861.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.861.0.tgz", - "integrity": "sha512-qb7YttyMLk0URhbNWBBZQZXDhKJy/url1GYeIlfgpQ/JQC5B2tOuJ66fPBoHyDuV6B9CQv/UorRFw1n15lvSEw==", + "version": "2.863.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.863.0.tgz", + "integrity": "sha512-krr0047EOl9qpRdhPoyYxI7+viVUpX+t+Vjbf+alXdOE172DC+hFi8y6egIM1xVV4KkMFm0y0EykBWgA93XNNA==", "requires": { "buffer": "4.9.2", "events": "1.1.1", diff --git a/package.json b/package.json index 0d8a90ade1..a8644b71f1 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "angular-ui-bootstrap": "~2.5.6", "angular-ui-router": "~1.0.29", "aws-info": "^1.2.0", - "aws-sdk": "^2.861.0", + "aws-sdk": "^2.863.0", "axios": "^0.21.1", "bcrypt": "^5.0.1", "bluebird": "^3.5.2", From d58060a139e56cfccb93e5dca8ed6ba788281c47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 18:56:23 +0800 Subject: [PATCH 20/28] chore(deps-dev): bump eslint-plugin-jest from 24.2.1 to 24.3.1 (#1368) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.2.1 to 24.3.1. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v24.2.1...v24.3.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c36b6931a..e34aa212b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10764,9 +10764,9 @@ } }, "eslint-plugin-jest": { - "version": "24.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.2.1.tgz", - "integrity": "sha512-s24ve8WUu3DLVidvlSzaqlOpTZre9lTkZTAO+a7X0WMtj8HraWTiTEkW3pbDT1xVxqEHMWSv+Kx7MyqR50nhBw==", + "version": "24.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.3.1.tgz", + "integrity": "sha512-RQt59rfMSHyvedImT72iaf8JcvCcR4P7Uq499dALtjY8mrCjbwWrFi1UceG4sid2wVIeDi+0tjxXZ8CZEVO7Zw==", "dev": true, "requires": { "@typescript-eslint/experimental-utils": "^4.0.1" diff --git a/package.json b/package.json index a8644b71f1..42b43170ca 100644 --- a/package.json +++ b/package.json @@ -210,7 +210,7 @@ "eslint-config-prettier": "^8.1.0", "eslint-plugin-angular": "^4.0.1", "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jest": "^24.2.1", + "eslint-plugin-jest": "^24.3.1", "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-simple-import-sort": "^7.0.0", "eslint-plugin-typesafe": "^0.5.2", From ce4721961b9d0aac2115cf3006eacb506275edc4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 20:12:18 +0800 Subject: [PATCH 21/28] chore(deps-dev): bump @types/convict from 6.0.0 to 6.0.1 (#1371) Bumps [@types/convict](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/convict) from 6.0.0 to 6.0.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/convict) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index e34aa212b8..5338c735bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4593,9 +4593,9 @@ } }, "@types/convict": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@types/convict/-/convict-6.0.0.tgz", - "integrity": "sha512-gsnncleqmOLAljYkiiMT42RkApclPwNK3a2Eak/zWLA3tTRZievNpJ6AJt/2oV5joc68bYgdL/Iz25iHJ0utlA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@types/convict/-/convict-6.0.1.tgz", + "integrity": "sha512-5094Bw9nSvkUNV7qqUvzDt6lgWZpKbpR/AJu8lmtojKa12nxtHHGrPFwK3YP4YZA1rCc2tbpI5TUEBU35eqVxg==", "dev": true, "requires": { "@types/node": "*" diff --git a/package.json b/package.json index 42b43170ca..7be0ff74e7 100644 --- a/package.json +++ b/package.json @@ -166,7 +166,7 @@ "@types/bluebird": "^3.5.33", "@types/busboy": "^0.2.3", "@types/compression": "^1.7.0", - "@types/convict": "^6.0.0", + "@types/convict": "^6.0.1", "@types/cookie-parser": "^1.4.2", "@types/dedent": "^0.7.0", "@types/ejs": "^3.0.6", From f01d9cb0e9b84950ddf7c934e09a3d530f393b76 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 20:12:57 +0800 Subject: [PATCH 22/28] fix(deps): bump convict-format-with-validator from 6.0.0 to 6.0.1 (#1369) Bumps [convict-format-with-validator](https://github.com/mozilla/node-convict) from 6.0.0 to 6.0.1. - [Release notes](https://github.com/mozilla/node-convict/releases) - [Changelog](https://github.com/mozilla/node-convict/blob/master/CHANGELOG.md) - [Commits](https://github.com/mozilla/node-convict/compare/v6.0.0...v6.0.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5338c735bb..ba0c62f8aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8327,9 +8327,9 @@ } }, "convict-format-with-validator": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/convict-format-with-validator/-/convict-format-with-validator-6.0.0.tgz", - "integrity": "sha512-3E8cLYkHKQDTCF4MYOzReVeHrObfulUR5hw/Ur/hE/CPwXRcJHZO7Jt0JyE86IpvAZsgrOjMpVy93USjrubVqg==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/convict-format-with-validator/-/convict-format-with-validator-6.0.1.tgz", + "integrity": "sha512-6/O0W9/0MESdL+0fY7glQlWHs+wnP9xXlB1tjY/Wb9ujCCEBqMP8VCjtLvRlBdfwgONrpb+DTPSHQRhUO5aTlQ==", "requires": { "validator": "^11.1.0" }, diff --git a/package.json b/package.json index 7be0ff74e7..3fbb932938 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "compression": "~1.7.2", "connect-mongo": "^4.4.0", "convict": "^6.0.0", - "convict-format-with-validator": "^6.0.0", + "convict-format-with-validator": "^6.0.1", "cookie-parser": "~1.4.0", "css-toggle-switch": "^4.1.0", "csv-string": "^4.0.1", From bd812c22b3b7a1753c1a07db641e74d31add4407 Mon Sep 17 00:00:00 2001 From: tshuli <63710093+tshuli@users.noreply.github.com> Date: Tue, 16 Mar 2021 09:31:01 +0800 Subject: [PATCH 23/28] feat: use isPossible for phone number validation (#1317) --- src/shared/util/phone-num-validation.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/shared/util/phone-num-validation.ts b/src/shared/util/phone-num-validation.ts index dbf151ea2e..3155f371ee 100644 --- a/src/shared/util/phone-num-validation.ts +++ b/src/shared/util/phone-num-validation.ts @@ -12,12 +12,7 @@ export const isPhoneNumber = (phoneNumber: string): boolean => { return false } - // Using isPossible() only for SG numbers due to some valid SG numbers - // being marked as invalid due to its newness. - if (parsedNumber.countryCallingCode === '65') { - return parsedNumber.isPossible() - } - return parsedNumber.isValid() + return parsedNumber.isPossible() } /** From f64b07ce31fa6edcf90a823f9230c7c1d871d01e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Mar 2021 10:00:49 +0800 Subject: [PATCH 24/28] chore(deps-dev): bump eslint from 7.21.0 to 7.22.0 (#1375) Bumps [eslint](https://github.com/eslint/eslint) from 7.21.0 to 7.22.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.21.0...v7.22.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 39 ++++++++++++--------------------------- package.json | 2 +- 2 files changed, 13 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index ba0c62f8aa..0e9964368d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10271,9 +10271,9 @@ } }, "eslint": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.21.0.tgz", - "integrity": "sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg==", + "version": "7.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz", + "integrity": "sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", @@ -10293,7 +10293,7 @@ "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -10301,7 +10301,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.20", + "lodash": "^4.17.21", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -10331,9 +10331,9 @@ "dev": true }, "@babel/highlight": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", - "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -10458,22 +10458,13 @@ } } }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.6.0.tgz", + "integrity": "sha512-YFKCX0SiPg7l5oKYCJ2zZGxcXprVXHcSnVuvzrT3oSENQonVLqM5pf9fN5dLGZGyCjhw8TN8Btwe/jKnZ0pjvQ==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, "has-flag": { @@ -10581,12 +10572,6 @@ "prelude-ls": "^1.2.1" } }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 3fbb932938..13397be3d8 100644 --- a/package.json +++ b/package.json @@ -206,7 +206,7 @@ "css-loader": "^2.1.1", "csv-parse": "^4.15.3", "env-cmd": "^10.1.0", - "eslint": "^7.21.0", + "eslint": "^7.22.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-angular": "^4.0.1", "eslint-plugin-import": "^2.22.1", From c19888022c63f41157f710e8a6df7bd777c4d9db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Mar 2021 10:01:00 +0800 Subject: [PATCH 25/28] chore(deps-dev): bump mockdate from 3.0.2 to 3.0.3 (#1374) Bumps [mockdate](https://github.com/boblauer/MockDate) from 3.0.2 to 3.0.3. - [Release notes](https://github.com/boblauer/MockDate/releases) - [Changelog](https://github.com/boblauer/MockDate/blob/master/CHANGELOG.md) - [Commits](https://github.com/boblauer/MockDate/compare/v3.0.2...v3.0.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0e9964368d..23b3790072 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16942,9 +16942,9 @@ "dev": true }, "mockdate": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mockdate/-/mockdate-3.0.2.tgz", - "integrity": "sha512-ldfYSUW1ocqSHGTK6rrODUiqAFPGAg0xaHqYJ5tvj1hQyFsjuHpuWgWFTZWwDVlzougN/s2/mhDr8r5nY5xDpA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/mockdate/-/mockdate-3.0.3.tgz", + "integrity": "sha512-4h01Zjz0Cm57mQsEzaoZtjGzqZk15YS4yujc5k4xGGNQYaxlaJSaNZ20FkFhFWjv6YB7ZyU8+UioB8l6Fw892Q==", "dev": true }, "mockingoose": { diff --git a/package.json b/package.json index 13397be3d8..54661e85e7 100644 --- a/package.json +++ b/package.json @@ -229,7 +229,7 @@ "lint-staged": "^10.5.4", "maildev": "^1.1.0", "mini-css-extract-plugin": "^0.5.0", - "mockdate": "^3.0.2", + "mockdate": "^3.0.3", "mockingoose": "^2.13.2", "mongodb-memory-server-core": "^6.9.6", "ngrok": "^3.4.1", From eec026298026a900916bb901a9ed6282c9739b39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Mar 2021 10:01:08 +0800 Subject: [PATCH 26/28] chore(deps-dev): bump @types/nodemailer from 6.4.0 to 6.4.1 (#1373) Bumps [@types/nodemailer](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/nodemailer) from 6.4.0 to 6.4.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/nodemailer) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 23b3790072..0dc9e98178 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4839,9 +4839,9 @@ "integrity": "sha512-dBPaxocOK6UVyvhbnpFIj2W+S+1cBTkHQbFQfeeJhoKFbzYcVUGHvddeWPSucKATb3F0+pgDq0i6ghEaZjsugA==" }, "@types/nodemailer": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-6.4.0.tgz", - "integrity": "sha512-KY7bFWB0MahRZvVW4CuW83qcCDny59pJJ0MQ5ifvfcjNwPlIT0vW4uARO4u1gtkYnWdhSvURegecY/tzcukJcA==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-6.4.1.tgz", + "integrity": "sha512-8081UY/0XTTDpuGqCnDc8IY+Q3DSg604wB3dBH0CaZlj4nZWHWuxtZ3NRZ9c9WUrz1Vfm6wioAUnqL3bsh49uQ==", "dev": true, "requires": { "@types/node": "*" diff --git a/package.json b/package.json index 54661e85e7..d1c5028445 100644 --- a/package.json +++ b/package.json @@ -183,7 +183,7 @@ "@types/mongodb": "^3.6.9", "@types/mongodb-uri": "^0.9.0", "@types/node": "^14.14.34", - "@types/nodemailer": "^6.4.0", + "@types/nodemailer": "^6.4.1", "@types/nodemailer-direct-transport": "^1.0.31", "@types/opossum": "^4.1.1", "@types/promise-retry": "^1.1.3", From ef6bd4c55a74303cc09421d0c4a164b58d20539a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Mar 2021 10:01:22 +0800 Subject: [PATCH 27/28] fix(deps): bump @opengovsg/spcp-auth-client from 1.4.2 to 1.4.3 (#1370) Bumps [@opengovsg/spcp-auth-client](https://github.com/opengovsg/spcp-auth-client) from 1.4.2 to 1.4.3. - [Release notes](https://github.com/opengovsg/spcp-auth-client/releases) - [Commits](https://github.com/opengovsg/spcp-auth-client/compare/v1.4.2...v1.4.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 41 ++++++++++++++--------------------------- package.json | 2 +- 2 files changed, 15 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0dc9e98178..a04fdc2ecf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4277,37 +4277,30 @@ "integrity": "sha512-YqR6GIsum9K7Cg6wOTxwJnKP+KDOxbZ9dnQE2/M47vP0ynXyTadvwflGBukzJ/MhzrS2R6buNhFjFnVJRXJinw==" }, "@opengovsg/spcp-auth-client": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@opengovsg/spcp-auth-client/-/spcp-auth-client-1.4.2.tgz", - "integrity": "sha512-mpfiapWknNW2+5A5r9NVjPz3r3KRD3jtIcHaKljd895FPgR0gzbY3bQBTiPSbeNATJphqqwLdsZmf2/EsCgs6w==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@opengovsg/spcp-auth-client/-/spcp-auth-client-1.4.3.tgz", + "integrity": "sha512-QNJE9Gl8lX+wqvYDme5TLM50S0cTqf/UAzHCdMAKHzl9mwf1hshFcfCBU1g45iYmN2tvj8xNHyXyrYWhUSo0cA==", "requires": { "base-64": "^1.0.0", "jsonwebtoken": "^8.3.0", "lodash": "^4.17.21", "request": "^2.88.2", - "xml-crypto": "^2.0.0", + "xml-crypto": "^2.1.0", "xml-encryption": "^1.2.2", "xml2json-light": "^1.0.6", "xmldom": "^0.5.0", "xpath": "0.0.32" }, "dependencies": { - "xml-encryption": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-1.2.2.tgz", - "integrity": "sha512-s0Fax5BpCZqLzYGtlmilUoi/kyhj8dHqaMOvTAQLifkDS4QVfIuBqhEj9POtk3YbZ0tSxp/hvbGj3iCOM1ej8w==", + "xml-crypto": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-2.1.0.tgz", + "integrity": "sha512-vDYaNYe5nq5ofb+rqdlIuSjojIDhifBOX8bfUcjJK3pB50qz3Uz50voKklaARvEjkGdbIMnNpt39Glrjx4ieuw==", "requires": { - "escape-html": "^1.0.3", - "node-forge": "^0.10.0", - "xmldom": "~0.1.15", + "xmldom": "0.5.0", "xpath": "0.0.27" }, "dependencies": { - "xmldom": { - "version": "0.1.31", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", - "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==" - }, "xpath": { "version": "0.0.27", "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.27.tgz", @@ -4315,11 +4308,6 @@ } } }, - "xmldom": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.5.0.tgz", - "integrity": "sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA==" - }, "xpath": { "version": "0.0.32", "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz", @@ -25633,6 +25621,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-2.0.0.tgz", "integrity": "sha512-/a04qr7RpONRZHOxROZ6iIHItdsQQjN3sj8lJkYDDss8tAkEaAs0VrFjb3tlhmS5snQru5lTs9/5ISSMdPDHlg==", + "dev": true, "requires": { "xmldom": "0.1.27", "xpath": "0.0.27" @@ -25641,7 +25630,8 @@ "xmldom": { "version": "0.1.27", "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", - "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=" + "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=", + "dev": true } } }, @@ -25649,7 +25639,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-1.2.2.tgz", "integrity": "sha512-s0Fax5BpCZqLzYGtlmilUoi/kyhj8dHqaMOvTAQLifkDS4QVfIuBqhEj9POtk3YbZ0tSxp/hvbGj3iCOM1ej8w==", - "dev": true, "requires": { "escape-html": "^1.0.3", "node-forge": "^0.10.0", @@ -25660,8 +25649,7 @@ "xmldom": { "version": "0.1.31", "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", - "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==", - "dev": true + "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==" } } }, @@ -25699,8 +25687,7 @@ "xmldom": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.5.0.tgz", - "integrity": "sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA==", - "dev": true + "integrity": "sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA==" }, "xmlhttprequest-ssl": { "version": "1.5.5", diff --git a/package.json b/package.json index d1c5028445..3cead52667 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@opengovsg/formsg-sdk": "^0.8.4-beta.0", "@opengovsg/myinfo-gov-client": "=4.0.0-beta.0", "@opengovsg/ng-file-upload": "^12.2.15", - "@opengovsg/spcp-auth-client": "^1.4.2", + "@opengovsg/spcp-auth-client": "^1.4.3", "@sentry/browser": "^6.2.2", "@sentry/integrations": "^6.2.2", "@stablelib/base64": "^1.0.0", From 0eca8214f75345c76915ee8c14f342316dd1f190 Mon Sep 17 00:00:00 2001 From: Antariksh Date: Tue, 16 Mar 2021 10:06:45 +0800 Subject: [PATCH 28/28] chore: bump version to 5.2.0 --- CHANGELOG.md | 76 ++++++++++++++++++++++++++++++++++++++++------- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 67 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd96149510..38d2205aca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,40 @@ 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). -#### [v5.1.0](https://github.com/opengovsg/FormSG/compare/v4.59.1...v5.1.0) +#### [v5.2.0](https://github.com/opengovsg/FormSG/compare/v5.1.0...v5.2.0) + +- fix(deps): bump @opengovsg/spcp-auth-client from 1.4.2 to 1.4.3 [`#1370`](https://github.com/opengovsg/FormSG/pull/1370) +- chore(deps-dev): bump @types/nodemailer from 6.4.0 to 6.4.1 [`#1373`](https://github.com/opengovsg/FormSG/pull/1373) +- chore(deps-dev): bump mockdate from 3.0.2 to 3.0.3 [`#1374`](https://github.com/opengovsg/FormSG/pull/1374) +- chore(deps-dev): bump eslint from 7.21.0 to 7.22.0 [`#1375`](https://github.com/opengovsg/FormSG/pull/1375) +- feat: use isPossible for phone number validation [`#1317`](https://github.com/opengovsg/FormSG/pull/1317) +- fix(deps): bump convict-format-with-validator from 6.0.0 to 6.0.1 [`#1369`](https://github.com/opengovsg/FormSG/pull/1369) +- chore(deps-dev): bump @types/convict from 6.0.0 to 6.0.1 [`#1371`](https://github.com/opengovsg/FormSG/pull/1371) +- chore(deps-dev): bump eslint-plugin-jest from 24.2.1 to 24.3.1 [`#1368`](https://github.com/opengovsg/FormSG/pull/1368) +- fix(deps): bump aws-sdk from 2.861.0 to 2.863.0 [`#1367`](https://github.com/opengovsg/FormSG/pull/1367) +- chore(deps-dev): bump ngrok from 3.4.0 to 3.4.1 [`#1363`](https://github.com/opengovsg/FormSG/pull/1363) +- fix(deps): bump connect-mongo from 4.3.1 to 4.4.0 [`#1357`](https://github.com/opengovsg/FormSG/pull/1357) +- fix(deps): bump @sentry/browser from 6.2.1 to 6.2.2 [`#1358`](https://github.com/opengovsg/FormSG/pull/1358) +- chore(deps-dev): bump @types/node from 14.14.33 to 14.14.34 [`#1364`](https://github.com/opengovsg/FormSG/pull/1364) +- test: jest tests for mobile number validation, including signature validation [`#1349`](https://github.com/opengovsg/FormSG/pull/1349) +- chore(deps-dev): bump @opengovsg/mockpass from 2.6.5 to 2.6.6 [`#1359`](https://github.com/opengovsg/FormSG/pull/1359) +- fix(deps): bump @sentry/integrations from 6.2.1 to 6.2.2 [`#1360`](https://github.com/opengovsg/FormSG/pull/1360) +- chore(deps-dev): bump @babel/core from 7.13.8 to 7.13.10 [`#1354`](https://github.com/opengovsg/FormSG/pull/1354) +- fix(deps): bump @opengovsg/spcp-auth-client from 1.4.0 to 1.4.2 [`#1353`](https://github.com/opengovsg/FormSG/pull/1353) +- chore(deps-dev): bump @babel/plugin-transform-runtime [`#1331`](https://github.com/opengovsg/FormSG/pull/1331) +- fix(deps): bump libphonenumber-js from 1.9.12 to 1.9.13 [`#1352`](https://github.com/opengovsg/FormSG/pull/1352) +- chore(deps-dev): bump eslint-plugin-jest from 24.1.9 to 24.2.1 [`#1351`](https://github.com/opengovsg/FormSG/pull/1351) +- fix(deps): bump connect-mongo from 4.2.2 to 4.3.1 [`#1346`](https://github.com/opengovsg/FormSG/pull/1346) +- fix(deps): bump aws-sdk from 2.859.0 to 2.861.0 [`#1347`](https://github.com/opengovsg/FormSG/pull/1347) +- chore(deps-dev): bump @typescript-eslint/eslint-plugin [`#1336`](https://github.com/opengovsg/FormSG/pull/1336) +- chore(deps-dev): bump @babel/preset-env from 7.13.9 to 7.13.10 [`#1333`](https://github.com/opengovsg/FormSG/pull/1333) +- build: remove unused await-to-js [`#1345`](https://github.com/opengovsg/FormSG/pull/1345) +- feat: remove status key in ApplicationError class [`#1338`](https://github.com/opengovsg/FormSG/pull/1338) +- build: merge release 5.1.0 into develop [`#1341`](https://github.com/opengovsg/FormSG/pull/1341) + +#### [v5.1.0](https://github.com/opengovsg/FormSG/compare/v5.0.4...v5.1.0) + +> 10 March 2021 - chore(deps-dev): bump @types/node from 14.14.32 to 14.14.33 [`#1326`](https://github.com/opengovsg/FormSG/pull/1326) - fix(deps): bump @babel/runtime from 7.13.9 to 7.13.10 [`#1327`](https://github.com/opengovsg/FormSG/pull/1327) @@ -75,16 +108,17 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - feat: Add submission limits for storage mode form submissions [`#1097`](https://github.com/opengovsg/FormSG/pull/1097) - chore: merge v5.0.4 into develop [`#1250`](https://github.com/opengovsg/FormSG/pull/1250) - chore: merge Release v5.0.3 back to develop branch [`#1248`](https://github.com/opengovsg/FormSG/pull/1248) +- chore: bump version to 5.1.0 [`8bb5ad1`](https://github.com/opengovsg/FormSG/commit/8bb5ad107e224d6957d873b34e8646c1d3f7f477) + +#### [v5.0.4](https://github.com/opengovsg/FormSG/compare/v5.0.1...v5.0.4) + +> 25 February 2021 + - fix: format workpass status correctly, preview submissions, copy changes [`#1237`](https://github.com/opengovsg/FormSG/pull/1237) - feat: update editable fields and clear cookie upon submission [`#1232`](https://github.com/opengovsg/FormSG/pull/1232) - style: update end page styling [`#1231`](https://github.com/opengovsg/FormSG/pull/1231) - feat: migrate to MyInfo V3 [`#1175`](https://github.com/opengovsg/FormSG/pull/1175) - chore: merge v5.0.1 into develop [`#1241`](https://github.com/opengovsg/FormSG/pull/1241) -- fix: format workpass status correctly, preview submissions, copy changes [`#1237`](https://github.com/opengovsg/FormSG/pull/1237) -- feat: update editable fields and clear cookie upon submission [`#1232`](https://github.com/opengovsg/FormSG/pull/1232) -- style: update end page styling [`#1231`](https://github.com/opengovsg/FormSG/pull/1231) -- feat: migrate to MyInfo V3 [`#1175`](https://github.com/opengovsg/FormSG/pull/1175) -- chore: merge v4.59.1 into develop [`#1227`](https://github.com/opengovsg/FormSG/pull/1227) - build: release v4.59.1 hotfix [`#1226`](https://github.com/opengovsg/FormSG/pull/1226) - build: release v4.59.0 [`#1220`](https://github.com/opengovsg/FormSG/pull/1220) - build: Release 4.58.2 - hotfix msgSrvcName validation [`#1199`](https://github.com/opengovsg/FormSG/pull/1199) @@ -140,14 +174,34 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - chore: bump version to 5.0.4 [`9a422f8`](https://github.com/opengovsg/FormSG/commit/9a422f8fceb2a608f4983306376b54bd79cb8f77) - fix: check truthiness for all address fields [`bad7228`](https://github.com/opengovsg/FormSG/commit/bad7228c631d274e7ff91063d2c3b6d3b88bb497) +#### [v5.0.1](https://github.com/opengovsg/FormSG/compare/v5.0.0...v5.0.1) + +> 25 February 2021 + +- chore: bump version to 5.0.1 [`ea7ddcb`](https://github.com/opengovsg/FormSG/commit/ea7ddcbe030fbe3f1bbd9cb384f40a9558106896) +- fix: convert res status to uppercase [`8f4aeaf`](https://github.com/opengovsg/FormSG/commit/8f4aeaf76af02cdfe776c1671633909831e2fc5a) + +### [v5.0.0](https://github.com/opengovsg/FormSG/compare/v4.59.1...v5.0.0) + +> 24 February 2021 + +- fix: format workpass status correctly, preview submissions, copy changes [`#1237`](https://github.com/opengovsg/FormSG/pull/1237) +- feat: update editable fields and clear cookie upon submission [`#1232`](https://github.com/opengovsg/FormSG/pull/1232) +- style: update end page styling [`#1231`](https://github.com/opengovsg/FormSG/pull/1231) +- feat: migrate to MyInfo V3 [`#1175`](https://github.com/opengovsg/FormSG/pull/1175) +- chore: merge v4.59.1 into develop [`#1227`](https://github.com/opengovsg/FormSG/pull/1227) +- feat: remove updateFormValidator [`92f3f75`](https://github.com/opengovsg/FormSG/commit/92f3f75bc760f32bdb495e27eb880d53f1562093) +- chore: bump version to 5.0.0 [`fb11aee`](https://github.com/opengovsg/FormSG/commit/fb11aee0d19214d824a350c02a3e2a04f89ea726) +- chore: bump version to v4.59.1 [`a712594`](https://github.com/opengovsg/FormSG/commit/a712594146e294a01cea13e429e4ed03109a1f70) + #### [v4.59.1](https://github.com/opengovsg/FormSG/compare/v4.59.0...v4.59.1) > 23 February 2021 - fix: add _id key in permissionList object for updateForm validator [`#1224`](https://github.com/opengovsg/FormSG/pull/1224) -- feat: remove updateFormValidator [`92f3f75`](https://github.com/opengovsg/FormSG/commit/92f3f75bc760f32bdb495e27eb880d53f1562093) +- feat: remove updateFormValidator [`45894b8`](https://github.com/opengovsg/FormSG/commit/45894b89ac36acb6f3a4d2cc22a05bdcdab28925) - chore: bump version to v4.59.0 [`21bee76`](https://github.com/opengovsg/FormSG/commit/21bee768bb40e9eae57fe25b8a3c7b2ea3ccc130) -- chore: bump version to v4.59.1 [`a712594`](https://github.com/opengovsg/FormSG/commit/a712594146e294a01cea13e429e4ed03109a1f70) +- chore: bump version to v4.59.1 [`25c46e7`](https://github.com/opengovsg/FormSG/commit/25c46e77aa1f2d2e109ffae1972645ebb9fd48ac) #### [v4.59.0](https://github.com/opengovsg/FormSG/compare/v4.58.2...v4.59.0) @@ -519,16 +573,16 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - build: Release 4.30.1 - Fix field creation on old clients [`#74`](https://github.com/opengovsg/FormSG/pull/74) - Release 4.30.0 - acknowledgement for secret key backup, TypeScript migrations [`#67`](https://github.com/opengovsg/FormSG/pull/67) - build: empty commit to trigger PR build [`d0c6583`](https://github.com/opengovsg/FormSG/commit/d0c65838efa6731a0f10e89ff954c132b9f8b854) -- feat: update table field styling to not rely on multiple divs [`db03da3`](https://github.com/opengovsg/FormSG/commit/db03da33eca2fc0a6174ca58d7dd8b3cfadadcea) - fix: return 401 for missing JWT [`e6c1947`](https://github.com/opengovsg/FormSG/commit/e6c19477b05fc4aed90b2db42916220aea2a263c) +- test: add tests for extractJwt [`16191a9`](https://github.com/opengovsg/FormSG/commit/16191a957be0dc7f63dc4221569fac2794b7d063) #### [v4.50.2](https://github.com/opengovsg/FormSG/compare/v4.50.1...v4.50.2) > 16 December 2020 -- feat: update table field styling to not rely on multiple divs [`e857aed`](https://github.com/opengovsg/FormSG/commit/e857aed667145441758f09f311c2b9f16f57645b) +- feat: update table field styling to not rely on multiple divs [`db03da3`](https://github.com/opengovsg/FormSG/commit/db03da33eca2fc0a6174ca58d7dd8b3cfadadcea) - fix: email format validation should allow 126/163.com, align frontend and backend validation [`be35522`](https://github.com/opengovsg/FormSG/commit/be35522e15d20521f58fada7ed3164e6c0c0894d) -- chore: bump version to v4.50.2 [`fad62ec`](https://github.com/opengovsg/FormSG/commit/fad62ec5730412201e208332a91286fd53e2b36a) +- chore: bump version to v4.50.2 [`1ac7be6`](https://github.com/opengovsg/FormSG/commit/1ac7be6cb69553d186ec194682ae25bd98318a8b) #### [v4.50.1](https://github.com/opengovsg/FormSG/compare/v4.50.0...v4.50.1) diff --git a/package-lock.json b/package-lock.json index a04fdc2ecf..bdf0ffb58f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "FormSG", - "version": "5.1.0", + "version": "5.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 3cead52667..6879ba8e21 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "FormSG", "description": "Form Manager for Government", - "version": "5.1.0", + "version": "5.2.0", "homepage": "https://form.gov.sg", "authors": [ "FormSG "