Skip to content

Commit

Permalink
Update to latest typescript version (actions#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmgross authored and ericsciple committed Dec 28, 2019
1 parent 60d3096 commit 8a41347
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 37 deletions.
12 changes: 6 additions & 6 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
Expand Up @@ -23,8 +23,8 @@
"jest": "^24.9.0",
"jest-circus": "^24.7.1",
"lerna": "^3.18.4",
"prettier": "^1.17.0",
"prettier": "^1.19.1",
"ts-jest": "^24.0.2",
"typescript": "^3.6.2"
"typescript": "^3.7.4"
}
}
8 changes: 2 additions & 6 deletions packages/exec/__tests__/exec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,7 @@ describe('@actions/exec', () => {
const exitCode = await exec.exec(`"${cmdPath}"`, args, options)
expect(exitCode).toBe(0)
expect(outStream.getContents().split(os.EOL)[0]).toBe(
`[command]${
process.env.ComSpec
} /D /S /C ""${cmdPath}" "my arg 1" "my arg 2""`
`[command]${process.env.ComSpec} /D /S /C ""${cmdPath}" "my arg 1" "my arg 2""`
)
expect(output.trim()).toBe(
'args[0]: "<quote>my arg 1<quote>"\r\n' +
Expand Down Expand Up @@ -780,9 +778,7 @@ describe('@actions/exec', () => {
const exitCode = await exec.exec(`${cmd}`, args, options)
expect(exitCode).toBe(0)
expect(outStream.getContents().split(os.EOL)[0]).toBe(
`[command]${
process.env.ComSpec
} /D /S /C "${cmdPath} "my arg 1" "my arg 2""`
`[command]${process.env.ComSpec} /D /S /C "${cmdPath} "my arg 1" "my arg 2""`
)
expect(output.trim()).toBe(
'args[0]: "<quote>my arg 1<quote>"\r\n' +
Expand Down
14 changes: 3 additions & 11 deletions packages/exec/src/toolrunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,23 +639,15 @@ class ExecState extends events.EventEmitter {
if (this.processExited) {
if (this.processError) {
error = new Error(
`There was an error when attempting to execute the process '${
this.toolPath
}'. This may indicate the process failed to start. Error: ${
this.processError
}`
`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`
)
} else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {
error = new Error(
`The process '${this.toolPath}' failed with exit code ${
this.processExitCode
}`
`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`
)
} else if (this.processStderr && this.options.failOnStdErr) {
error = new Error(
`The process '${
this.toolPath
}' failed because one or more lines were written to the STDERR stream`
`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`
)
}
}
Expand Down
12 changes: 6 additions & 6 deletions packages/io/__tests__/io.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1171,9 +1171,9 @@ describe('which', () => {
const originalPath = process.env['PATH']
try {
// modify PATH
process.env['PATH'] = `${process.env['PATH']}${
path.delimiter
}${testPath}`
process.env[
'PATH'
] = `${process.env['PATH']}${path.delimiter}${testPath}`

// find each file
for (const fileName of Object.keys(files)) {
Expand Down Expand Up @@ -1244,9 +1244,9 @@ describe('which', () => {
await fs.writeFile(notExpectedFilePath, '')
const originalPath = process.env['PATH']
try {
process.env['PATH'] = `${process.env['PATH']}${
path.delimiter
}${testPath}`
process.env[
'PATH'
] = `${process.env['PATH']}${path.delimiter}${testPath}`
expect(await io.which(fileName)).toBe(expectedFilePath)
} finally {
process.env['PATH'] = originalPath
Expand Down
8 changes: 2 additions & 6 deletions packages/tool-cache/src/tool-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ export async function downloadTool(
if (response.message.statusCode !== 200) {
const err = new HTTPError(response.message.statusCode)
core.debug(
`Failed to download from "${url}". Code(${
response.message.statusCode
}) Message(${response.message.statusMessage})`
`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`
)
throw err
}
Expand All @@ -93,9 +91,7 @@ export async function downloadTool(
})
} catch (err) {
core.debug(
`Failed to download from "${url}". Code(${
response.message.statusCode
}) Message(${response.message.statusMessage})`
`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`
)
reject(err)
}
Expand Down

0 comments on commit 8a41347

Please sign in to comment.