Skip to content

Commit 92d23e2

Browse files
authored
fix dependabot alerts (#57)
* 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
1 parent 803b4eb commit 92d23e2

File tree

9 files changed

+65650
-62332
lines changed

9 files changed

+65650
-62332
lines changed

dist/main/index.js

Lines changed: 28121 additions & 28664 deletions
Large diffs are not rendered by default.

dist/post/index.js

Lines changed: 28010 additions & 28556 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 9494 additions & 5087 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "action-deploy",
3-
"version": "2.4.0",
3+
"version": "2.5.0",
44
"private": true,
55
"description": "Action to manage GitHub deployments",
66
"main": "lib/main.js",
@@ -24,25 +24,25 @@
2424
"author": "radiantspace",
2525
"license": "MIT",
2626
"dependencies": {
27-
"@actions/core": "1.2.6",
27+
"@actions/core": "1.6.0",
2828
"@actions/github": "2.2.0",
29-
"@slack/web-api": "^5.11.0"
29+
"@slack/web-api": "^7.0.2"
3030
},
3131
"devDependencies": {
32-
"@types/jest": "^24.0.23",
33-
"@types/node": "^12.7.12",
34-
"@types/sinon": "^9.0.4",
35-
"@typescript-eslint/parser": "^2.8.0",
36-
"@zeit/ncc": "^0.20.5",
32+
"@types/jest": "^29.5.12",
33+
"@types/node": "^20.11.24",
34+
"@types/sinon": "^17.0.3",
35+
"@typescript-eslint/parser": "^7.1.1",
36+
"@vercel/ncc": "^0.38.1",
3737
"git-validate": "^2.2.4",
38-
"jest": "^24.9.0",
39-
"jest-circus": "^24.9.0",
40-
"js-yaml": "^3.13.1",
41-
"nock": "^13.0.2",
42-
"sinon": "^9.0.2",
43-
"ts-jest": "^26.3.0",
44-
"ts-standard": "^8.0.1",
45-
"typescript": "^3.6.4"
38+
"jest": "^28.1.3",
39+
"jest-circus": "^29.7.0",
40+
"js-yaml": "^4.1.0",
41+
"nock": "^13.5.4",
42+
"sinon": "^17.0.1",
43+
"ts-jest": "^29.1.2",
44+
"ts-standard": "^12.0.2",
45+
"typescript": "^4.9.5"
4646
},
4747
"pre-commit": [
4848
"all"

src/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async function getMainSha (client: GitHub, branch: string): Promise<string> {
4848
const sha = response.data.commit.sha
4949
console.log(`${branch} branch sha: ${sha}`)
5050
return sha
51-
} catch (error) {
51+
} catch (error: any) {
5252
console.error(error.message)
5353
return `no_${branch}`
5454
}

src/main.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export async function run (): Promise<void> {
5151
const shouldRequireDeploymentId = type === 'delete'
5252
deploymentId = getInput(DEPLOYMENT_ID_STATE_NAME, { required: shouldRequireDeploymentId }) ?? '0'
5353
console.log(`deploymentId: ${deploymentId}`)
54-
} catch (error) {
54+
} catch (error: any) {
5555
core.error(error)
5656
core.setFailed(`Wrong parameters given: ${JSON.stringify(error, null, 2)}`)
5757
throw error
@@ -81,7 +81,7 @@ export async function run (): Promise<void> {
8181
console.log(`saveState::${DEPLOYMENT_ID_STATE_NAME}: ${deploymentId}`)
8282
core.saveState(DEPLOYMENT_ID_STATE_NAME, deploymentId) // for internal use
8383
core.setOutput(DEPLOYMENT_ID_STATE_NAME, deploymentId) // keep that output for external dependencies
84-
} catch (error) {
84+
} catch (error: any) {
8585
core.error(error)
8686
core.setFailed(`Create deployment failed: ${JSON.stringify(error, null, 2)}`)
8787
throw error
@@ -93,7 +93,7 @@ export async function run (): Promise<void> {
9393
client,
9494
Number(deploymentId)
9595
)
96-
} catch (error) {
96+
} catch (error: any) {
9797
core.error(error)
9898
core.setFailed(`Delete deployment failed: ${JSON.stringify(error, null, 2)}`)
9999
throw error
@@ -105,7 +105,7 @@ export async function run (): Promise<void> {
105105
client,
106106
environment
107107
)
108-
} catch (error) {
108+
} catch (error: any) {
109109
core.error(error)
110110
core.setFailed(`Delete all deployments failed: ${JSON.stringify(error, null, 2)}`)
111111
throw error

src/post.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export async function post (): Promise<void> {
5454

5555
deploymentConfidenceUrl = getInput('deployment_confidence_url') ?? ''
5656
console.log(`deployment confidence dashboard URL: ${deploymentConfidenceUrl}`)
57-
} catch (error) {
57+
} catch (error: any) {
5858
core.error(error)
5959
core.setFailed(`Wrong parameters given: ${JSON.stringify(error, null, 2)}`)
6060
throw error
@@ -81,7 +81,7 @@ export async function post (): Promise<void> {
8181
try {
8282
// If the deployment was managed by another workflow we don't want to mutate it here
8383
if (mutateDeployment) await complete(client, Number(deploymentId), status)
84-
} catch (error) {
84+
} catch (error: any) {
8585
if (error.name === 'HttpError' && error.status === 404) {
8686
console.log('Couldn\'t complete a deployment: not found')
8787
return

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export async function postSlackNotification (
9090
// API description - https://api.slack.com/methods/chat.postMessage
9191
await slackClient.chat.postMessage(slackParams)
9292
console.log(`Slack message posted to channel: ${slackChannel}`)
93-
} catch (error) {
93+
} catch (error: any) {
9494
core.error(error)
9595
}
9696
}

tests/main.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ describe('create', () => {
8888
try {
8989
await main.run()
9090
expect('this should not be reached').toEqual('')
91-
} catch (error) {
91+
} catch (error: any) {
9292
expect(error.message).toEqual("{\"resource\":\"DeploymentStatus\",\"code\":\"custom\",\"field\":\"environment_url\",\"message\":\"environment_url must use http(s) scheme\"}")
9393
}
9494

0 commit comments

Comments
 (0)