Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

build: merge release v5.15.0 into master #2231

Merged
merged 62 commits into from
Jun 22, 2021
Merged

build: merge release v5.15.0 into master #2231

merged 62 commits into from
Jun 22, 2021

Conversation

tshuli
Copy link
Contributor

@tshuli tshuli commented Jun 22, 2021

No description provided.

frankchn and others added 30 commits June 8, 2021 19:34
* feat: Add webhook support for storage mode attachments

* fix tests post rebase

* remove merge error
chore: merge release v5.13.0 into develop
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.922.0 to 2.923.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.922.0...v2.923.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [zod](https://github.com/colinhacks/zod) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Changelog](https://github.com/colinhacks/zod/blob/master/CHANGELOG.md)
- [Commits](colinhacks/zod@v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: zod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…2109)

Bumps [@types/express-rate-limit](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express-rate-limit) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/express-rate-limit)

---
updated-dependencies:
- dependency-name: "@types/express-rate-limit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ts-essentials](https://github.com/krzkaczor/ts-essentials) from 7.0.1 to 7.0.2.
- [Release notes](https://github.com/krzkaczor/ts-essentials/releases)
- [Commits](https://github.com/krzkaczor/ts-essentials/commits)

---
updated-dependencies:
- dependency-name: ts-essentials
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.17.2 to 14.17.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…text, long text and number fields (#2040)

* chore: script to verify that db is consistent

* chore: remove references to customMin, customMax, Range for short text, long text and number fields in backend

* chore: remove references to customMin, customMax for short text, long text and number fields in frontend

* chore: add customMin and customMax virtuals for backward compatibility

* chore: script to unset customMin and customMax for text and number fields

* chore: remove Number casting for customVal

* chore: add todos for virtuals

* chore: correct types for virtuals

* refactor: combine TextValidationOptionsSchema

* chore: add elemMatch for field type at start of aggregation

* chore: add check for non-text/number fields

* style: lint

* chore: refine filter for update (doesn't affect outcome)

* chore: improve query syntax

* chore: rename folder to common
…2111)

* refactor(process-decrypted-content): ported over process-decrypted-content to typescript

* refactor(public/modules/forms/admin): changed callsites for process-decrypted-content

* refactor(process-decrypted-content): updated type predicate

* refactor(process-decrypted-content): inlined typeguard for neatness

* refactor(ts-migration): migrates ndjsonstream to typescript (#2053)

* feat(ndjsonstream): refactored ndjsonstream and removed old js version

* refactor(submissions.client.factory): updated callsite to use new version of ndjsonstream

* revert(ndjsonstream): adds data_buf back to prevent regression

* fix(ndjsonstream): fixed errorneous initial conditional

* fix(ndjsontream): fixed insidious bug causing occasional off by 1

* revert(ndjsonstream): reverts slice/map to for loops

* revert(ndjsonstream): reverts single line return
…ith typescript FormService (#1947)

* refactor: replace  object with typescript FormService

* test: add test for FormService

* refactor: edit calls to fit new function signature and remove angularjs

* rfix: add missing parameter in transferOwner and cfix reading error message in collaborators client controller

* refactor: add .when to all FormApi calls

* refactor: extract interceptors from FormService and replace original interceptors

* test: remove interceptor from FormService tests

* refactor: add .when to FormApi calls

* docs: add documentation and reaname some functions

* refactor: edit calls to fit new function signature and remove angularjs

* refactor: add .when to all FormApi calls

* refactor: add .when to FormApi calls

* refactor: rename getDashboardViews to getDashboardView

* fix: rename getDashboardViews in form-api.client.factory.js

* refactor: remove headers for IE11 support

* refactor: split FormService into different services

* split test into relevant files

* refactor: update other files after rename of AdminFormService

* refactor: change services and rename formapi functions

* refactor: remove outdated comment

* refactor: remove unnecessary

* docs: update jsdocs regarding AdminFormService

* refactor: remove unnecessary q.when

* refactor: change from absolute to relative import in AdminViewFormService

* refactor: shift deleteForm to UpdateFormService

* fix: change service deleteForm

* refactor: make tcalls to transformations explicit

* test: edit tests to improve readability

* refactor: update imports

* test: fix imports in tests

* style: fix eslint style in tests

* style: fix prettier errors

* fix: fix import statement in AdminSubmissionService

* fix: fix import statement in test

* fix: replace formApi.template with formApi.queryTemplate

* fix: fix incorrect endpoint for query and use of template
… server (#2112)

* fix: add version key when retrieving storage mode submission data

* fix(tests): update tests to account for version key

* feat: add version key, make types primitive for EncryptedSubmissionDto

* feat: pass in version param when decrypting on client

* test: update tests for change in EncryptSubmissionDto shape
* feat: store only user ID in session

* fix: fix test breakage

* fix: update schema correctly

* chore: remove TODO because done

* fix: update login logger to reference sessionUser._id instead of email

email is now removed from the logged in user

Co-authored-by: Kar Rui Lau <[email protected]>
…p flow to Typescript (#2084)

* feat(AdminAuthService):  add checkIsEmailAllowed service function

* ref: condense vm.checkEmail and vm.checkUser into single vm.login fn

* feat(AdminAuthService): add sendLoginOtp function

* ref: use AdminAuthService.sendLoginOtp

* ref: rename AdminAuthService to AuthService

better fit API prefix

* feat: remove all catch transformations from AuthService

not needed, may interfere with React migration. Should just handle it in the caller

# Conflicts:
#	src/public/modules/users/controllers/authentication.client.controller.js
#	src/public/services/AuthService.ts

* test(AuthService): unit tests for checkIsEmailAllowed + sendLoginOtp

* feat: remove unused functions from old auth.client

* fix(auth.client.ctl): correctly retrieve error msg when sendOtp fails

* test(AuthService): add clarity to test block

Co-authored-by: tshuli <[email protected]>

* feat(AuthService): remove throw documentation on sendLoginOtp

Co-authored-by: tshuli <[email protected]>
* feat: add v3 API for retrieving admin form by id

* feat: remove `@routes` JSDoc line as they do not add info

and can be often wrong, and the real route is already lines away

* feat(AdminViewFormService): call v3 API to retrieve admin form

this allows us to eventually deprecate the old GET /adminform endpoints (and its ilk)
Bumps [@types/validator](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/validator) from 13.1.3 to 13.1.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/validator)

---
updated-dependencies:
- dependency-name: "@types/validator"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.923.0 to 2.924.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.923.0...v2.924.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [csv-parse](https://github.com/wdavidw/node-csv-parse) from 4.15.4 to 4.16.0.
- [Release notes](https://github.com/wdavidw/node-csv-parse/releases)
- [Changelog](https://github.com/adaltas/node-csv-parse/blob/master/CHANGELOG.md)
- [Commits](adaltas/node-csv-parse@v4.15.4...v4.16.0)

---
updated-dependencies:
- dependency-name: csv-parse
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor: remove form-factory.client.service.js

* fix: wrap form params in object

* refactor: change function names and arguments based on formapi changes
* feat(feature-manager): remove frontend toggles

* feat(feature-manager): remove API call for feature states

* test: fix e2e test selector for MyInfo tab
* feat: tear out FeatureNames.AggregateStats

* test: update tests to not rely on RetrievalType

* chore: remove unnecessary describe blocks

* chore: remove mentions of AGGREGATE_COLLECTION
* fix(auth): lowercase auth emails through Joi

* test: add tests for email case-insensitivity

* refactor: move lowercase after email validation message

* test: fix POST endpoint in new tests

* test: fix remaining tests
* feat(AuthService): add verifyLoginOtp fn

* ref: use AdminAuthService.verifyLoginOtp

* ref: rename Admin to User

better fit API prefix

* ref(AuthService): move User related fns to UserService

* test(AuthService): add unit tests for verifyLoginOtp

* chore: add jest-localstorage-mock package

for mocking localstorage in the frontend jest tests

* test(UserService): add unit tests for saveUserToLocalStorage

* chore: move date-fns from devDeps to deps

* feat: add base typings for Agency and User

in preparation for extending from to close #2066

* feat: remove unused verifyOtp function

* chore: set VSCode default TS version to follow node_modules

* ref: move saveUserToLocalStorage responsibility to calling controller

* feat(UserService): add fetchUser function

* ref(avatar-dropdown.client): use UserService.fetchUser()

* test(UserService): add unit tests for fetchUser

* feat: remove unused refreshUser function

* feat(UserService): add clearUserFromLocalStorage function (and tests)

* feat: move responsibility of clearing user from localStorage to ctl

* fix: correctly set truser when fetching user from server

* ref: use UserService.saveUserToLocalStorage

* feat(AuthService): add and use logout function

* feat: remove unused Auth.signOut and setUser functions

* test(AuthService): add unit test for logout

test(UserService): add tests for clearUserFromLocalStorage

* feat(UserService): add getUserFromLocalStorage function

* ref: replace all instances of Auth.getUser with UserService equivalent

* feat: delete unused auth.client.service.js

* test(UserService): add unit tests for getUserFromLocalStorage

* chore: run npm run lint

i didn't even touch this part of the code...
)

* feat(adminsubmissionsservice): ported over download related methods to service

* refactor(submissions.client.factory): removed functions that was shifted to admin subimssion service

* refactor(public): changed frontend call site for migrated methods

* feat(formsgsdkservice): migrates form sg sdk service to ts

* refactor(formsgsdk.client.factory): removed old file

* refactor(formsgsdkservice): refactored to check mode using window and use named export

* refactor(main.js): removed formsgsdk client fatory

* refactor(formsgsdkservice): changed frontend callsites to use named imports

* refactor(adminsubmissionservice): adds return type and exports downloadAndDecryptAttachment

* feat(injectedvariables): adds be injected variables into fe

* refactor(formsgsdkservice): uses new injectedvariables for sdk mode

* style(adminsubmissionservice): use ?? instead of ||

* fix(response-attachment.client): fixed no UI response on empty bytes array

* fix(response-attachment.client.component): added early return to avoid fall through
* feat(feature-manager): remove Intranet feature

* feat: allow IP list path to default to empty string
* test(adminsubmissionsservice): adds tests for download related methoids

* test(adminsubmissionsservice): adds new test case for when sdk returns null
Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.5.1 to 6.6.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@6.5.1...6.6.0)

---
updated-dependencies:
- dependency-name: "@sentry/integrations"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.14.3 to 7.14.5.
- [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.14.5/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
mantariksh and others added 27 commits June 11, 2021 12:55
* feat(feature-manager): remove Sentry from feature manager

* build(dev): add dev defaults for Sentry config
…2145)

* docs: update roadmap

* docs: move banner docs to DEPLOYMENT_SETUP

* docs: remove feature manager dependencies from DEPLOYMENT_SETUP
chore: merge v5.13.1 into develop
Bumps [htmlhint](https://github.com/htmlhint/HTMLHint) from 0.14.2 to 0.15.1.
- [Release notes](https://github.com/htmlhint/HTMLHint/releases)
- [Changelog](https://github.com/htmlhint/HTMLHint/blob/master/CHANGELOG.md)
- [Commits](htmlhint/HTMLHint@v0.14.2...v0.15.1)

---
updated-dependencies:
- dependency-name: htmlhint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/mongodb](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mongodb) from 3.6.17 to 3.6.18.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mongodb)

---
updated-dependencies:
- dependency-name: "@types/mongodb"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.925.0 to 2.927.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.925.0...v2.927.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [zod](https://github.com/colinhacks/zod) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Changelog](https://github.com/colinhacks/zod/blob/master/CHANGELOG.md)
- [Commits](colinhacks/zod@v3.1.0...v3.2)

---
updated-dependencies:
- dependency-name: zod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat(feature-manager): hardcode /features API response

* refactor: use enum for response keys
* feat(feature-manager): remove GoogleAnalytics feature

* build: add mock default for GA_TRACKING_ID
* add uen field in public frontend

* add essential uen types

* make sure uen field renders

* replace isUenValid with isUenField
As we have no need for the AngularJS filters and directives that
angular-moment provides, remove it completely, referencing moment
as a CommonJS module instead
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.6.0 to 6.7.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@6.6.0...6.7.0)

---
updated-dependencies:
- dependency-name: "@sentry/browser"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.26.1 to 4.27.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.27.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#2162)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.26.1 to 4.27.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.27.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.6.0 to 6.7.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@6.6.0...6.7.0)

---
updated-dependencies:
- dependency-name: "@sentry/integrations"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@opengovsg/spcp-auth-client](https://github.com/opengovsg/spcp-auth-client) from 1.4.7 to 1.4.8.
- [Release notes](https://github.com/opengovsg/spcp-auth-client/releases)
- [Commits](opengovsg/spcp-auth-client@v1.4.7...v1.4.8)

---
updated-dependencies:
- dependency-name: "@opengovsg/spcp-auth-client"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor: simplify isUenValid logic

* fix: use stricter regex matching
* Revert "refactor: simplify isUenValid logic (#2156)"

This reverts commit 8f0eda6.

* Revert "feat: add UEN field (#2100)"

This reverts commit 35eeeaf.

* Revert "feat: add and call v3 API for retrieving individual admin form (#2113)"

This reverts commit e55e1a9.

* Revert "chore: remove redundant ValidationOption object properties for short text, long text and number fields (#2040)"

This reverts commit 95b6297.

* Revert "feat: Add webhook support for storage mode attachments (#1713)"

This reverts commit 332d3ce.
* feat: Add webhook support for storage mode attachments

* fix tests post rebase

* remove merge error
@mantariksh mantariksh merged commit ef74218 into master Jun 22, 2021
@karrui karrui deleted the release-v5.15.0 branch August 17, 2021 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants