Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

devDeps: typescript 4 #1516

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
"nx": "16.6.0",
"prettier": "^3.0.0",
"ts-jest": "^27.0.5",
"typescript": "^3.9.9"
"typescript": "^4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/artifact/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/artifact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@
},
"devDependencies": {
"@types/archiver": "^5.3.2",
"typescript": "^4.3.0"
"typescript": "^4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/cache/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
"devDependencies": {
"@types/semver": "^6.0.0",
"@types/uuid": "^3.4.5",
"typescript": "^4.8.0"
"typescript": "^4.9.5"
}
}
8 changes: 4 additions & 4 deletions packages/cache/src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export async function restoreCache(
core.info('Cache restored successfully')

return cacheEntry.cacheKey
} catch (error) {
} catch (error: any) {
const typedError = error as Error
if (typedError.name === ValidationError.name) {
throw error
Expand All @@ -145,7 +145,7 @@ export async function restoreCache(
// Try to delete the archive to save space
try {
await utils.unlinkFile(archivePath)
} catch (error) {
} catch (error: any) {
core.debug(`Failed to delete archive: ${error}`)
}
}
Expand Down Expand Up @@ -238,7 +238,7 @@ export async function saveCache(

core.debug(`Saving Cache (ID: ${cacheId})`)
await cacheHttpClient.saveCache(cacheId, archivePath, options)
} catch (error) {
} catch (error: any) {
const typedError = error as Error
if (typedError.name === ValidationError.name) {
throw error
Expand All @@ -251,7 +251,7 @@ export async function saveCache(
// Try to delete the archive to save space
try {
await utils.unlinkFile(archivePath)
} catch (error) {
} catch (error: any) {
core.debug(`Failed to delete archive: ${error}`)
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/oidc-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class OidcClient {
const id_token = await OidcClient.getCall(id_token_url)
setSecret(id_token)
return id_token
} catch (error) {
} catch (error: any) {
throw new Error(`Error message: ${error.message}`)
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/exec/src/toolrunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class ToolRunner extends events.EventEmitter {
}

return s
} catch (err) {
} catch (err: any) {
// streaming lines to console is best effort. Don't fail a build.
this._debug(`error processing line. Failed with error ${err}`)

Expand Down
4 changes: 2 additions & 2 deletions packages/glob/src/internal-globber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class DefaultGlobber implements Globber {
// Intentionally using lstat. Detection for broken symlink
// will be performed later (if following symlinks).
await fs.promises.lstat(searchPath)
} catch (err) {
} catch (err: any) {
if (err.code === 'ENOENT') {
continue
}
Expand Down Expand Up @@ -197,7 +197,7 @@ export class DefaultGlobber implements Globber {
try {
// Use `stat` (following symlinks)
stats = await fs.promises.stat(item.path)
} catch (err) {
} catch (err: any) {
if (err.code === 'ENOENT') {
if (options.omitBrokenSymbolicLinks) {
core.debug(`Broken symlink '${item.path}'`)
Expand Down
2 changes: 1 addition & 1 deletion packages/http-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ export class HttpClient {
}

response.headers = res.message.headers
} catch (err) {
} catch (err: any) {
// Invalid resource (contents not json); leaving result obj null
}

Expand Down
8 changes: 4 additions & 4 deletions packages/io/src/io-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const READONLY = fs.constants.O_RDONLY
export async function exists(fsPath: string): Promise<boolean> {
try {
await stat(fsPath)
} catch (err) {
} catch (err: any) {
if (err.code === 'ENOENT') {
return false
}
Expand Down Expand Up @@ -77,7 +77,7 @@ export async function tryGetExecutablePath(
try {
// test file exists
stats = await stat(filePath)
} catch (err) {
} catch (err: any) {
if (err.code !== 'ENOENT') {
// eslint-disable-next-line no-console
console.log(
Expand Down Expand Up @@ -107,7 +107,7 @@ export async function tryGetExecutablePath(
stats = undefined
try {
stats = await stat(filePath)
} catch (err) {
} catch (err: any) {
if (err.code !== 'ENOENT') {
// eslint-disable-next-line no-console
console.log(
Expand All @@ -128,7 +128,7 @@ export async function tryGetExecutablePath(
break
}
}
} catch (err) {
} catch (err: any) {
// eslint-disable-next-line no-console
console.log(
`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`
Expand Down
4 changes: 2 additions & 2 deletions packages/io/src/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export async function rmRF(inputPath: string): Promise<void> {
recursive: true,
retryDelay: 300
})
} catch (err) {
} catch (err: any) {
throw new Error(`File was unable to be removed ${err}`)
}
}
Expand Down Expand Up @@ -305,7 +305,7 @@ async function copyFile(
try {
await ioUtil.lstat(destFile)
await ioUtil.unlink(destFile)
} catch (e) {
} catch (e: any) {
// Try to override file permission
if (e.code === 'EPERM') {
await ioUtil.chmod(destFile, '0666')
Expand Down
2 changes: 1 addition & 1 deletion packages/tool-cache/src/retry-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class RetryHelper {
// Try
try {
return await action()
} catch (err) {
} catch (err: any) {
if (isRetryable && !isRetryable(err)) {
throw err
}
Expand Down
2 changes: 1 addition & 1 deletion packages/tool-cache/src/tool-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ async function downloadToolAttempt(
core.debug('download failed')
try {
await io.rmRF(dest)
} catch (err) {
} catch (err: any) {
core.debug(`Failed to delete '${dest}'. ${err.message}`)
}
}
Expand Down
Loading