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: [master] Release 4.34.1 #319

Merged
merged 32 commits into from
Sep 15, 2020
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
dac3e89
Merge pull request #245 from opengovsg/release-4.33.0
liangyuanruo Sep 1, 2020
a3dde59
chore(deps-dev): bump @typescript-eslint/parser from 3.3.0 to 3.10.1 …
dependabot[bot] Sep 1, 2020
f6bc8b5
fix(deps): remove ajv as dependency (#248)
dependabot[bot] Sep 1, 2020
c72d433
fix: prevent discriminated models from being created before their bas…
karrui Sep 1, 2020
0c475fe
chore(deps-dev): bump prettier from 2.0.5 to 2.1.1 (#249)
dependabot[bot] Sep 2, 2020
4eb8413
fix(dev): fix Localstack yet again (#252)
mantariksh Sep 2, 2020
c304e26
refactor: typify webhook and migrate from middleware pattern (#251)
arshadali172 Sep 2, 2020
b913625
chore(deps-dev): bump jest from 26.2.2 to 26.4.2 (#257)
dependabot[bot] Sep 2, 2020
c285ea8
chore(deps-dev): bump eslint from 7.7.0 to 7.8.1 (#258)
dependabot[bot] Sep 2, 2020
7a81f71
fix(deps): bump lodash from 4.17.19 to 4.17.20 (#259)
dependabot[bot] Sep 2, 2020
f67732c
feat: upgrade Sentry SDK (#254)
mantariksh Sep 2, 2020
19216a0
refactor: remove unused Nodemailer env vars (#253)
liangyuanruo Sep 2, 2020
a8d9962
chore: remove form_field.isFutureOnly key (#235)
tshuli Sep 2, 2020
3858eb4
refactor: remove redundant feature factory (#261)
mantariksh Sep 2, 2020
1bfb064
fix: revert changes to configureAws (#266)
mantariksh Sep 3, 2020
68a9ea5
refactor: use convict for configuration (#190)
arshadali172 Sep 3, 2020
137c410
chore(deps-dev): bump @babel/preset-env from 7.11.0 to 7.11.5 (#268)
dependabot[bot] Sep 3, 2020
56d8565
chore(deps-dev): bump testcafe from 1.8.6 to 1.9.1 (#271)
dependabot[bot] Sep 3, 2020
e6ff2a7
feat: upgrade localstack version (#275)
mantariksh Sep 3, 2020
b254c9d
chore(deps-dev): bump @babel/core from 7.10.2 to 7.11.5 (#270)
dependabot[bot] Sep 3, 2020
246daa8
fix: fix invocations of logger that does not adhere to expected shape…
karrui Sep 3, 2020
d19a105
feat: add try-catch block to custom logger for js files (#267)
karrui Sep 3, 2020
87df2fa
feat: verified sms modal (#274)
arshadali172 Sep 3, 2020
423b8b5
chore(deps-dev): bump @typescript-eslint/eslint-plugin and @typescrip…
dependabot[bot] Sep 3, 2020
3e61aca
revert(convict): "refactor: use convict for configuration (#190)" (#285)
liangyuanruo Sep 6, 2020
fe64fcf
revert: reintroduce convict (#287)
arshadali172 Sep 7, 2020
4aeb037
fix: upgrade mongoose from 5.9.19 to 5.10.0 (#289)
snyk-bot Sep 7, 2020
beae593
chore(deps-dev): bump stylelint-config-prettier from 8.0.1 to 8.0.2 (…
dependabot[bot] Sep 7, 2020
5cba28a
refactor: migrate /auth endpoint handling to Typescript, Domain Drive…
karrui Sep 7, 2020
830211a
Bump version
Sep 8, 2020
d5bfd5a
build: bump version to 4.34.1
mantariksh Sep 10, 2020
22b8ab1
feat: log all critical bounces (#288)
mantariksh Sep 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(deps-dev): bump @typescript-eslint/eslint-plugin and @typescrip…
…t-eslint/parser (#246)

* chore(deps-dev): bump @typescript-eslint/eslint-plugin

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 3.9.1 to 4.0.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.0.0/packages/eslint-plugin)

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

* chore(dev-deps): bump @typescript-eslint/parser from 3.10.1 to 4.0.0

This was causing the lint errors from the upgrade of @typescript-eslint/eslint-plugin as the parser used was still of a lower level

* chore: update eslintrc to use recommended Typescript eslint rules

* lint: run linter on Typescript codebase using new rules

* chore(deps-dev): bump @typescript-eslint/eslint-plugin to 4.0.1

* refactor(Bounce): add stricter RequestHandler typing to handleSns

* fix(MailUtils): add stricter typing to AutoreplyHtmlData typing

* refactor: set user betaFlags typing to be stricter to be empty object

* refactor(Bounce): update typing of ResBody to be never in handleSns

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kar Rui Lau <[email protected]>
dependabot[bot] and karrui authored Sep 3, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 423b8b5ff32f4b7e1998eaccec132575607c25ae
6 changes: 2 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@
}
},
"plugins": ["@typescript-eslint", "import", "simple-import-sort"],
"extends": ["plugin:@typescript-eslint/recommended"],
"rules": {
// Rules for auto sort of imports
"simple-import-sort/sort": [
@@ -49,10 +50,7 @@
"import/order": "off",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"@typescript-eslint/no-var-requires": "warn",
"@typescript-eslint/no-unused-vars": "error",
"no-unused-vars": "off"
"import/no-duplicates": "error"
}
}
],
185 changes: 102 additions & 83 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -190,8 +190,8 @@
"@types/uid-generator": "^2.0.2",
"@types/uuid": "^8.0.0",
"@types/validator": "^13.0.0",
"@typescript-eslint/eslint-plugin": "^3.9.1",
"@typescript-eslint/parser": "^3.10.1",
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.0",
"axios-mock-adapter": "^1.18.1",
"babel-loader": "^8.0.5",
"concurrently": "^3.6.1",
7 changes: 2 additions & 5 deletions src/app/models/bounce.server.model.ts
Original file line number Diff line number Diff line change
@@ -142,14 +142,11 @@ BounceSchema.methods.merge = function (
this.bounces = latestBounces.bounces
}

const getBounceModel = (db: Mongoose) => {
const getBounceModel = (db: Mongoose): IBounceModel => {
try {
return db.model(BOUNCE_SCHEMA_ID) as IBounceModel
} catch {
return db.model<IBounceSchema>(
BOUNCE_SCHEMA_ID,
BounceSchema,
) as IBounceModel
return db.model<IBounceSchema, IBounceModel>(BOUNCE_SCHEMA_ID, BounceSchema)
}
}

4 changes: 2 additions & 2 deletions src/app/models/field/tableField.ts
Original file line number Diff line number Diff line change
@@ -23,8 +23,8 @@ const createColumnSchema = () => {
)

ColumnSchema.pre<IColumnSchema>('validate', function (next) {
let columnTypes = [BasicField.ShortText, BasicField.Dropdown]
let index = columnTypes.indexOf(this.columnType)
const columnTypes = [BasicField.ShortText, BasicField.Dropdown]
const index = columnTypes.indexOf(this.columnType)
if (index > -1) {
return next()
} else {
11 changes: 6 additions & 5 deletions src/app/models/form.server.model.ts
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ import {
FormOtpData,
IEmailFormSchema,
IEncryptedFormSchema,
IForm,
IFormSchema,
IPopulatedForm,
LogicType,
@@ -376,7 +377,7 @@ const compileFormModel = (db: Mongoose): IFormModel => {

// Methods
FormSchema.methods.getMainFields = function (this: IFormSchema) {
let form = {
const form = {
_id: this._id,
title: this.title,
status: this.status,
@@ -397,7 +398,7 @@ const compileFormModel = (db: Mongoose): IFormModel => {
// Return a duplicate form object with the given properties
FormSchema.methods.duplicate = function (
this: IFormSchema,
overrideProps: object,
overrideProps: Partial<IForm>,
) {
const newForm = pick(this, FORM_DUPLICATE_KEYS)
Object.assign(newForm, overrideProps)
@@ -493,21 +494,21 @@ const compileFormModel = (db: Mongoose): IFormModel => {
return FormModel
}

const getFormModel = (db: Mongoose) => {
const getFormModel = (db: Mongoose): IFormModel => {
try {
return db.model(FORM_SCHEMA_ID) as IFormModel
} catch {
return compileFormModel(db)
}
}

export const getEmailFormModel = (db: Mongoose) => {
export const getEmailFormModel = (db: Mongoose): IEmailFormModel => {
// Load or build base model first
getFormModel(db)
return db.model(ResponseMode.Email) as IEmailFormModel
}

export const getEncryptedFormModel = (db: Mongoose) => {
export const getEncryptedFormModel = (db: Mongoose): IEncryptedFormModel => {
// Load or build base model first
getFormModel(db)
return db.model(ResponseMode.Encrypt) as IEncryptedFormModel
2 changes: 1 addition & 1 deletion src/app/models/form_statistics_total.server.model.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import { IFormStatisticsTotalSchema } from '../../types'
const FORM_STATS_TOTAL_SCHEMA_ID = 'FormStatisticsTotal'
const FORM_STATS_COLLECTION_NAME = 'formStatisticsTotal'

interface IFormStatisticsTotalModel extends Model<IFormStatisticsTotalSchema> {}
type IFormStatisticsTotalModel = Model<IFormStatisticsTotalSchema>

const compileFormStatisticsTotalModel = (db: Mongoose) => {
const FormStatisticsTotalSchema = new Schema<IFormStatisticsTotalSchema>(
2 changes: 1 addition & 1 deletion src/app/models/user.server.model.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import getAgencyModel, { AGENCY_SCHEMA_ID } from './agency.server.model'

export const USER_SCHEMA_ID = 'User'

export interface IUserModel extends Model<IUserSchema> {}
export type IUserModel = Model<IUserSchema>

const compileUserModel = (db: Mongoose) => {
const Agency = getAgencyModel(db)
Loading