1
0
Fork 0

Update to latest typescript version (#274)

pull/276/head
Josh Gross 2019-12-27 19:42:30 -05:00 committed by eric sciple
parent 60d3096c71
commit 8a4134761f
6 changed files with 21 additions and 37 deletions

12
package-lock.json generated
View File

@ -11563,9 +11563,9 @@
"dev": true "dev": true
}, },
"prettier": { "prettier": {
"version": "1.17.0", "version": "1.19.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.0.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
"integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==", "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
"dev": true "dev": true
}, },
"prettier-linter-helpers": { "prettier-linter-helpers": {
@ -13134,9 +13134,9 @@
"dev": true "dev": true
}, },
"typescript": { "typescript": {
"version": "3.6.2", "version": "3.7.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.4.tgz",
"integrity": "sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==", "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==",
"dev": true "dev": true
}, },
"uglify-js": { "uglify-js": {

View File

@ -23,8 +23,8 @@
"jest": "^24.9.0", "jest": "^24.9.0",
"jest-circus": "^24.7.1", "jest-circus": "^24.7.1",
"lerna": "^3.18.4", "lerna": "^3.18.4",
"prettier": "^1.17.0", "prettier": "^1.19.1",
"ts-jest": "^24.0.2", "ts-jest": "^24.0.2",
"typescript": "^3.6.2" "typescript": "^3.7.4"
} }
} }

View File

@ -748,9 +748,7 @@ describe('@actions/exec', () => {
const exitCode = await exec.exec(`"${cmdPath}"`, args, options) const exitCode = await exec.exec(`"${cmdPath}"`, args, options)
expect(exitCode).toBe(0) expect(exitCode).toBe(0)
expect(outStream.getContents().split(os.EOL)[0]).toBe( expect(outStream.getContents().split(os.EOL)[0]).toBe(
`[command]${ `[command]${process.env.ComSpec} /D /S /C ""${cmdPath}" "my arg 1" "my arg 2""`
process.env.ComSpec
} /D /S /C ""${cmdPath}" "my arg 1" "my arg 2""`
) )
expect(output.trim()).toBe( expect(output.trim()).toBe(
'args[0]: "<quote>my arg 1<quote>"\r\n' + 'args[0]: "<quote>my arg 1<quote>"\r\n' +
@ -780,9 +778,7 @@ describe('@actions/exec', () => {
const exitCode = await exec.exec(`${cmd}`, args, options) const exitCode = await exec.exec(`${cmd}`, args, options)
expect(exitCode).toBe(0) expect(exitCode).toBe(0)
expect(outStream.getContents().split(os.EOL)[0]).toBe( expect(outStream.getContents().split(os.EOL)[0]).toBe(
`[command]${ `[command]${process.env.ComSpec} /D /S /C "${cmdPath} "my arg 1" "my arg 2""`
process.env.ComSpec
} /D /S /C "${cmdPath} "my arg 1" "my arg 2""`
) )
expect(output.trim()).toBe( expect(output.trim()).toBe(
'args[0]: "<quote>my arg 1<quote>"\r\n' + 'args[0]: "<quote>my arg 1<quote>"\r\n' +

View File

@ -639,23 +639,15 @@ class ExecState extends events.EventEmitter {
if (this.processExited) { if (this.processExited) {
if (this.processError) { if (this.processError) {
error = new Error( error = new Error(
`There was an error when attempting to execute the process '${ `There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`
this.toolPath
}'. This may indicate the process failed to start. Error: ${
this.processError
}`
) )
} else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {
error = new Error( error = new Error(
`The process '${this.toolPath}' failed with exit code ${ `The process '${this.toolPath}' failed with exit code ${this.processExitCode}`
this.processExitCode
}`
) )
} else if (this.processStderr && this.options.failOnStdErr) { } else if (this.processStderr && this.options.failOnStdErr) {
error = new Error( error = new Error(
`The process '${ `The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`
this.toolPath
}' failed because one or more lines were written to the STDERR stream`
) )
} }
} }

View File

@ -1171,9 +1171,9 @@ describe('which', () => {
const originalPath = process.env['PATH'] const originalPath = process.env['PATH']
try { try {
// modify PATH // modify PATH
process.env['PATH'] = `${process.env['PATH']}${ process.env[
path.delimiter 'PATH'
}${testPath}` ] = `${process.env['PATH']}${path.delimiter}${testPath}`
// find each file // find each file
for (const fileName of Object.keys(files)) { for (const fileName of Object.keys(files)) {
@ -1244,9 +1244,9 @@ describe('which', () => {
await fs.writeFile(notExpectedFilePath, '') await fs.writeFile(notExpectedFilePath, '')
const originalPath = process.env['PATH'] const originalPath = process.env['PATH']
try { try {
process.env['PATH'] = `${process.env['PATH']}${ process.env[
path.delimiter 'PATH'
}${testPath}` ] = `${process.env['PATH']}${path.delimiter}${testPath}`
expect(await io.which(fileName)).toBe(expectedFilePath) expect(await io.which(fileName)).toBe(expectedFilePath)
} finally { } finally {
process.env['PATH'] = originalPath process.env['PATH'] = originalPath

View File

@ -76,9 +76,7 @@ export async function downloadTool(
if (response.message.statusCode !== 200) { if (response.message.statusCode !== 200) {
const err = new HTTPError(response.message.statusCode) const err = new HTTPError(response.message.statusCode)
core.debug( core.debug(
`Failed to download from "${url}". Code(${ `Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`
response.message.statusCode
}) Message(${response.message.statusMessage})`
) )
throw err throw err
} }
@ -93,9 +91,7 @@ export async function downloadTool(
}) })
} catch (err) { } catch (err) {
core.debug( core.debug(
`Failed to download from "${url}". Code(${ `Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`
response.message.statusCode
}) Message(${response.message.statusMessage})`
) )
reject(err) reject(err)
} }