Skip to content

Commit 2ca5349

Browse files
dependabot[bot]github-actions[bot]Copilot
authored
Bump undici, @actions/http-client and @actions/github (#1620)
* Bump undici, @actions/http-client and @actions/github Bumps [undici](https://github.com/nodejs/undici) to 6.28.0 and updates ancestor dependencies [undici](https://github.com/nodejs/undici), [@actions/http-client](https://github.com/actions/toolkit/tree/HEAD/packages/http-client) and [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github). These dependencies need to be updated together. Updates `undici` from 5.29.0 to 6.28.0 - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v5.29.0...v6.28.0) Updates `@actions/http-client` from 3.0.1 to 3.0.2 - [Changelog](https://github.com/actions/toolkit/blob/main/packages/http-client/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/http-client) Updates `@actions/github` from 6.0.1 to 9.1.1 - [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github) --- updated-dependencies: - dependency-name: "@actions/github" dependency-version: 9.0.0 dependency-type: direct:production - dependency-name: "@actions/http-client" dependency-version: 3.0.2 dependency-type: direct:production - dependency-name: undici dependency-version: 6.23.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * [dependabot skip] Update dist/ with build changes * Fix GitHub action context imports * [dependabot skip] Update dist/ with build changes --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent b198bcc commit 2ca5349

11 files changed

Lines changed: 32310 additions & 28165 deletions

File tree

__mocks__/@actions/github.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const fs = require('fs')
2+
3+
class Context {
4+
constructor() {
5+
this.payload = process.env.GITHUB_EVENT_PATH
6+
? JSON.parse(fs.readFileSync(process.env.GITHUB_EVENT_PATH, 'utf8'))
7+
: {}
8+
this.eventName = process.env.GITHUB_EVENT_NAME
9+
this.actor = process.env.GITHUB_ACTOR
10+
}
11+
}
12+
13+
module.exports.context = new Context()

__tests__/inputs.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
import {Context} from '@actions/github/lib/context'
1+
import {context as githubContext} from '@actions/github'
22
import {getJobParameters} from '../src/inputs'
33
import {eventFixturePath} from './helpers'
44

5+
type Context = typeof githubContext
6+
const Context = githubContext.constructor as new () => Context
7+
58
let context: Context
69

710
describe('when there is a fully configured Actions environment', () => {

__tests__/main.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as core from '@actions/core'
2-
import {Context} from '@actions/github/lib/context'
2+
import {context as githubContext} from '@actions/github'
33
import {
44
ApiClient,
55
Credential,
@@ -16,6 +16,9 @@ import {run, credentialsFromEnv, getPackagesCredential} from '../src/main'
1616

1717
import {eventFixturePath} from './helpers'
1818

19+
type Context = typeof githubContext
20+
const Context = githubContext.constructor as new () => Context
21+
1922
// We do not need to build actual containers or run updates for this test.
2023
jest.mock('../src/image-service')
2124
jest.mock('../src/updater')

dist/cleanup.js

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

dist/main.js

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

jest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ module.exports = {
44
testEnvironment: 'node',
55
testMatch: ['**/*.test.ts'],
66
testRunner: 'jest-circus/runner',
7+
moduleNameMapper: {
8+
'^@actions/github$': '<rootDir>/__mocks__/@actions/github.js'
9+
},
710
transform: {
811
'^.+\\.ts$': 'ts-jest'
912
},

0 commit comments

Comments
 (0)