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 4.49.1 into master #851

Merged
merged 90 commits into from
Dec 14, 2020
Merged

build: merge Release 4.49.1 into master #851

merged 90 commits into from
Dec 14, 2020

Conversation

tshuli
Copy link
Contributor

@tshuli tshuli commented Dec 10, 2020

No description provided.

mantariksh and others added 30 commits November 24, 2020 14:04
build: merge release 4.47.0 into develop
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.5.1 to 10.5.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](lint-staged/lint-staged@v10.5.1...v10.5.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [stylelint](https://github.com/stylelint/stylelint) from 13.6.1 to 13.8.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/master/CHANGELOG.md)
- [Commits](stylelint/stylelint@13.6.1...13.8.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps-dev): bump prettier from 2.1.2 to 2.2.0

Bumps [prettier](https://github.com/prettier/prettier) from 2.1.2 to 2.2.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](prettier/prettier@2.1.2...2.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

* fix: lint

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kar Rui Lau <karrui.lau@gmail.com>
…711)

* feat(EncryptSubSvc): add getSubmissionMetadata service fn (and tests)

* feat(EncryptSubSvc): add getSubmissionMetadataList service fn (+tests)

* feat(EncryptSubCtl): add handleGetMetadata fn

* ref(AdminFormRoutes): use new handleGetMetadata handler fn

* feat(AdminFormRoutes): allow optional page when submissionId exists

* test(EncryptSubCtl): add tests for handleGetMetadata
* refactor: migrate radioButtonValidator to ts

* refactor: update references

* chore: update isVisible for tests
* refactor: migrate ratingValidator to ts

* refactor: update references
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.4.1 to 26.4.4.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](kulshekhar/ts-jest@v26.4.1...v26.4.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor: migrate mobileValidator to ts

* refactor: update references

* chore: correct param name

* refactor: improve clarity of prefixValidator
Bumps [winston-cloudwatch](https://github.com/lazywithclass/winston-cloudwatch) from 2.3.2 to 2.4.0.
- [Release notes](https://github.com/lazywithclass/winston-cloudwatch/releases)
- [Changelog](https://github.com/lazywithclass/winston-cloudwatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lazywithclass/winston-cloudwatch/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [angular-messages](https://github.com/angular/angular.js) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/angular/angular.js/releases)
- [Changelog](https://github.com/angular/angular.js/blob/master/CHANGELOG.md)
- [Commits](angular/angular.js@v1.8.1...v1.8.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [express-rate-limit](https://github.com/nfriedly/express-rate-limit) from 5.1.3 to 5.2.3.
- [Release notes](https://github.com/nfriedly/express-rate-limit/releases)
- [Commits](express-rate-limit/express-rate-limit@v5.1.3...v5.2.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* ref: pass length validator function to chain

* ref: use flow instead of pipe

* ref: cut indirection in homeno

* ref: cut indirection in mobileno

* ref: cut indirection in nric

* ref: cut indirection in radiobutton

* ref: cut indirection in rating

* ref: improve variable name for textfield
* feat(FeedbackModel): add static method getFeedbackCursorByFormId

* feat(FeedbackSvc): add getFormFeedbackStream fn

* feat(AdminFormCtl): add handleStreamFormFeedback fn

* feat(utils): add exhaustive switch case typeguard

* ref(AdminFormsRoutes): use new handleStreamFormFeedback handler

* test(FormFeedbackModel): add tests for model schema and statics

* feat(AuthService): add getFormAfterPermissionChecks helper function

* test(AuthService): add test cases for getFormAfterPermissionChecks

* ref(AdminFormCtl): use getFormAfterPermissionChecks fn in controllers

* test(AdminFormCtl): add tests for handleStreamFormFeedback

Note that I have no clue how to test express streams, and my Google-fu failed me this time. Thus, the success case test is just testing that the services return correctly and not whether the stream passes :(

* feat: remove unused code and add jsdoc for handler

* test(AuthSvc): replace assertSpy with inlined mock
Bumps [eslint](https://github.com/eslint/eslint) from 7.13.0 to 7.14.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v7.13.0...v7.14.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.12.1 to 7.12.7.
- [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.12.7/packages/babel-preset-env)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [opossum](https://github.com/nodeshift/opossum) from 5.0.1 to 5.0.2.
- [Release notes](https://github.com/nodeshift/opossum/releases)
- [Changelog](https://github.com/nodeshift/opossum/blob/master/CHANGELOG.md)
- [Commits](nodeshift/opossum@v5.0.1...v5.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: update travis to have multiple build stages

* chore: use correct paths

* chore: remove create

* fix: missing script tag

* chore: correct order of stages

* chore: experiment with only building node_modules once

* chore: add default language without install step

* chore: use node_js 12 in all Travis stages

* chore: run lint-ci concurrently

* chore: copy all in coverage workspace

* chore: run coveralls after_success

* chore: use node testEnvironment when running Jest tests

Allows for speed up of Jest tests
See: https://itnext.io/how-to-make-your-sluggish-jest-v23-tests-go-faster-1d4f3388bcdd

* chore: increase number of parallel workers in Jest to 4

* chore: remove unnecessary coverage reporters in Jest
Bumps [ts-mock-imports](https://github.com/EmandM/ts-mock-imports) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/EmandM/ts-mock-imports/releases)
- [Commits](EmandM/ts-mock-imports@v1.3.0...v1.3.1)

Signed-off-by: dependabot[bot] <support@github.com>

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [celebrate](https://github.com/arb/celebrate) from 13.0.3 to 13.0.4.
- [Release notes](https://github.com/arb/celebrate/releases)
- [Commits](arb/celebrate@v13.0.3...v13.0.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [mongoose](https://github.com/Automattic/mongoose) from 5.10.15 to 5.10.18.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/History.md)
- [Commits](Automattic/mongoose@5.10.15...5.10.18)

Signed-off-by: dependabot[bot] <support@github.com>

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

* fix: add check for responses on hidden fields

* fix: correct isVisible values for tests

* chore: update status code on ValidateFieldError

* fix: remove invalid visibility tests from server controller spec because hidden field answers should not even be in the response

* chore: add tests for hidden fields in field validator specs

* refactor: type FieldResponse as union of Response interfaces

* refactor: use else if

* chore: tighten type guards for checkbox and table responses

* fix: check for table response on hidden field

* refactor: TableRow subtype

* fix: concatenate flattened array for table response before evaluating length

* refactor: beforeAll and afterAll for jasmine clock

* chore: add check that all arrays have same length

* refactor: type ITableRow is string array

* refactor: check if array contains any value by traversing each element instead of using string concatenation

* chore: check that answerArray[0] exists and is a tableRow
* chore: change copy

* style: standardise top and bottom padding

* chore: remove period
dependabot bot and others added 26 commits December 8, 2020 17:02
Bumps [@opengovsg/mockpass](https://github.com/opengovsg/mockpass) from 2.5.6 to 2.6.0.
- [Release notes](https://github.com/opengovsg/mockpass/releases)
- [Commits](opengovsg/mockpass@v2.5.6...v2.6.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat(FormModel): update transferOwner instance method to return itself

* feat(FormModel): remove currentOwner parameter from Form#transferOwner

Not needed, since the form the instance method is acting on should already have the required information, and should only have a single source of truth.

The issue where the current logged in user calling this method to transfer ownership of the form even when the logged in user is not the given form's owner should be mitigated in the controller layer, where checks for whether the current user is the form admin should (and currently is) undertaken.

* feat(FormModel): remove autogenerated id on permissionList objects

* test(FormModel): move getDashboardForms into correct static desc block

* test(FormModel): add tests for transferOwner instance method

* feat(AdminFormSvc): add transferFormOwnership fn

* test(AdminFormSvc): add tests for transferFormOwnership

* feat(AdminFormCtl): add handleTransferFormOwnership handler fn

* feat(AdminFormRoutes): use new controller fn for transferring owner

* test(AdminFormCtl): add tests for handleTransferFormOwnership

* feat: remove old transferOwner function

* feat(FormModel): add tighter pre-validate hook for form schema

* test(FormModel): add tests for increased validation impl

* feat(FormModel): reduce responsibilities of transferOwner method

* test(UserService): add missing tests for findAdminById

* feat(UserSvc): add findAdminByEmail fn (and tests)

* feat(AdminFormSvc): move transfer ownership checks into service fn

* test(AdminFormSvc): update tests for transferFormOwnership

* feat(FormModel): restore _id generation for permissionList

See #718 (comment)

* feat(AdminFormSvc): return TransferOwnershipError on missing new owner

* ref: rename findAdminBy* to findUserBy*

improve clarity

* feat(AdminFormSvc): move ownerEmail equality check up one step

prevents extra db call

* feat: change transfer ownership error return 400

* ref(FormModel): rename getDashboardForms to getAllByUserIdOrEmail

* ref(FormModel): re-renaming to getMetaByUserIdOrEmail
* refactor: update references

* refactor: migrate dateValidator to ts

* refactor: inline createMomentFromDateString instead of in shared

* refactor: use DateSelectedValidation enum

* chore: remove export

* refactor: separate past, future and custom date validators

* fix: selectedDateValidation in test for custom date range

* refactor: makeDateValidator

* docs: add comment for -12 and +14 hours to account for timezone
* refactor: update references

* refactor: migrate decimalValidator to ts

* refactor: simplify decimalValidator

* chore: update test

* chore: fix tests, add null to type of DecimalValidationOptions
can be triggered by duplicate or create form backend failure
* feat: update email prevention text and link

* feat: add info box when user only has a single email recipient

* feat: change update auth method toaster messaging

* feat: amend email form discouragement copy

* feat: update copy of form de/activation toast
* feat(formUtils): add removePrivateDetailsFromForm utility function

* feat: add formTitle variable to PrivateFormError and remove override

* feat(AdminFormCtl): add handleGetTemplateForm handler

for GET /:formId/adminform/template

* test(AdminFormCtl): add tests for handleGetTemplateForm

* ref(AdminFormRoutes): use AdminFormController.handleGetTemplateForm

* chore: trigger travis rebuild
* feat: change storage mode form typed declaration

* feat: remove verified toast on secret key verification success

just need toast after successfully activating the form

* feat: update storage mode guide link styling

only the word guide is linked, the brackets are outside

* feat: add spacing between each email in email form email list

that's a lot of emails in a sentence
Bumps [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) from 1.9.5 to 1.9.6.
- [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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 5.28.0 to 5.29.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@5.28.0...5.29.0)

Signed-off-by: dependabot[bot] <support@github.com>

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.14.10 to 14.14.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: remove travis retry

flaky test is fixed

* fix: add globalSetup fn to download mongo binary before jest tests
build: merge 4.48.2 into develop
* feat: tear out response hash

* feat: remove json-stringify-deterministic dep
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.

None yet

4 participants