Merge pull request #894 from peter-evans/update-dependencies

Update dependencies
This commit is contained in:
Peter Evans 2021-09-02 14:10:28 +09:00 committed by GitHub
commit 95767e7d51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 1783 additions and 3225 deletions

View file

@ -58,7 +58,7 @@ describe('utils tests', () => {
utils.getRemoteDetail(remoteUrl) utils.getRemoteDetail(remoteUrl)
// Fail the test if an error wasn't thrown // Fail the test if an error wasn't thrown
expect(true).toEqual(false) expect(true).toEqual(false)
} catch (e) { } catch (e: any) {
expect(e.message).toEqual( expect(e.message).toEqual(
`The format of '${remoteUrl}' is not a valid GitHub repository URL` `The format of '${remoteUrl}' is not a valid GitHub repository URL`
) )
@ -104,7 +104,7 @@ describe('utils tests', () => {
utils.parseDisplayNameEmail(displayNameEmail1) utils.parseDisplayNameEmail(displayNameEmail1)
// Fail the test if an error wasn't thrown // Fail the test if an error wasn't thrown
expect(true).toEqual(false) expect(true).toEqual(false)
} catch (e) { } catch (e: any) {
expect(e.message).toEqual( expect(e.message).toEqual(
`The format of '${displayNameEmail1}' is not a valid email address with display name` `The format of '${displayNameEmail1}' is not a valid email address with display name`
) )
@ -115,7 +115,7 @@ describe('utils tests', () => {
utils.parseDisplayNameEmail(displayNameEmail2) utils.parseDisplayNameEmail(displayNameEmail2)
// Fail the test if an error wasn't thrown // Fail the test if an error wasn't thrown
expect(true).toEqual(false) expect(true).toEqual(false)
} catch (e) { } catch (e: any) {
expect(e.message).toEqual( expect(e.message).toEqual(
`The format of '${displayNameEmail2}' is not a valid email address with display name` `The format of '${displayNameEmail2}' is not a valid email address with display name`
) )

74
dist/index.js vendored

File diff suppressed because one or more lines are too long

4890
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -29,27 +29,27 @@
}, },
"homepage": "https://github.com/peter-evans/create-pull-request", "homepage": "https://github.com/peter-evans/create-pull-request",
"dependencies": { "dependencies": {
"@actions/core": "1.4.0", "@actions/core": "1.5.0",
"@actions/exec": "1.1.0", "@actions/exec": "1.1.0",
"@octokit/core": "3.5.1", "@octokit/core": "3.5.1",
"@octokit/plugin-paginate-rest": "2.14.0", "@octokit/plugin-paginate-rest": "2.16.0",
"@octokit/plugin-rest-endpoint-methods": "5.5.0", "@octokit/plugin-rest-endpoint-methods": "5.9.0",
"https-proxy-agent": "5.0.0", "https-proxy-agent": "5.0.0",
"uuid": "8.3.2" "uuid": "8.3.2"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "26.0.24", "@types/jest": "27.0.1",
"@types/node": "16.4.0", "@types/node": "16.7.10",
"@typescript-eslint/parser": "4.28.4", "@typescript-eslint/parser": "4.30.0",
"@vercel/ncc": "0.29.0", "@vercel/ncc": "0.30.0",
"eslint": "7.31.0", "eslint": "7.32.0",
"eslint-plugin-github": "4.1.5", "eslint-plugin-github": "4.2.0",
"eslint-plugin-jest": "24.4.0", "eslint-plugin-jest": "24.4.0",
"jest": "27.0.6", "jest": "27.1.0",
"jest-circus": "27.0.6", "jest-circus": "27.1.0",
"js-yaml": "4.1.0", "js-yaml": "4.1.0",
"prettier": "2.3.2", "prettier": "2.3.2",
"ts-jest": "27.0.4", "ts-jest": "27.0.5",
"typescript": "4.3.5" "typescript": "4.4.2"
} }
} }

View file

@ -237,7 +237,7 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
} }
} }
} }
} catch (error) { } catch (error: any) {
core.setFailed(error.message) core.setFailed(error.message)
} finally { } finally {
// Remove auth and restore persisted auth config if it existed // Remove auth and restore persisted auth config if it existed

View file

@ -33,7 +33,7 @@ export class GitAuthHelper {
try { try {
await this.setExtraheaderConfig(this.persistedExtraheaderConfigValue) await this.setExtraheaderConfig(this.persistedExtraheaderConfigValue)
core.info('Persisted git credentials restored') core.info('Persisted git credentials restored')
} catch (e) { } catch (e: any) {
core.warning(e) core.warning(e)
} }
} }

View file

@ -60,7 +60,7 @@ export class GitHubHelper {
html_url: pull.html_url, html_url: pull.html_url,
created: true created: true
} }
} catch (e) { } catch (e: any) {
if ( if (
e.message && e.message &&
e.message.includes(`A pull request already exists for ${headBranch}`) e.message.includes(`A pull request already exists for ${headBranch}`)
@ -165,7 +165,7 @@ export class GitHubHelper {
pull_number: pull.number, pull_number: pull.number,
...requestReviewersParams ...requestReviewersParams
}) })
} catch (e) { } catch (e: any) {
if (e.message && e.message.includes(ERROR_PR_REVIEW_FROM_AUTHOR)) { if (e.message && e.message.includes(ERROR_PR_REVIEW_FROM_AUTHOR)) {
core.warning(ERROR_PR_REVIEW_FROM_AUTHOR) core.warning(ERROR_PR_REVIEW_FROM_AUTHOR)
} else { } else {

View file

@ -29,7 +29,7 @@ async function run(): Promise<void> {
core.debug(`Inputs: ${inspect(inputs)}`) core.debug(`Inputs: ${inspect(inputs)}`)
await createPullRequest(inputs) await createPullRequest(inputs)
} catch (error) { } catch (error: any) {
core.setFailed(error.message) core.setFailed(error.message)
} }
} }

View file

@ -134,7 +134,7 @@ export function fileExistsSync(path: string): boolean {
let stats: fs.Stats let stats: fs.Stats
try { try {
stats = fs.statSync(path) stats = fs.statSync(path)
} catch (error) { } catch (error: any) {
if (error.code === 'ENOENT') { if (error.code === 'ENOENT') {
return false return false
} }