Skip to content

Commit

Permalink
Bump TypeScript from v3.9.7 to v4.5.5
Browse files Browse the repository at this point in the history
I intended to use 'type' imports & optional-chaining / null coalescing features, so I upgraded TS, but unfortunately, those features can't be used in this repo until tslint is replaced with ESLint
  • Loading branch information
fbartho committed Feb 1, 2022
1 parent e22faa1 commit 0253cf2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0",
"typedoc": "0.9.0",
"typescript": "^3.9.7",
"typescript": "^4.5.5",
"typescript-json-schema": "^0.32.0"
},
"dependencies": {
Expand Down
6 changes: 3 additions & 3 deletions scripts/run-fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// Toggle this on to update the JSON files for each run
// or use `yarn test:update-fixtures`
const writeResults = false || process.argv.includes('--update')
const writeResults = false || process.argv.includes("--update")

const fs = require("fs")
const child_process = require("child_process")
Expand All @@ -32,7 +32,7 @@ const fixtures = fs

let runCount = 0

console.log("Running Fixures for Danger JS. This uses the built version of danger.\n")
console.log("Running Fixtures for Danger JS. This uses the built version of danger.\n")

// Runs the danger runner over a fixture, then compares it to the
// fixtured JSON data
Expand Down Expand Up @@ -107,7 +107,7 @@ const next = () => {
}
}

process.on("unhandledRejection", function (reason, _p) {
process.on("unhandledRejection", function(reason, _p) {
console.log(chalk.red("Error: "), reason)
process.exitCode = 1
})
Expand Down
2 changes: 1 addition & 1 deletion source/platforms/gitlab/GitLabAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class GitLabAPI {
} catch (e) {
this.d("getFileContents", e)
// GitHubAPI.fileContents returns "" when the file does not exist, keep it consistent across providers
if (e.response.status === 404) {
if ((e as any).response.status === 404) {
return ""
}
throw e
Expand Down
2 changes: 1 addition & 1 deletion source/runner/Executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class Executor {
try {
results = await this.runner.runDangerfileEnvironment([file], [undefined], runtime)
} catch (error) {
results = this.resultsForError(error)
results = this.resultsForError(error as Error)
}

await this.handleResults(results, runtime.danger.git)
Expand Down
2 changes: 1 addition & 1 deletion source/runner/runners/inline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const runDangerfileEnvironment = async (
d("Got a parse error: ", error)

// Call the internal functions to fail the build
const errorResults = resultsForCaughtError(filename, content, error)
const errorResults = resultsForCaughtError(filename, content, error as Error)
environment.markdown(errorResults.markdowns[0].message)
environment.fail(errorResults.fails[0].message)
}
Expand Down

0 comments on commit 0253cf2

Please sign in to comment.