Skip to content

Commit

Permalink
fix dependabot alerts (#57)
Browse files Browse the repository at this point in the history
* nock 13.5.1

* Revert "nock 13.5.1"

This reverts commit dd1d7ad.

* mock commit

* Revert "mock commit"

This reverts commit 10c7bab.

* @zeit/ncc replaced by @vercel/ncc

* nock 13.5.4

* typescript 3.9.7

* ts-standard 12.0.2

* ts-jest 26.5.6

* @types/node 17.0.41

* @types/jest 27.4.1

* @typescript-eslint/parser 7.1.1

* @types/sinon 17.0.3

* js-yaml 4.1.0

* @types/node and typescript

* jest 26.6.3

* typescript code cleanup

* jest and related

* jest 28.1.3

* jest-circus and sinon

* typescript 4.9.5

* @slack/web-api 7.0.2

* @actions/core 1.6.0

* reverting console.error

* version bump
  • Loading branch information
jpg619 authored Mar 5, 2024
1 parent 803b4eb commit 92d23e2
Show file tree
Hide file tree
Showing 9 changed files with 65,650 additions and 62,332 deletions.
56,785 changes: 28,121 additions & 28,664 deletions dist/main/index.js

Large diffs are not rendered by default.

56,566 changes: 28,010 additions & 28,556 deletions dist/post/index.js

Large diffs are not rendered by default.

14,581 changes: 9,494 additions & 5,087 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "action-deploy",
"version": "2.4.0",
"version": "2.5.0",
"private": true,
"description": "Action to manage GitHub deployments",
"main": "lib/main.js",
Expand All @@ -24,25 +24,25 @@
"author": "radiantspace",
"license": "MIT",
"dependencies": {
"@actions/core": "1.2.6",
"@actions/core": "1.6.0",
"@actions/github": "2.2.0",
"@slack/web-api": "^5.11.0"
"@slack/web-api": "^7.0.2"
},
"devDependencies": {
"@types/jest": "^24.0.23",
"@types/node": "^12.7.12",
"@types/sinon": "^9.0.4",
"@typescript-eslint/parser": "^2.8.0",
"@zeit/ncc": "^0.20.5",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.24",
"@types/sinon": "^17.0.3",
"@typescript-eslint/parser": "^7.1.1",
"@vercel/ncc": "^0.38.1",
"git-validate": "^2.2.4",
"jest": "^24.9.0",
"jest-circus": "^24.9.0",
"js-yaml": "^3.13.1",
"nock": "^13.0.2",
"sinon": "^9.0.2",
"ts-jest": "^26.3.0",
"ts-standard": "^8.0.1",
"typescript": "^3.6.4"
"jest": "^28.1.3",
"jest-circus": "^29.7.0",
"js-yaml": "^4.1.0",
"nock": "^13.5.4",
"sinon": "^17.0.1",
"ts-jest": "^29.1.2",
"ts-standard": "^12.0.2",
"typescript": "^4.9.5"
},
"pre-commit": [
"all"
Expand Down
2 changes: 1 addition & 1 deletion src/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async function getMainSha (client: GitHub, branch: string): Promise<string> {
const sha = response.data.commit.sha
console.log(`${branch} branch sha: ${sha}`)
return sha
} catch (error) {
} catch (error: any) {
console.error(error.message)
return `no_${branch}`
}
Expand Down
8 changes: 4 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function run (): Promise<void> {
const shouldRequireDeploymentId = type === 'delete'
deploymentId = getInput(DEPLOYMENT_ID_STATE_NAME, { required: shouldRequireDeploymentId }) ?? '0'
console.log(`deploymentId: ${deploymentId}`)
} catch (error) {
} catch (error: any) {
core.error(error)
core.setFailed(`Wrong parameters given: ${JSON.stringify(error, null, 2)}`)
throw error
Expand Down Expand Up @@ -81,7 +81,7 @@ export async function run (): Promise<void> {
console.log(`saveState::${DEPLOYMENT_ID_STATE_NAME}: ${deploymentId}`)
core.saveState(DEPLOYMENT_ID_STATE_NAME, deploymentId) // for internal use
core.setOutput(DEPLOYMENT_ID_STATE_NAME, deploymentId) // keep that output for external dependencies
} catch (error) {
} catch (error: any) {
core.error(error)
core.setFailed(`Create deployment failed: ${JSON.stringify(error, null, 2)}`)
throw error
Expand All @@ -93,7 +93,7 @@ export async function run (): Promise<void> {
client,
Number(deploymentId)
)
} catch (error) {
} catch (error: any) {
core.error(error)
core.setFailed(`Delete deployment failed: ${JSON.stringify(error, null, 2)}`)
throw error
Expand All @@ -105,7 +105,7 @@ export async function run (): Promise<void> {
client,
environment
)
} catch (error) {
} catch (error: any) {
core.error(error)
core.setFailed(`Delete all deployments failed: ${JSON.stringify(error, null, 2)}`)
throw error
Expand Down
4 changes: 2 additions & 2 deletions src/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export async function post (): Promise<void> {

deploymentConfidenceUrl = getInput('deployment_confidence_url') ?? ''
console.log(`deployment confidence dashboard URL: ${deploymentConfidenceUrl}`)
} catch (error) {
} catch (error: any) {
core.error(error)
core.setFailed(`Wrong parameters given: ${JSON.stringify(error, null, 2)}`)
throw error
Expand All @@ -81,7 +81,7 @@ export async function post (): Promise<void> {
try {
// If the deployment was managed by another workflow we don't want to mutate it here
if (mutateDeployment) await complete(client, Number(deploymentId), status)
} catch (error) {
} catch (error: any) {
if (error.name === 'HttpError' && error.status === 404) {
console.log('Couldn\'t complete a deployment: not found')
return
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export async function postSlackNotification (
// API description - https://api.slack.com/methods/chat.postMessage
await slackClient.chat.postMessage(slackParams)
console.log(`Slack message posted to channel: ${slackChannel}`)
} catch (error) {
} catch (error: any) {
core.error(error)
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('create', () => {
try {
await main.run()
expect('this should not be reached').toEqual('')
} catch (error) {
} catch (error: any) {
expect(error.message).toEqual("{\"resource\":\"DeploymentStatus\",\"code\":\"custom\",\"field\":\"environment_url\",\"message\":\"environment_url must use http(s) scheme\"}")
}

Expand Down

0 comments on commit 92d23e2

Please sign in to comment.