Skip to content

Commit

Permalink
build: bump testcafe to 2.6.2 and other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
halfwhole committed Dec 29, 2023
1 parent d84e3ea commit d15f55b
Show file tree
Hide file tree
Showing 12 changed files with 1,061 additions and 1,332 deletions.
2,371 changes: 1,042 additions & 1,329 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"react-chartjs-2": "^2.11.2",
"react-dom": "^17.0.2",
"react-ga": "^3.3.0",
"react-i18next": "^11.11.1",
"react-i18next": "^11.18.6",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"react-typed": "^1.2.0",
Expand Down Expand Up @@ -197,10 +197,10 @@
"sequelize-mock": "^0.10.2",
"serverless-plugin-include-dependencies": "^5.0.0",
"supertest": "^6.1.3",
"testcafe": "^1.14.2",
"testcafe": "^2.6.2",
"ts-jest": "^26.5.6",
"ts-loader": "^9.2.3",
"ts-node": "^10.7.0",
"ts-node": "^10.8.0",
"ts-node-dev": "^1.1.8",
"typescript": "^4.3.5",
"upng-js": "^2.1.0",
Expand Down
1 change: 1 addition & 0 deletions src/client/app/util/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const downloadCsv = (csvString: string, filename: string) => {
})

if (useIsIE()) {
// @ts-ignore
navigator.msSaveBlob(blob, filename)
} else {
saveAs(blob, filename)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ async function downloadClicks(shortUrl: string, onError: () => void) {
})

if (useIsIE()) {
// @ts-ignore
navigator.msSaveBlob(blob, 'clicks.csv')
} else {
saveAs(blob, 'clicks.csv')
Expand Down
1 change: 1 addition & 0 deletions src/server/modules/analytics/LinkStatisticsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class LinkStatisticsController {
res.status(200).json(linkStats)
return
} catch (error) {
// @ts-ignore
res.status(404).send(jsonMessage(error.message))
return
}
Expand Down
1 change: 1 addition & 0 deletions src/server/modules/audit/LinkAuditController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class LinkAuditController {
res.status(404).send(jsonMessage(error.message))
return
}
// @ts-ignore
res.status(400).send(jsonMessage(error.message))
return
}
Expand Down
2 changes: 2 additions & 0 deletions src/server/modules/auth/LoginController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export class LoginController {
await this.authService.generateOtp(email, getIp(req))
} catch (error) {
dogstatsd.increment(OTP_GENERATE_FAILURE, 1, 1)
// @ts-ignore
res.serverError(jsonMessage(error.message))
return
}
Expand Down Expand Up @@ -90,6 +91,7 @@ export class LoginController {
logger.error(`Login email not found for user:\t${email}`)
return
}
// @ts-ignore
res.serverError(jsonMessage(error.message))
return
}
Expand Down
1 change: 1 addition & 0 deletions src/server/modules/bulk/BulkController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class BulkController {
req.body.longUrls = longUrls
next()
} catch (error) {
// @ts-ignore
res.badRequest(jsonMessage(error.message, MessageType.FileUploadError))
return
}
Expand Down
2 changes: 2 additions & 0 deletions src/server/modules/job/JobController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export class JobController {
} catch (error) {
dogstatsd.increment(JOB_ITEM_UPDATE_FAILURE, 1, 1)
logger.error(`error updating job item ${jobItemId}: ${error}`)
// @ts-ignore
res.status(404).send(jsonMessage(error.message))
return
}
Expand Down Expand Up @@ -131,6 +132,7 @@ export class JobController {
res.ok(jsonMessage('User has no jobs'))
return
}
// @ts-ignore
res.serverError(jsonMessage(error.message))
}
return
Expand Down
4 changes: 4 additions & 0 deletions src/server/modules/threat/UrlCheckController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export class UrlCheckController {
}
} catch (error) {
dogstatsd.increment(SCAN_FAILED_LINK, 1, 1)
// @ts-ignore
logger.error(error.message)
// @ts-ignore
res.serverError(jsonMessage(error.message))
return
}
Expand Down Expand Up @@ -82,7 +84,9 @@ export class UrlCheckController {
return
}
} catch (error) {
// @ts-ignore
logger.error(error.message)
// @ts-ignore
res.serverError(jsonMessage(error.message))
return
}
Expand Down
1 change: 1 addition & 0 deletions src/server/services/sgid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class SgidService {
})
return { url, codeVerifier, nonce }
} catch (e) {
// @ts-ignore
throw new Error(`Error retrieving url via sgid-client ${e.message}`)
}
}
Expand Down
2 changes: 2 additions & 0 deletions test/integration/util/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const createDbUser = async (
)
} catch (e) {
throw new Error(
// @ts-ignore
`Failed to create user with email ${email} for integration tests: ${e.message}`,
)
}
Expand Down Expand Up @@ -49,6 +50,7 @@ export const deleteDbUser = async (email: string): Promise<void> => {
)
} catch (e) {
throw new Error(
// @ts-ignore
`Failed to delete user with email ${email} for integration tests: ${e.message}`,
)
}
Expand Down

0 comments on commit d15f55b

Please sign in to comment.