{
const file = await fs.promises.readFile(testFilePath, {encoding: 'utf8'})
@@ -67,11 +68,12 @@ const fixtures = {
}
}
-describe('@actions/core/src/markdown-summary', () => {
+describe('@actions/core/src/summary', () => {
beforeEach(async () => {
process.env[SUMMARY_ENV_VAR] = testFilePath
+ await fs.promises.mkdir(testDirectoryPath, {recursive: true})
await fs.promises.writeFile(testFilePath, '', {encoding: 'utf8'})
- markdownSummary.emptyBuffer()
+ summary.emptyBuffer()
})
afterAll(async () => {
@@ -80,39 +82,39 @@ describe('@actions/core/src/markdown-summary', () => {
it('throws if summary env var is undefined', async () => {
process.env[SUMMARY_ENV_VAR] = undefined
- const write = markdownSummary.addRaw(fixtures.text).write()
+ const write = summary.addRaw(fixtures.text).write()
await expect(write).rejects.toThrow()
})
it('throws if summary file does not exist', async () => {
await fs.promises.unlink(testFilePath)
- const write = markdownSummary.addRaw(fixtures.text).write()
+ const write = summary.addRaw(fixtures.text).write()
await expect(write).rejects.toThrow()
})
it('appends text to summary file', async () => {
await fs.promises.writeFile(testFilePath, '# ', {encoding: 'utf8'})
- await markdownSummary.addRaw(fixtures.text).write()
+ await summary.addRaw(fixtures.text).write()
await assertSummary(`# ${fixtures.text}`)
})
it('overwrites text to summary file', async () => {
await fs.promises.writeFile(testFilePath, 'overwrite', {encoding: 'utf8'})
- await markdownSummary.addRaw(fixtures.text).write({overwrite: true})
+ await summary.addRaw(fixtures.text).write({overwrite: true})
await assertSummary(fixtures.text)
})
it('appends text with EOL to summary file', async () => {
await fs.promises.writeFile(testFilePath, '# ', {encoding: 'utf8'})
- await markdownSummary.addRaw(fixtures.text, true).write()
+ await summary.addRaw(fixtures.text, true).write()
await assertSummary(`# ${fixtures.text}${os.EOL}`)
})
it('chains appends text to summary file', async () => {
await fs.promises.writeFile(testFilePath, '', {encoding: 'utf8'})
- await markdownSummary
+ await summary
.addRaw(fixtures.text)
.addRaw(fixtures.text)
.addRaw(fixtures.text)
@@ -122,33 +124,33 @@ describe('@actions/core/src/markdown-summary', () => {
it('empties buffer after write', async () => {
await fs.promises.writeFile(testFilePath, '', {encoding: 'utf8'})
- await markdownSummary.addRaw(fixtures.text).write()
+ await summary.addRaw(fixtures.text).write()
await assertSummary(fixtures.text)
- expect(markdownSummary.isEmptyBuffer()).toBe(true)
+ expect(summary.isEmptyBuffer()).toBe(true)
})
it('returns summary buffer as string', () => {
- markdownSummary.addRaw(fixtures.text)
- expect(markdownSummary.stringify()).toEqual(fixtures.text)
+ summary.addRaw(fixtures.text)
+ expect(summary.stringify()).toEqual(fixtures.text)
})
it('return correct values for isEmptyBuffer', () => {
- markdownSummary.addRaw(fixtures.text)
- expect(markdownSummary.isEmptyBuffer()).toBe(false)
+ summary.addRaw(fixtures.text)
+ expect(summary.isEmptyBuffer()).toBe(false)
- markdownSummary.emptyBuffer()
- expect(markdownSummary.isEmptyBuffer()).toBe(true)
+ summary.emptyBuffer()
+ expect(summary.isEmptyBuffer()).toBe(true)
})
it('clears a buffer and summary file', async () => {
await fs.promises.writeFile(testFilePath, 'content', {encoding: 'utf8'})
- await markdownSummary.clear()
+ await summary.clear()
await assertSummary('')
- expect(markdownSummary.isEmptyBuffer()).toBe(true)
+ expect(summary.isEmptyBuffer()).toBe(true)
})
it('adds EOL', async () => {
- await markdownSummary
+ await summary
.addRaw(fixtures.text)
.addEOL()
.write()
@@ -156,37 +158,37 @@ describe('@actions/core/src/markdown-summary', () => {
})
it('adds a code block without language', async () => {
- await markdownSummary.addCodeBlock(fixtures.code).write()
+ await summary.addCodeBlock(fixtures.code).write()
const expected = `func fork() {\n for {\n go fork()\n }\n}
${os.EOL}`
await assertSummary(expected)
})
it('adds a code block with a language', async () => {
- await markdownSummary.addCodeBlock(fixtures.code, 'go').write()
+ await summary.addCodeBlock(fixtures.code, 'go').write()
const expected = `func fork() {\n for {\n go fork()\n }\n}
${os.EOL}`
await assertSummary(expected)
})
it('adds an unordered list', async () => {
- await markdownSummary.addList(fixtures.list).write()
+ await summary.addList(fixtures.list).write()
const expected = `${os.EOL}`
await assertSummary(expected)
})
it('adds an ordered list', async () => {
- await markdownSummary.addList(fixtures.list, true).write()
+ await summary.addList(fixtures.list, true).write()
const expected = `- foo
- bar
- baz
- 💣
${os.EOL}`
await assertSummary(expected)
})
it('adds a table', async () => {
- await markdownSummary.addTable(fixtures.table).write()
+ await summary.addTable(fixtures.table).write()
const expected = `foo | bar | baz | tall |
---|
one | two | three |
wide |
${os.EOL}`
await assertSummary(expected)
})
it('adds a details element', async () => {
- await markdownSummary
+ await summary
.addDetails(fixtures.details.label, fixtures.details.content)
.write()
const expected = `open me
🎉 surprise ${os.EOL}`
@@ -194,13 +196,13 @@ describe('@actions/core/src/markdown-summary', () => {
})
it('adds an image with alt text', async () => {
- await markdownSummary.addImage(fixtures.img.src, fixtures.img.alt).write()
+ await summary.addImage(fixtures.img.src, fixtures.img.alt).write()
const expected = `${os.EOL}`
await assertSummary(expected)
})
it('adds an image with custom dimensions', async () => {
- await markdownSummary
+ await summary
.addImage(fixtures.img.src, fixtures.img.alt, fixtures.img.options)
.write()
const expected = `${os.EOL}`
@@ -208,7 +210,7 @@ describe('@actions/core/src/markdown-summary', () => {
})
it('adds an image with custom dimensions', async () => {
- await markdownSummary
+ await summary
.addImage(fixtures.img.src, fixtures.img.alt, fixtures.img.options)
.write()
const expected = `${os.EOL}`
@@ -217,21 +219,21 @@ describe('@actions/core/src/markdown-summary', () => {
it('adds headings h1...h6', async () => {
for (const i of [1, 2, 3, 4, 5, 6]) {
- markdownSummary.addHeading('heading', i)
+ summary.addHeading('heading', i)
}
- await markdownSummary.write()
+ await summary.write()
const expected = `heading
${os.EOL}heading
${os.EOL}heading
${os.EOL}heading
${os.EOL}heading
${os.EOL}heading
${os.EOL}`
await assertSummary(expected)
})
it('adds h1 if heading level not specified', async () => {
- await markdownSummary.addHeading('heading').write()
+ await summary.addHeading('heading').write()
const expected = `heading
${os.EOL}`
await assertSummary(expected)
})
it('uses h1 if heading level is garbage or out of range', async () => {
- await markdownSummary
+ await summary
.addHeading('heading', 'foobar')
.addHeading('heading', 1337)
.addHeading('heading', -1)
@@ -242,35 +244,31 @@ describe('@actions/core/src/markdown-summary', () => {
})
it('adds a separator', async () => {
- await markdownSummary.addSeparator().write()
+ await summary.addSeparator().write()
const expected = `
${os.EOL}`
await assertSummary(expected)
})
it('adds a break', async () => {
- await markdownSummary.addBreak().write()
+ await summary.addBreak().write()
const expected = `
${os.EOL}`
await assertSummary(expected)
})
it('adds a quote', async () => {
- await markdownSummary.addQuote(fixtures.quote.text).write()
+ await summary.addQuote(fixtures.quote.text).write()
const expected = `Where the world builds software
${os.EOL}`
await assertSummary(expected)
})
it('adds a quote with citation', async () => {
- await markdownSummary
- .addQuote(fixtures.quote.text, fixtures.quote.cite)
- .write()
+ await summary.addQuote(fixtures.quote.text, fixtures.quote.cite).write()
const expected = `Where the world builds software
${os.EOL}`
await assertSummary(expected)
})
it('adds a link with href', async () => {
- await markdownSummary
- .addLink(fixtures.link.text, fixtures.link.href)
- .write()
+ await summary.addLink(fixtures.link.text, fixtures.link.href).write()
const expected = `GitHub${os.EOL}`
await assertSummary(expected)
})
diff --git a/packages/core/src/core.ts b/packages/core/src/core.ts
index 8a9170ca..97073839 100644
--- a/packages/core/src/core.ts
+++ b/packages/core/src/core.ts
@@ -361,6 +361,6 @@ export async function getIDToken(aud?: string): Promise {
}
/**
- * Markdown summary exports
+ * Summary exports
*/
-export {markdownSummary} from './markdown-summary'
+export {summary} from './summary'
diff --git a/packages/core/src/markdown-summary.ts b/packages/core/src/summary.ts
similarity index 80%
rename from packages/core/src/markdown-summary.ts
rename to packages/core/src/summary.ts
index 97d2d3ca..41db1de1 100644
--- a/packages/core/src/markdown-summary.ts
+++ b/packages/core/src/summary.ts
@@ -4,7 +4,7 @@ const {access, appendFile, writeFile} = promises
export const SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'
export const SUMMARY_DOCS_URL =
- 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary'
+ 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'
export type SummaryTableRow = (SummaryTableCell | string)[]
@@ -51,7 +51,7 @@ export interface SummaryWriteOptions {
overwrite?: boolean
}
-class MarkdownSummary {
+class Summary {
private _buffer: string
private _filePath?: string
@@ -73,7 +73,7 @@ class MarkdownSummary {
const pathFromEnv = process.env[SUMMARY_ENV_VAR]
if (!pathFromEnv) {
throw new Error(
- `Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports markdown summaries.`
+ `Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`
)
}
@@ -119,9 +119,9 @@ class MarkdownSummary {
*
* @param {SummaryWriteOptions} [options] (optional) options for write operation
*
- * @returns {Promise} markdown summary instance
+ * @returns {Promise} summary instance
*/
- async write(options?: SummaryWriteOptions): Promise {
+ async write(options?: SummaryWriteOptions): Promise {
const overwrite = !!options?.overwrite
const filePath = await this.filePath()
const writeFunc = overwrite ? writeFile : appendFile
@@ -132,9 +132,9 @@ class MarkdownSummary {
/**
* Clears the summary buffer and wipes the summary file
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- async clear(): Promise {
+ async clear(): Promise {
return this.emptyBuffer().write({overwrite: true})
}
@@ -159,9 +159,9 @@ class MarkdownSummary {
/**
* Resets the summary buffer without writing to summary file
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- emptyBuffer(): MarkdownSummary {
+ emptyBuffer(): Summary {
this._buffer = ''
return this
}
@@ -172,9 +172,9 @@ class MarkdownSummary {
* @param {string} text content to add
* @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- addRaw(text: string, addEOL = false): MarkdownSummary {
+ addRaw(text: string, addEOL = false): Summary {
this._buffer += text
return addEOL ? this.addEOL() : this
}
@@ -182,9 +182,9 @@ class MarkdownSummary {
/**
* Adds the operating system-specific end-of-line marker to the buffer
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- addEOL(): MarkdownSummary {
+ addEOL(): Summary {
return this.addRaw(EOL)
}
@@ -194,9 +194,9 @@ class MarkdownSummary {
* @param {string} code content to render within fenced code block
* @param {string} lang (optional) language to syntax highlight code
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- addCodeBlock(code: string, lang?: string): MarkdownSummary {
+ addCodeBlock(code: string, lang?: string): Summary {
const attrs = {
...(lang && {lang})
}
@@ -210,9 +210,9 @@ class MarkdownSummary {
* @param {string[]} items list of items to render
* @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- addList(items: string[], ordered = false): MarkdownSummary {
+ addList(items: string[], ordered = false): Summary {
const tag = ordered ? 'ol' : 'ul'
const listItems = items.map(item => this.wrap('li', item)).join('')
const element = this.wrap(tag, listItems)
@@ -224,9 +224,9 @@ class MarkdownSummary {
*
* @param {SummaryTableCell[]} rows table rows
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- addTable(rows: SummaryTableRow[]): MarkdownSummary {
+ addTable(rows: SummaryTableRow[]): Summary {
const tableBody = rows
.map(row => {
const cells = row
@@ -260,9 +260,9 @@ class MarkdownSummary {
* @param {string} label text for the closed state
* @param {string} content collapsable content
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- addDetails(label: string, content: string): MarkdownSummary {
+ addDetails(label: string, content: string): Summary {
const element = this.wrap('details', this.wrap('summary', label) + content)
return this.addRaw(element).addEOL()
}
@@ -274,13 +274,9 @@ class MarkdownSummary {
* @param {string} alt text description of the image
* @param {SummaryImageOptions} options (optional) addition image attributes
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- addImage(
- src: string,
- alt: string,
- options?: SummaryImageOptions
- ): MarkdownSummary {
+ addImage(src: string, alt: string, options?: SummaryImageOptions): Summary {
const {width, height} = options || {}
const attrs = {
...(width && {width}),
@@ -297,9 +293,9 @@ class MarkdownSummary {
* @param {string} text heading text
* @param {number | string} [level=1] (optional) the heading level, default: 1
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- addHeading(text: string, level?: number | string): MarkdownSummary {
+ addHeading(text: string, level?: number | string): Summary {
const tag = `h${level}`
const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)
? tag
@@ -311,9 +307,9 @@ class MarkdownSummary {
/**
* Adds an HTML thematic break (
) to the summary buffer
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- addSeparator(): MarkdownSummary {
+ addSeparator(): Summary {
const element = this.wrap('hr', null)
return this.addRaw(element).addEOL()
}
@@ -321,9 +317,9 @@ class MarkdownSummary {
/**
* Adds an HTML line break (
) to the summary buffer
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- addBreak(): MarkdownSummary {
+ addBreak(): Summary {
const element = this.wrap('br', null)
return this.addRaw(element).addEOL()
}
@@ -334,9 +330,9 @@ class MarkdownSummary {
* @param {string} text quote text
* @param {string} cite (optional) citation url
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- addQuote(text: string, cite?: string): MarkdownSummary {
+ addQuote(text: string, cite?: string): Summary {
const attrs = {
...(cite && {cite})
}
@@ -350,13 +346,13 @@ class MarkdownSummary {
* @param {string} text link text/content
* @param {string} href hyperlink
*
- * @returns {MarkdownSummary} markdown summary instance
+ * @returns {Summary} summary instance
*/
- addLink(text: string, href: string): MarkdownSummary {
+ addLink(text: string, href: string): Summary {
const element = this.wrap('a', text, {href})
return this.addRaw(element).addEOL()
}
}
// singleton export
-export const markdownSummary = new MarkdownSummary()
+export const summary = new Summary()
From 07242b37a49ef3c3704f429570b3c9e377b72ecb Mon Sep 17 00:00:00 2001
From: Rob Herley
Date: Thu, 5 May 2022 19:44:13 +0000
Subject: [PATCH 3/9] add & deprecate old markdownSummary export
---
packages/core/src/core.ts | 5 +++++
packages/core/src/summary.ts | 9 +++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/packages/core/src/core.ts b/packages/core/src/core.ts
index 97073839..f5e7941b 100644
--- a/packages/core/src/core.ts
+++ b/packages/core/src/core.ts
@@ -364,3 +364,8 @@ export async function getIDToken(aud?: string): Promise {
* Summary exports
*/
export {summary} from './summary'
+
+/**
+ * @deprecated use core.summary
+ */
+export {markdownSummary} from './summary'
diff --git a/packages/core/src/summary.ts b/packages/core/src/summary.ts
index 41db1de1..015f2eea 100644
--- a/packages/core/src/summary.ts
+++ b/packages/core/src/summary.ts
@@ -354,5 +354,10 @@ class Summary {
}
}
-// singleton export
-export const summary = new Summary()
+const _summary = new Summary()
+
+/**
+ * @deprecated use `core.summary`
+ */
+export const markdownSummary = _summary
+export const summary = _summary
From e73063a93c5d570d765a2b7aa9c77a538d28689c Mon Sep 17 00:00:00 2001
From: Rob Herley
Date: Thu, 5 May 2022 20:17:30 +0000
Subject: [PATCH 4/9] @actions/core 1.8.0 release
---
packages/core/RELEASES.md | 5 +++++
packages/core/package-lock.json | 2 +-
packages/core/package.json | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/packages/core/RELEASES.md b/packages/core/RELEASES.md
index fa0c93ae..d35801ee 100644
--- a/packages/core/RELEASES.md
+++ b/packages/core/RELEASES.md
@@ -1,5 +1,10 @@
# @actions/core Releases
+### 1.8.0
+- Deprecate `markdownSummary` extension export in favor of `summary`
+ - https://github.com/actions/toolkit/pull/1072
+ - https://github.com/actions/toolkit/pull/1073
+
### 1.7.0
- [Added `markdownSummary` extension](https://github.com/actions/toolkit/pull/1014)
diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json
index 9a638c5a..b4392f8d 100644
--- a/packages/core/package-lock.json
+++ b/packages/core/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@actions/core",
- "version": "1.7.0",
+ "version": "1.8.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
diff --git a/packages/core/package.json b/packages/core/package.json
index 56ee8427..c63533fa 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/core",
- "version": "1.7.0",
+ "version": "1.8.0",
"description": "Actions core lib",
"keywords": [
"github",
From aa676f3cc725685fdc6eef04a0c75342005f10db Mon Sep 17 00:00:00 2001
From: Brian Cristante <33549821+brcrista@users.noreply.github.com>
Date: Wed, 11 May 2022 17:14:25 -0400
Subject: [PATCH 5/9] Update other packages to use http-client v2 (#1082)
We moved `@actions/http-client` to be part of the toolkit in https://github.com/actions/toolkit/pull/1062. We also made some breaking changes to exported types and released v2.
The biggest change in terms of lines of code affected was to get rid of the `I-` prefix for interfaces since TypeScript doesn't follow this convention.
I bumped the patch version of all packages except for `tool-cache`, where I bumped the major version. The rationale is explained in the release notes for that package.
---
packages/artifact/RELEASES.md | 6 +-
packages/artifact/__tests__/retry.test.ts | 5 +-
packages/artifact/package-lock.json | 44 ++++++----
packages/artifact/package.json | 4 +-
.../src/internal/download-http-client.ts | 8 +-
.../artifact/src/internal/http-manager.ts | 2 +-
.../artifact/src/internal/requestUtils.ts | 12 +--
.../src/internal/upload-http-client.ts | 9 +-
packages/artifact/src/internal/utils.ts | 19 ++---
packages/cache/RELEASES.md | 3 +
packages/cache/__tests__/saveCache.test.ts | 8 +-
packages/cache/package-lock.json | 63 +++++---------
packages/cache/package.json | 4 +-
.../cache/src/internal/cacheHttpClient.ts | 13 +--
packages/cache/src/internal/contracts.d.ts | 4 +-
packages/cache/src/internal/downloadUtils.ts | 5 +-
packages/cache/src/internal/requestUtils.ts | 15 ++--
packages/core/RELEASES.md | 3 +
packages/core/package-lock.json | 37 ++------
packages/core/package.json | 4 +-
packages/core/src/oidc-utils.ts | 6 +-
packages/github/RELEASES.md | 3 +
packages/github/package-lock.json | 37 ++------
packages/github/package.json | 4 +-
packages/glob/package-lock.json | 49 +++++++++--
packages/http-client/package.json | 2 +-
packages/tool-cache/RELEASES.md | 5 ++
packages/tool-cache/package-lock.json | 84 +++++++++++--------
packages/tool-cache/package.json | 4 +-
packages/tool-cache/src/tool-cache.ts | 10 +--
30 files changed, 249 insertions(+), 223 deletions(-)
diff --git a/packages/artifact/RELEASES.md b/packages/artifact/RELEASES.md
index 8f3fd713..3d4425d8 100644
--- a/packages/artifact/RELEASES.md
+++ b/packages/artifact/RELEASES.md
@@ -77,4 +77,8 @@
### 1.0.0
-- Update `lockfileVersion` to `v2` in `package-lock.json [#1009](https://github.com/actions/toolkit/pull/1009)
\ No newline at end of file
+- Update `lockfileVersion` to `v2` in `package-lock.json` [#1009](https://github.com/actions/toolkit/pull/1009)
+
+### 1.0.1
+
+- Update to v2.0.0 of `@actions/http-client`
\ No newline at end of file
diff --git a/packages/artifact/__tests__/retry.test.ts b/packages/artifact/__tests__/retry.test.ts
index 12c49784..d1e9256e 100644
--- a/packages/artifact/__tests__/retry.test.ts
+++ b/packages/artifact/__tests__/retry.test.ts
@@ -3,7 +3,6 @@ import * as net from 'net'
import * as core from '@actions/core'
import * as configVariables from '../src/internal/config-variables'
import {retry} from '../src/internal/requestUtils'
-import {IHttpClientResponse} from '@actions/http-client/interfaces'
import {HttpClientResponse} from '@actions/http-client'
jest.mock('../src/internal/config-variables')
@@ -42,7 +41,7 @@ async function testRetry(
async function handleResponse(
testResponseCode: number | undefined
-): Promise {
+): Promise {
if (!testResponseCode) {
throw new Error(
'Test incorrectly set up. reverse.pop() was called too many times so not enough test response codes were supplied'
@@ -72,7 +71,7 @@ async function emptyMockReadBody(): Promise {
async function setupSingleMockResponse(
statusCode: number
-): Promise {
+): Promise {
const mockMessage = new http.IncomingMessage(new net.Socket())
const mockReadBody = emptyMockReadBody
mockMessage.statusCode = statusCode
diff --git a/packages/artifact/package-lock.json b/packages/artifact/package-lock.json
index 7f5ec7d2..56e6a712 100644
--- a/packages/artifact/package-lock.json
+++ b/packages/artifact/package-lock.json
@@ -1,16 +1,16 @@
{
"name": "@actions/artifact",
- "version": "0.6.1",
+ "version": "1.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@actions/artifact",
- "version": "0.6.1",
+ "version": "1.0.1",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.6",
- "@actions/http-client": "^1.0.11",
+ "@actions/http-client": "^2.0.0",
"tmp": "^0.2.1",
"tmp-promise": "^3.0.2"
},
@@ -20,14 +20,14 @@
}
},
"node_modules/@actions/core": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.6.0.tgz",
- "integrity": "sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==",
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.8.0.tgz",
+ "integrity": "sha512-XirM+Zo/PFlA+1h+i4bkfvagujta+LIM2AOSzPbt8JqXbbuxb1HTB+FqIyaKmue9yiCx/JIJY6pXsOl3+T8JGw==",
"dependencies": {
"@actions/http-client": "^1.0.11"
}
},
- "node_modules/@actions/http-client": {
+ "node_modules/@actions/core/node_modules/@actions/http-client": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
"integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
@@ -35,6 +35,11 @@
"tunnel": "0.0.6"
}
},
+ "node_modules/@actions/http-client": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
+ "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
+ },
"node_modules/@types/tmp": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/@types/tmp/-/tmp-0.2.3.tgz",
@@ -187,20 +192,27 @@
},
"dependencies": {
"@actions/core": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.6.0.tgz",
- "integrity": "sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==",
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.8.0.tgz",
+ "integrity": "sha512-XirM+Zo/PFlA+1h+i4bkfvagujta+LIM2AOSzPbt8JqXbbuxb1HTB+FqIyaKmue9yiCx/JIJY6pXsOl3+T8JGw==",
"requires": {
"@actions/http-client": "^1.0.11"
+ },
+ "dependencies": {
+ "@actions/http-client": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
+ "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
+ "requires": {
+ "tunnel": "0.0.6"
+ }
+ }
}
},
"@actions/http-client": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
- "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
- "requires": {
- "tunnel": "0.0.6"
- }
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
+ "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
},
"@types/tmp": {
"version": "0.2.3",
diff --git a/packages/artifact/package.json b/packages/artifact/package.json
index 6dd84aa2..64c51668 100644
--- a/packages/artifact/package.json
+++ b/packages/artifact/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/artifact",
- "version": "1.0.0",
+ "version": "1.0.1",
"preview": true,
"description": "Actions artifact lib",
"keywords": [
@@ -38,7 +38,7 @@
},
"dependencies": {
"@actions/core": "^1.2.6",
- "@actions/http-client": "^1.0.11",
+ "@actions/http-client": "^2.0.0",
"tmp": "^0.2.1",
"tmp-promise": "^3.0.2"
},
diff --git a/packages/artifact/src/internal/download-http-client.ts b/packages/artifact/src/internal/download-http-client.ts
index c81ac917..2df4675f 100644
--- a/packages/artifact/src/internal/download-http-client.ts
+++ b/packages/artifact/src/internal/download-http-client.ts
@@ -18,7 +18,7 @@ import {URL} from 'url'
import {StatusReporter} from './status-reporter'
import {performance} from 'perf_hooks'
import {ListArtifactsResponse, QueryArtifactResponse} from './contracts'
-import {IHttpClientResponse} from '@actions/http-client/interfaces'
+import {HttpClientResponse} from '@actions/http-client'
import {HttpManager} from './http-manager'
import {DownloadItem} from './download-specification'
import {getDownloadFileConcurrency, getRetryLimit} from './config-variables'
@@ -152,7 +152,7 @@ export class DownloadHttpClient {
const headers = getDownloadHeaders('application/json', true, true)
// a single GET request is used to download a file
- const makeDownloadRequest = async (): Promise => {
+ const makeDownloadRequest = async (): Promise => {
const client = this.downloadHttpManager.getClient(httpClientIndex)
return await client.get(artifactLocation, headers)
}
@@ -225,7 +225,7 @@ export class DownloadHttpClient {
// keep trying to download a file until a retry limit has been reached
while (retryCount <= retryLimit) {
- let response: IHttpClientResponse
+ let response: HttpClientResponse
try {
response = await makeDownloadRequest()
} catch (error) {
@@ -295,7 +295,7 @@ export class DownloadHttpClient {
* @param isGzip a boolean denoting if the content is compressed using gzip and if we need to decode it
*/
async pipeResponseToFile(
- response: IHttpClientResponse,
+ response: HttpClientResponse,
destinationStream: fs.WriteStream,
isGzip: boolean
): Promise {
diff --git a/packages/artifact/src/internal/http-manager.ts b/packages/artifact/src/internal/http-manager.ts
index 9c19a620..9b44fb85 100644
--- a/packages/artifact/src/internal/http-manager.ts
+++ b/packages/artifact/src/internal/http-manager.ts
@@ -1,4 +1,4 @@
-import {HttpClient} from '@actions/http-client/index'
+import {HttpClient} from '@actions/http-client'
import {createHttpClient} from './utils'
/**
diff --git a/packages/artifact/src/internal/requestUtils.ts b/packages/artifact/src/internal/requestUtils.ts
index 65f40e7b..4abc5b03 100644
--- a/packages/artifact/src/internal/requestUtils.ts
+++ b/packages/artifact/src/internal/requestUtils.ts
@@ -1,4 +1,4 @@
-import {IHttpClientResponse} from '@actions/http-client/interfaces'
+import {HttpClientResponse} from '@actions/http-client'
import {
isRetryableStatusCode,
isSuccessStatusCode,
@@ -11,11 +11,11 @@ import {getRetryLimit} from './config-variables'
export async function retry(
name: string,
- operation: () => Promise,
+ operation: () => Promise,
customErrorMessages: Map,
maxAttempts: number
-): Promise {
- let response: IHttpClientResponse | undefined = undefined
+): Promise {
+ let response: HttpClientResponse | undefined = undefined
let statusCode: number | undefined = undefined
let isRetryable = false
let errorMessage = ''
@@ -71,9 +71,9 @@ export async function retry(
export async function retryHttpClientRequest(
name: string,
- method: () => Promise,
+ method: () => Promise,
customErrorMessages: Map = new Map(),
maxAttempts = getRetryLimit()
-): Promise {
+): Promise {
return await retry(name, method, customErrorMessages, maxAttempts)
}
diff --git a/packages/artifact/src/internal/upload-http-client.ts b/packages/artifact/src/internal/upload-http-client.ts
index 9892a42d..180466e7 100644
--- a/packages/artifact/src/internal/upload-http-client.ts
+++ b/packages/artifact/src/internal/upload-http-client.ts
@@ -31,8 +31,7 @@ import {promisify} from 'util'
import {URL} from 'url'
import {performance} from 'perf_hooks'
import {StatusReporter} from './status-reporter'
-import {HttpCodes} from '@actions/http-client'
-import {IHttpClientResponse} from '@actions/http-client/interfaces'
+import {HttpCodes, HttpClientResponse} from '@actions/http-client'
import {HttpManager} from './http-manager'
import {UploadSpecification} from './upload-specification'
import {UploadOptions} from './upload-options'
@@ -416,7 +415,7 @@ export class UploadHttpClient {
getContentRange(start, end, uploadFileSize)
)
- const uploadChunkRequest = async (): Promise => {
+ const uploadChunkRequest = async (): Promise => {
const client = this.uploadHttpManager.getClient(httpClientIndex)
return await client.sendStream('PUT', resourceUrl, openStream(), headers)
}
@@ -427,7 +426,7 @@ export class UploadHttpClient {
// Increments the current retry count and then checks if the retry limit has been reached
// If there have been too many retries, fail so the download stops
const incrementAndCheckRetryLimit = (
- response?: IHttpClientResponse
+ response?: HttpClientResponse
): boolean => {
retryCount++
if (retryCount > retryLimit) {
@@ -464,7 +463,7 @@ export class UploadHttpClient {
// allow for failed chunks to be retried multiple times
while (retryCount <= retryLimit) {
- let response: IHttpClientResponse
+ let response: HttpClientResponse
try {
response = await uploadChunkRequest()
diff --git a/packages/artifact/src/internal/utils.ts b/packages/artifact/src/internal/utils.ts
index f2b99f33..2f2883e7 100644
--- a/packages/artifact/src/internal/utils.ts
+++ b/packages/artifact/src/internal/utils.ts
@@ -1,9 +1,8 @@
-import {debug, info, warning} from '@actions/core'
import {promises as fs} from 'fs'
-import {HttpCodes, HttpClient} from '@actions/http-client'
-import {BearerCredentialHandler} from '@actions/http-client/auth'
-import {IHeaders, IHttpClientResponse} from '@actions/http-client/interfaces'
-import {IncomingHttpHeaders} from 'http'
+import {IncomingHttpHeaders, OutgoingHttpHeaders} from 'http'
+import {debug, info, warning} from '@actions/core'
+import {HttpCodes, HttpClient, HttpClientResponse} from '@actions/http-client'
+import {BearerCredentialHandler} from '@actions/http-client/lib/auth'
import {
getRuntimeToken,
getRuntimeUrl,
@@ -139,8 +138,8 @@ export function getDownloadHeaders(
contentType: string,
isKeepAlive?: boolean,
acceptGzip?: boolean
-): IHeaders {
- const requestOptions: IHeaders = {}
+): OutgoingHttpHeaders {
+ const requestOptions: OutgoingHttpHeaders = {}
if (contentType) {
requestOptions['Content-Type'] = contentType
@@ -181,8 +180,8 @@ export function getUploadHeaders(
uncompressedLength?: number,
contentLength?: number,
contentRange?: string
-): IHeaders {
- const requestOptions: IHeaders = {}
+): OutgoingHttpHeaders {
+ const requestOptions: OutgoingHttpHeaders = {}
requestOptions['Accept'] = `application/json;api-version=${getApiVersion()}`
if (contentType) {
requestOptions['Content-Type'] = contentType
@@ -227,7 +226,7 @@ export function getArtifactUrl(): string {
* Certain information such as the TLSSocket and the Readable state are not really useful for diagnostic purposes so they can be avoided.
* Other information such as the headers, the response code and message might be useful, so this is displayed.
*/
-export function displayHttpDiagnostics(response: IHttpClientResponse): void {
+export function displayHttpDiagnostics(response: HttpClientResponse): void {
info(
`##### Begin Diagnostic HTTP information #####
Status Code: ${response.message.statusCode}
diff --git a/packages/cache/RELEASES.md b/packages/cache/RELEASES.md
index ec77c2bc..58217f86 100644
--- a/packages/cache/RELEASES.md
+++ b/packages/cache/RELEASES.md
@@ -56,3 +56,6 @@
### 2.0.0
- Added support to check if Actions cache service feature is available or not [#1028](https://github.com/actions/toolkit/pull/1028)
+
+### 2.0.3
+- Update to v2.0.0 of `@actions/http-client`
\ No newline at end of file
diff --git a/packages/cache/__tests__/saveCache.test.ts b/packages/cache/__tests__/saveCache.test.ts
index 6949759b..4627f2c7 100644
--- a/packages/cache/__tests__/saveCache.test.ts
+++ b/packages/cache/__tests__/saveCache.test.ts
@@ -5,7 +5,7 @@ import * as cacheHttpClient from '../src/internal/cacheHttpClient'
import * as cacheUtils from '../src/internal/cacheUtils'
import {CacheFilename, CompressionMethod} from '../src/internal/constants'
import * as tar from '../src/internal/tar'
-import {ITypedResponse} from '@actions/http-client/interfaces'
+import {TypedResponse} from '@actions/http-client/lib/interfaces'
import {
ReserveCacheResponse,
ITypedResponseWithError
@@ -172,7 +172,7 @@ test('save with reserve cache failure should fail', async () => {
const reserveCacheMock = jest
.spyOn(cacheHttpClient, 'reserveCache')
.mockImplementation(async () => {
- const response: ITypedResponse = {
+ const response: TypedResponse = {
statusCode: 500,
result: null,
headers: {}
@@ -208,7 +208,7 @@ test('save with server error should fail', async () => {
const reserveCacheMock = jest
.spyOn(cacheHttpClient, 'reserveCache')
.mockImplementation(async () => {
- const response: ITypedResponse = {
+ const response: TypedResponse = {
statusCode: 500,
result: {cacheId},
headers: {}
@@ -257,7 +257,7 @@ test('save with valid inputs uploads a cache', async () => {
const reserveCacheMock = jest
.spyOn(cacheHttpClient, 'reserveCache')
.mockImplementation(async () => {
- const response: ITypedResponse = {
+ const response: TypedResponse = {
statusCode: 500,
result: {cacheId},
headers: {}
diff --git a/packages/cache/package-lock.json b/packages/cache/package-lock.json
index 2ec7b7d6..d577d79f 100644
--- a/packages/cache/package-lock.json
+++ b/packages/cache/package-lock.json
@@ -1,18 +1,18 @@
{
"name": "@actions/cache",
- "version": "2.0.2",
+ "version": "2.0.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@actions/cache",
- "version": "2.0.0",
+ "version": "2.0.3",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.1",
"@actions/glob": "^0.1.0",
- "@actions/http-client": "^1.0.9",
+ "@actions/http-client": "^2.0.0",
"@actions/io": "^1.0.1",
"@azure/ms-rest-js": "^2.6.0",
"@azure/storage-blob": "^12.8.0",
@@ -31,9 +31,9 @@
"integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
},
"node_modules/@actions/exec": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.4.tgz",
- "integrity": "sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
+ "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
"dependencies": {
"@actions/io": "^1.0.1"
}
@@ -48,25 +48,14 @@
}
},
"node_modules/@actions/http-client": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.9.tgz",
- "integrity": "sha512-0O4SsJ7q+MK0ycvXPl2e6bMXV7dxAXOGjrXS1eTF9s2S401Tp6c/P3c3Joz04QefC1J6Gt942Wl2jbm3f4mLcg==",
- "dependencies": {
- "tunnel": "0.0.6"
- }
- },
- "node_modules/@actions/http-client/node_modules/tunnel": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
- "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
- "engines": {
- "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
- }
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
+ "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
},
"node_modules/@actions/io": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz",
- "integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg=="
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.2.tgz",
+ "integrity": "sha512-d+RwPlMp+2qmBfeLYPLXuSRykDIFEwdTA0MMxzS9kh4kvP1ftrc/9fzy6pX6qAjthdXruHQ6/6kjT/DNo5ALuw=="
},
"node_modules/@azure/abort-controller": {
"version": "1.0.4",
@@ -618,9 +607,9 @@
"integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
},
"@actions/exec": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.4.tgz",
- "integrity": "sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
+ "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
"requires": {
"@actions/io": "^1.0.1"
}
@@ -635,24 +624,14 @@
}
},
"@actions/http-client": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.9.tgz",
- "integrity": "sha512-0O4SsJ7q+MK0ycvXPl2e6bMXV7dxAXOGjrXS1eTF9s2S401Tp6c/P3c3Joz04QefC1J6Gt942Wl2jbm3f4mLcg==",
- "requires": {
- "tunnel": "0.0.6"
- },
- "dependencies": {
- "tunnel": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
- "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
- }
- }
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
+ "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
},
"@actions/io": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz",
- "integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg=="
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.2.tgz",
+ "integrity": "sha512-d+RwPlMp+2qmBfeLYPLXuSRykDIFEwdTA0MMxzS9kh4kvP1ftrc/9fzy6pX6qAjthdXruHQ6/6kjT/DNo5ALuw=="
},
"@azure/abort-controller": {
"version": "1.0.4",
diff --git a/packages/cache/package.json b/packages/cache/package.json
index 97f774b1..1185abed 100644
--- a/packages/cache/package.json
+++ b/packages/cache/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/cache",
- "version": "2.0.2",
+ "version": "2.0.3",
"preview": true,
"description": "Actions cache lib",
"keywords": [
@@ -40,7 +40,7 @@
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.1",
"@actions/glob": "^0.1.0",
- "@actions/http-client": "^1.0.9",
+ "@actions/http-client": "^2.0.0",
"@actions/io": "^1.0.1",
"@azure/ms-rest-js": "^2.6.0",
"@azure/storage-blob": "^12.8.0",
diff --git a/packages/cache/src/internal/cacheHttpClient.ts b/packages/cache/src/internal/cacheHttpClient.ts
index 21f69917..c66d1a73 100644
--- a/packages/cache/src/internal/cacheHttpClient.ts
+++ b/packages/cache/src/internal/cacheHttpClient.ts
@@ -1,7 +1,10 @@
import * as core from '@actions/core'
import {HttpClient} from '@actions/http-client'
-import {BearerCredentialHandler} from '@actions/http-client/auth'
-import {IRequestOptions, ITypedResponse} from '@actions/http-client/interfaces'
+import {BearerCredentialHandler} from '@actions/http-client/lib/auth'
+import {
+ RequestOptions,
+ TypedResponse
+} from '@actions/http-client/lib/interfaces'
import * as crypto from 'crypto'
import * as fs from 'fs'
import {URL} from 'url'
@@ -46,8 +49,8 @@ function createAcceptHeader(type: string, apiVersion: string): string {
return `${type};api-version=${apiVersion}`
}
-function getRequestOptions(): IRequestOptions {
- const requestOptions: IRequestOptions = {
+function getRequestOptions(): RequestOptions {
+ const requestOptions: RequestOptions = {
headers: {
Accept: createAcceptHeader('application/json', '6.0-preview.1')
}
@@ -275,7 +278,7 @@ async function commitCache(
httpClient: HttpClient,
cacheId: number,
filesize: number
-): Promise> {
+): Promise> {
const commitCacheRequest: CommitCacheRequest = {size: filesize}
return await retryTypedResponse('commitCache', async () =>
httpClient.postJson(
diff --git a/packages/cache/src/internal/contracts.d.ts b/packages/cache/src/internal/contracts.d.ts
index eb79fdae..1b2a13a1 100644
--- a/packages/cache/src/internal/contracts.d.ts
+++ b/packages/cache/src/internal/contracts.d.ts
@@ -1,8 +1,8 @@
import {CompressionMethod} from './constants'
-import {ITypedResponse} from '@actions/http-client/interfaces'
+import {TypedResponse} from '@actions/http-client/lib/interfaces'
import {HttpClientError} from '@actions/http-client'
-export interface ITypedResponseWithError extends ITypedResponse {
+export interface ITypedResponseWithError extends TypedResponse {
error?: HttpClientError
}
diff --git a/packages/cache/src/internal/downloadUtils.ts b/packages/cache/src/internal/downloadUtils.ts
index bedaa375..08b2dee8 100644
--- a/packages/cache/src/internal/downloadUtils.ts
+++ b/packages/cache/src/internal/downloadUtils.ts
@@ -1,6 +1,5 @@
import * as core from '@actions/core'
-import {HttpClient} from '@actions/http-client'
-import {IHttpClientResponse} from '@actions/http-client/interfaces'
+import {HttpClient, HttpClientResponse} from '@actions/http-client'
import {BlockBlobClient} from '@azure/storage-blob'
import {TransferProgressEvent} from '@azure/ms-rest-js'
import * as buffer from 'buffer'
@@ -20,7 +19,7 @@ import {retryHttpClientResponse} from './requestUtils'
* @param output the writable stream
*/
async function pipeResponseToStream(
- response: IHttpClientResponse,
+ response: HttpClientResponse,
output: NodeJS.WritableStream
): Promise {
const pipeline = util.promisify(stream.pipeline)
diff --git a/packages/cache/src/internal/requestUtils.ts b/packages/cache/src/internal/requestUtils.ts
index be254b93..043c8a7c 100644
--- a/packages/cache/src/internal/requestUtils.ts
+++ b/packages/cache/src/internal/requestUtils.ts
@@ -1,6 +1,9 @@
import * as core from '@actions/core'
-import {HttpCodes, HttpClientError} from '@actions/http-client'
-import {IHttpClientResponse} from '@actions/http-client/interfaces'
+import {
+ HttpCodes,
+ HttpClientError,
+ HttpClientResponse
+} from '@actions/http-client'
import {DefaultRetryDelay, DefaultRetryAttempts} from './constants'
import {ITypedResponseWithError} from './contracts'
@@ -103,7 +106,7 @@ export async function retryTypedResponse(
maxAttempts,
delay,
// If the error object contains the statusCode property, extract it and return
- // an ITypedResponse so it can be processed by the retry logic.
+ // an TypedResponse so it can be processed by the retry logic.
(error: Error) => {
if (error instanceof HttpClientError) {
return {
@@ -121,14 +124,14 @@ export async function retryTypedResponse(
export async function retryHttpClientResponse(
name: string,
- method: () => Promise,
+ method: () => Promise,
maxAttempts = DefaultRetryAttempts,
delay = DefaultRetryDelay
-): Promise {
+): Promise {
return await retry(
name,
method,
- (response: IHttpClientResponse) => response.message.statusCode,
+ (response: HttpClientResponse) => response.message.statusCode,
maxAttempts,
delay
)
diff --git a/packages/core/RELEASES.md b/packages/core/RELEASES.md
index d35801ee..2f00f0ce 100644
--- a/packages/core/RELEASES.md
+++ b/packages/core/RELEASES.md
@@ -1,5 +1,8 @@
# @actions/core Releases
+### 1.8.1
+- Update to v2.0.0 of `@actions/http-client`
+
### 1.8.0
- Deprecate `markdownSummary` extension export in favor of `summary`
- https://github.com/actions/toolkit/pull/1072
diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json
index b4392f8d..cd2ff3ed 100644
--- a/packages/core/package-lock.json
+++ b/packages/core/package-lock.json
@@ -1,62 +1,43 @@
{
"name": "@actions/core",
- "version": "1.8.0",
+ "version": "1.8.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@actions/core",
- "version": "1.6.0",
+ "version": "1.8.1",
"license": "MIT",
"dependencies": {
- "@actions/http-client": "^1.0.11"
+ "@actions/http-client": "^2.0.0"
},
"devDependencies": {
"@types/node": "^12.0.2"
}
},
"node_modules/@actions/http-client": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
- "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
- "dependencies": {
- "tunnel": "0.0.6"
- }
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
+ "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
},
"node_modules/@types/node": {
"version": "12.0.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz",
"integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==",
"dev": true
- },
- "node_modules/tunnel": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
- "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
- "engines": {
- "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
- }
}
},
"dependencies": {
"@actions/http-client": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
- "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
- "requires": {
- "tunnel": "0.0.6"
- }
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
+ "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
},
"@types/node": {
"version": "12.0.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz",
"integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==",
"dev": true
- },
- "tunnel": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
- "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
}
}
}
diff --git a/packages/core/package.json b/packages/core/package.json
index c63533fa..cd914386 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/core",
- "version": "1.8.0",
+ "version": "1.8.1",
"description": "Actions core lib",
"keywords": [
"github",
@@ -36,7 +36,7 @@
"url": "https://github.com/actions/toolkit/issues"
},
"dependencies": {
- "@actions/http-client": "^1.0.11"
+ "@actions/http-client": "^2.0.0"
},
"devDependencies": {
"@types/node": "^12.0.2"
diff --git a/packages/core/src/oidc-utils.ts b/packages/core/src/oidc-utils.ts
index e33da5f1..d490a3ce 100644
--- a/packages/core/src/oidc-utils.ts
+++ b/packages/core/src/oidc-utils.ts
@@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/no-extraneous-class */
import * as actions_http_client from '@actions/http-client'
-import {IRequestOptions} from '@actions/http-client/interfaces'
+import {RequestOptions} from '@actions/http-client/lib/interfaces'
import {HttpClient} from '@actions/http-client'
-import {BearerCredentialHandler} from '@actions/http-client/auth'
+import {BearerCredentialHandler} from '@actions/http-client/lib/auth'
import {debug, setSecret} from './core'
interface TokenResponse {
value?: string
@@ -13,7 +13,7 @@ export class OidcClient {
allowRetry = true,
maxRetry = 10
): actions_http_client.HttpClient {
- const requestOptions: IRequestOptions = {
+ const requestOptions: RequestOptions = {
allowRetries: allowRetry,
maxRetries: maxRetry
}
diff --git a/packages/github/RELEASES.md b/packages/github/RELEASES.md
index 225953b5..abbca6f1 100644
--- a/packages/github/RELEASES.md
+++ b/packages/github/RELEASES.md
@@ -1,5 +1,8 @@
# @actions/github Releases
+### 5.0.2
+- Update to v2.0.0 of `@actions/http-client`
+
### 5.0.1
- [Update Octokit Dependencies](https://github.com/actions/toolkit/pull/1037)
### 5.0.0
diff --git a/packages/github/package-lock.json b/packages/github/package-lock.json
index 0a497e0d..defa7724 100644
--- a/packages/github/package-lock.json
+++ b/packages/github/package-lock.json
@@ -1,15 +1,15 @@
{
"name": "@actions/github",
- "version": "5.0.1",
+ "version": "5.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@actions/github",
- "version": "5.0.1",
+ "version": "5.0.2",
"license": "MIT",
"dependencies": {
- "@actions/http-client": "^1.0.11",
+ "@actions/http-client": "^2.0.0",
"@octokit/core": "^3.6.0",
"@octokit/plugin-paginate-rest": "^2.17.0",
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
@@ -19,12 +19,9 @@
}
},
"node_modules/@actions/http-client": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
- "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
- "dependencies": {
- "tunnel": "0.0.6"
- }
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
+ "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
},
"node_modules/@octokit/auth-token": {
"version": "2.4.5",
@@ -340,14 +337,6 @@
"proxy": "bin/proxy.js"
}
},
- "node_modules/tunnel": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
- "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
- "engines": {
- "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
- }
- },
"node_modules/universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
@@ -361,12 +350,9 @@
},
"dependencies": {
"@actions/http-client": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
- "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
- "requires": {
- "tunnel": "0.0.6"
- }
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
+ "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
},
"@octokit/auth-token": {
"version": "2.4.5",
@@ -635,11 +621,6 @@
"debug": "^4.1.1"
}
},
- "tunnel": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
- "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
- },
"universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
diff --git a/packages/github/package.json b/packages/github/package.json
index 208b5a79..8ed6c424 100644
--- a/packages/github/package.json
+++ b/packages/github/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/github",
- "version": "5.0.1",
+ "version": "5.0.2",
"description": "Actions github lib",
"keywords": [
"github",
@@ -38,7 +38,7 @@
"url": "https://github.com/actions/toolkit/issues"
},
"dependencies": {
- "@actions/http-client": "^1.0.11",
+ "@actions/http-client": "^2.0.0",
"@octokit/core": "^3.6.0",
"@octokit/plugin-paginate-rest": "^2.17.0",
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
diff --git a/packages/glob/package-lock.json b/packages/glob/package-lock.json
index ee9a1739..0aee7b60 100644
--- a/packages/glob/package-lock.json
+++ b/packages/glob/package-lock.json
@@ -6,7 +6,7 @@
"packages": {
"": {
"name": "@actions/glob",
- "version": "0.2.1",
+ "version": "0.3.0",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.6",
@@ -14,9 +14,20 @@
}
},
"node_modules/@actions/core": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
- "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.8.0.tgz",
+ "integrity": "sha512-XirM+Zo/PFlA+1h+i4bkfvagujta+LIM2AOSzPbt8JqXbbuxb1HTB+FqIyaKmue9yiCx/JIJY6pXsOl3+T8JGw==",
+ "dependencies": {
+ "@actions/http-client": "^1.0.11"
+ }
+ },
+ "node_modules/@actions/http-client": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
+ "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
+ "dependencies": {
+ "tunnel": "0.0.6"
+ }
},
"node_modules/balanced-match": {
"version": "1.0.0",
@@ -47,13 +58,32 @@
"engines": {
"node": "*"
}
+ },
+ "node_modules/tunnel": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
+ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
+ "engines": {
+ "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
+ }
}
},
"dependencies": {
"@actions/core": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
- "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.8.0.tgz",
+ "integrity": "sha512-XirM+Zo/PFlA+1h+i4bkfvagujta+LIM2AOSzPbt8JqXbbuxb1HTB+FqIyaKmue9yiCx/JIJY6pXsOl3+T8JGw==",
+ "requires": {
+ "@actions/http-client": "^1.0.11"
+ }
+ },
+ "@actions/http-client": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
+ "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
+ "requires": {
+ "tunnel": "0.0.6"
+ }
},
"balanced-match": {
"version": "1.0.0",
@@ -81,6 +111,11 @@
"requires": {
"brace-expansion": "^1.1.7"
}
+ },
+ "tunnel": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
+ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
}
}
}
diff --git a/packages/http-client/package.json b/packages/http-client/package.json
index f9db7e77..ed4129c0 100644
--- a/packages/http-client/package.json
+++ b/packages/http-client/package.json
@@ -25,7 +25,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/actions/toolkit.git",
- "directory": "packages/github"
+ "directory": "packages/http-client"
},
"scripts": {
"audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json",
diff --git a/packages/tool-cache/RELEASES.md b/packages/tool-cache/RELEASES.md
index c613f183..8285cb22 100644
--- a/packages/tool-cache/RELEASES.md
+++ b/packages/tool-cache/RELEASES.md
@@ -1,5 +1,10 @@
# @actions/tool-cache Releases
+### 2.0.0
+- Update to v2.0.0 of `@actions/http-client`
+- The type of the `headers` parameter in the exported function `downloadTool` has been narrowed from `{ [header: string]: any }` to `{ [header: string]: number | string | string[] | undefined; }` (that is, `http.OutgoingHttpHeaders`).
+ This is strictly a compile-time change for TypeScript consumers. Previous attempts to use a header value of a type other than those now accepted would have resulted in an error at run time.
+
### 1.7.2
- Update `lockfileVersion` to `v2` in `package-lock.json [#1025](https://github.com/actions/toolkit/pull/1025)
diff --git a/packages/tool-cache/package-lock.json b/packages/tool-cache/package-lock.json
index 524d1345..bb33ad7f 100644
--- a/packages/tool-cache/package-lock.json
+++ b/packages/tool-cache/package-lock.json
@@ -1,17 +1,17 @@
{
"name": "@actions/tool-cache",
- "version": "1.7.2",
+ "version": "2.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@actions/tool-cache",
- "version": "1.7.2",
+ "version": "2.0.0",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.0",
- "@actions/http-client": "^1.0.8",
+ "@actions/http-client": "^2.0.0",
"@actions/io": "^1.1.1",
"semver": "^6.1.0",
"uuid": "^3.3.2"
@@ -24,30 +24,38 @@
}
},
"node_modules/@actions/core": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
- "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.8.0.tgz",
+ "integrity": "sha512-XirM+Zo/PFlA+1h+i4bkfvagujta+LIM2AOSzPbt8JqXbbuxb1HTB+FqIyaKmue9yiCx/JIJY6pXsOl3+T8JGw==",
+ "dependencies": {
+ "@actions/http-client": "^1.0.11"
+ }
+ },
+ "node_modules/@actions/core/node_modules/@actions/http-client": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
+ "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
+ "dependencies": {
+ "tunnel": "0.0.6"
+ }
},
"node_modules/@actions/exec": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.3.tgz",
- "integrity": "sha512-TogJGnueOmM7ntCi0ASTUj4LapRRtDfj57Ja4IhPmg2fls28uVOPbAn8N+JifaOumN2UG3oEO/Ixek2A4NcYSA==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
+ "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
"dependencies": {
"@actions/io": "^1.0.1"
}
},
"node_modules/@actions/http-client": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.8.tgz",
- "integrity": "sha512-G4JjJ6f9Hb3Zvejj+ewLLKLf99ZC+9v+yCxoYf9vSyH+WkzPLB2LuUtRMGNkooMqdugGBFStIKXOuvH1W+EctA==",
- "dependencies": {
- "tunnel": "0.0.6"
- }
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
+ "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
},
"node_modules/@actions/io": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.1.tgz",
- "integrity": "sha512-Qi4JoKXjmE0O67wAOH6y0n26QXhMKMFo7GD/4IXNVcrtLjUlGjGuVys6pQgwF3ArfGTQu0XpqaNr0YhED2RaRA=="
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.2.tgz",
+ "integrity": "sha512-d+RwPlMp+2qmBfeLYPLXuSRykDIFEwdTA0MMxzS9kh4kvP1ftrc/9fzy6pX6qAjthdXruHQ6/6kjT/DNo5ALuw=="
},
"node_modules/@types/nock": {
"version": "10.0.3",
@@ -280,30 +288,40 @@
},
"dependencies": {
"@actions/core": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
- "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.8.0.tgz",
+ "integrity": "sha512-XirM+Zo/PFlA+1h+i4bkfvagujta+LIM2AOSzPbt8JqXbbuxb1HTB+FqIyaKmue9yiCx/JIJY6pXsOl3+T8JGw==",
+ "requires": {
+ "@actions/http-client": "^1.0.11"
+ },
+ "dependencies": {
+ "@actions/http-client": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
+ "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
+ "requires": {
+ "tunnel": "0.0.6"
+ }
+ }
+ }
},
"@actions/exec": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.3.tgz",
- "integrity": "sha512-TogJGnueOmM7ntCi0ASTUj4LapRRtDfj57Ja4IhPmg2fls28uVOPbAn8N+JifaOumN2UG3oEO/Ixek2A4NcYSA==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
+ "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
"requires": {
"@actions/io": "^1.0.1"
}
},
"@actions/http-client": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.8.tgz",
- "integrity": "sha512-G4JjJ6f9Hb3Zvejj+ewLLKLf99ZC+9v+yCxoYf9vSyH+WkzPLB2LuUtRMGNkooMqdugGBFStIKXOuvH1W+EctA==",
- "requires": {
- "tunnel": "0.0.6"
- }
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
+ "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
},
"@actions/io": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.1.tgz",
- "integrity": "sha512-Qi4JoKXjmE0O67wAOH6y0n26QXhMKMFo7GD/4IXNVcrtLjUlGjGuVys6pQgwF3ArfGTQu0XpqaNr0YhED2RaRA=="
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.2.tgz",
+ "integrity": "sha512-d+RwPlMp+2qmBfeLYPLXuSRykDIFEwdTA0MMxzS9kh4kvP1ftrc/9fzy6pX6qAjthdXruHQ6/6kjT/DNo5ALuw=="
},
"@types/nock": {
"version": "10.0.3",
diff --git a/packages/tool-cache/package.json b/packages/tool-cache/package.json
index da75109d..7c48d91a 100644
--- a/packages/tool-cache/package.json
+++ b/packages/tool-cache/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/tool-cache",
- "version": "1.7.2",
+ "version": "2.0.0",
"description": "Actions tool-cache lib",
"keywords": [
"github",
@@ -38,7 +38,7 @@
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.0",
- "@actions/http-client": "^1.0.8",
+ "@actions/http-client": "^2.0.0",
"@actions/io": "^1.1.1",
"semver": "^6.1.0",
"uuid": "^3.3.2"
diff --git a/packages/tool-cache/src/tool-cache.ts b/packages/tool-cache/src/tool-cache.ts
index 92fd519a..694d1252 100644
--- a/packages/tool-cache/src/tool-cache.ts
+++ b/packages/tool-cache/src/tool-cache.ts
@@ -8,12 +8,12 @@ import * as httpm from '@actions/http-client'
import * as semver from 'semver'
import * as stream from 'stream'
import * as util from 'util'
+import {ok} from 'assert'
+import {OutgoingHttpHeaders} from 'http'
import uuidV4 from 'uuid/v4'
import {exec} from '@actions/exec/lib/exec'
import {ExecOptions} from '@actions/exec/lib/interfaces'
-import {ok} from 'assert'
import {RetryHelper} from './retry-helper'
-import {IHeaders} from '@actions/http-client/interfaces'
export class HTTPError extends Error {
constructor(readonly httpStatusCode: number | undefined) {
@@ -39,7 +39,7 @@ export async function downloadTool(
url: string,
dest?: string,
auth?: string,
- headers?: IHeaders
+ headers?: OutgoingHttpHeaders
): Promise {
dest = dest || path.join(_getTempDirectory(), uuidV4())
await io.mkdirP(path.dirname(dest))
@@ -82,7 +82,7 @@ async function downloadToolAttempt(
url: string,
dest: string,
auth?: string,
- headers?: IHeaders
+ headers?: OutgoingHttpHeaders
): Promise {
if (fs.existsSync(dest)) {
throw new Error(`Destination file path ${dest} already exists`)
@@ -596,7 +596,7 @@ export async function getManifestFromRepo(
const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`
const http: httpm.HttpClient = new httpm.HttpClient('tool-cache')
- const headers: IHeaders = {}
+ const headers: OutgoingHttpHeaders = {}
if (auth) {
core.debug('set auth')
headers.authorization = auth
From e48f1d0c542f4b4c2f7ca8a963e61a9462064077 Mon Sep 17 00:00:00 2001
From: Konrad Pabjan
Date: Fri, 13 May 2022 10:19:06 -0400
Subject: [PATCH 6/9] Make tunnel a prod dependency for http-client (#1085)
---
packages/http-client/package-lock.json | 10 +++++-----
packages/http-client/package.json | 6 ++++--
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/packages/http-client/package-lock.json b/packages/http-client/package-lock.json
index 7a2f0f23..ed6d25ac 100644
--- a/packages/http-client/package-lock.json
+++ b/packages/http-client/package-lock.json
@@ -8,10 +8,12 @@
"name": "@actions/http-client",
"version": "2.0.0",
"license": "MIT",
+ "dependencies": {
+ "tunnel": "^0.0.6"
+ },
"devDependencies": {
"@types/tunnel": "0.0.3",
- "proxy": "^1.0.1",
- "tunnel": "0.0.6"
+ "proxy": "^1.0.1"
}
},
"node_modules/@types/node": {
@@ -182,7 +184,6 @@
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
- "dev": true,
"engines": {
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
}
@@ -325,8 +326,7 @@
"tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
- "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
- "dev": true
+ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
}
}
}
diff --git a/packages/http-client/package.json b/packages/http-client/package.json
index ed4129c0..b140ac4a 100644
--- a/packages/http-client/package.json
+++ b/packages/http-client/package.json
@@ -40,7 +40,9 @@
},
"devDependencies": {
"@types/tunnel": "0.0.3",
- "proxy": "^1.0.1",
- "tunnel": "0.0.6"
+ "proxy": "^1.0.1"
+ },
+ "dependencies": {
+ "tunnel": "^0.0.6"
}
}
From 2abc7c46f8ed6d554f3b2ac0c83cc8173f379808 Mon Sep 17 00:00:00 2001
From: Konrad Pabjan
Date: Fri, 13 May 2022 10:29:29 -0400
Subject: [PATCH 7/9] Bump to version 2.0.1 (#1086)
---
packages/http-client/RELEASES.md | 3 +++
packages/http-client/package-lock.json | 2 +-
packages/http-client/package.json | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/packages/http-client/RELEASES.md b/packages/http-client/RELEASES.md
index a097a4e0..344555f9 100644
--- a/packages/http-client/RELEASES.md
+++ b/packages/http-client/RELEASES.md
@@ -1,5 +1,8 @@
## Releases
+## 2.0.1
+- Fix an issue with missing `tunnel` dependency [#1085](https://github.com/actions/toolkit/pull/1085)
+
## 2.0.0
- The package is now compiled with TypeScript's [`strict` compiler setting](https://www.typescriptlang.org/tsconfig#strict). To comply with stricter rules:
- Some exported types now include `| null` or `| undefined`, matching their actual behavior.
diff --git a/packages/http-client/package-lock.json b/packages/http-client/package-lock.json
index ed6d25ac..3c2c4e54 100644
--- a/packages/http-client/package-lock.json
+++ b/packages/http-client/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@actions/http-client",
- "version": "2.0.0",
+ "version": "2.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
diff --git a/packages/http-client/package.json b/packages/http-client/package.json
index b140ac4a..c1de2213 100644
--- a/packages/http-client/package.json
+++ b/packages/http-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/http-client",
- "version": "2.0.0",
+ "version": "2.0.1",
"description": "Actions Http Client",
"keywords": [
"github",
From 82efa3d28565ebe2aabe24fcea597e83a4b66d5f Mon Sep 17 00:00:00 2001
From: Konrad Pabjan
Date: Fri, 13 May 2022 10:58:36 -0400
Subject: [PATCH 8/9] Bump @actions/http-client in all packages that use it
(#1087)
---
packages/artifact/package-lock.json | 20 ++++++++++------
packages/artifact/package.json | 2 +-
packages/cache/package-lock.json | 20 ++++++++++------
packages/cache/package.json | 6 ++---
packages/core/package-lock.json | 33 +++++++++++++++++++++------
packages/core/package.json | 2 +-
packages/github/package-lock.json | 33 +++++++++++++++++++++------
packages/github/package.json | 2 +-
packages/tool-cache/package-lock.json | 20 ++++++++++------
packages/tool-cache/package.json | 2 +-
10 files changed, 98 insertions(+), 42 deletions(-)
diff --git a/packages/artifact/package-lock.json b/packages/artifact/package-lock.json
index 56e6a712..0740ed4d 100644
--- a/packages/artifact/package-lock.json
+++ b/packages/artifact/package-lock.json
@@ -10,7 +10,7 @@
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.6",
- "@actions/http-client": "^2.0.0",
+ "@actions/http-client": "^2.0.1",
"tmp": "^0.2.1",
"tmp-promise": "^3.0.2"
},
@@ -36,9 +36,12 @@
}
},
"node_modules/@actions/http-client": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
- "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
+ "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
+ "dependencies": {
+ "tunnel": "^0.0.6"
+ }
},
"node_modules/@types/tmp": {
"version": "0.2.3",
@@ -210,9 +213,12 @@
}
},
"@actions/http-client": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
- "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
+ "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
+ "requires": {
+ "tunnel": "^0.0.6"
+ }
},
"@types/tmp": {
"version": "0.2.3",
diff --git a/packages/artifact/package.json b/packages/artifact/package.json
index 64c51668..cb56c1a8 100644
--- a/packages/artifact/package.json
+++ b/packages/artifact/package.json
@@ -38,7 +38,7 @@
},
"dependencies": {
"@actions/core": "^1.2.6",
- "@actions/http-client": "^2.0.0",
+ "@actions/http-client": "^2.0.1",
"tmp": "^0.2.1",
"tmp-promise": "^3.0.2"
},
diff --git a/packages/cache/package-lock.json b/packages/cache/package-lock.json
index d577d79f..cdc4c5cd 100644
--- a/packages/cache/package-lock.json
+++ b/packages/cache/package-lock.json
@@ -12,7 +12,7 @@
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.1",
"@actions/glob": "^0.1.0",
- "@actions/http-client": "^2.0.0",
+ "@actions/http-client": "^2.0.1",
"@actions/io": "^1.0.1",
"@azure/ms-rest-js": "^2.6.0",
"@azure/storage-blob": "^12.8.0",
@@ -48,9 +48,12 @@
}
},
"node_modules/@actions/http-client": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
- "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
+ "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
+ "dependencies": {
+ "tunnel": "^0.0.6"
+ }
},
"node_modules/@actions/io": {
"version": "1.1.2",
@@ -624,9 +627,12 @@
}
},
"@actions/http-client": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
- "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
+ "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
+ "requires": {
+ "tunnel": "^0.0.6"
+ }
},
"@actions/io": {
"version": "1.1.2",
diff --git a/packages/cache/package.json b/packages/cache/package.json
index 1185abed..21bb683a 100644
--- a/packages/cache/package.json
+++ b/packages/cache/package.json
@@ -40,7 +40,7 @@
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.1",
"@actions/glob": "^0.1.0",
- "@actions/http-client": "^2.0.0",
+ "@actions/http-client": "^2.0.1",
"@actions/io": "^1.0.1",
"@azure/ms-rest-js": "^2.6.0",
"@azure/storage-blob": "^12.8.0",
@@ -48,8 +48,8 @@
"uuid": "^3.3.3"
},
"devDependencies": {
- "typescript": "^3.8.3",
"@types/semver": "^6.0.0",
- "@types/uuid": "^3.4.5"
+ "@types/uuid": "^3.4.5",
+ "typescript": "^3.8.3"
}
}
diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json
index cd2ff3ed..dcb996b1 100644
--- a/packages/core/package-lock.json
+++ b/packages/core/package-lock.json
@@ -9,35 +9,54 @@
"version": "1.8.1",
"license": "MIT",
"dependencies": {
- "@actions/http-client": "^2.0.0"
+ "@actions/http-client": "^2.0.1"
},
"devDependencies": {
"@types/node": "^12.0.2"
}
},
"node_modules/@actions/http-client": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
- "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
+ "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
+ "dependencies": {
+ "tunnel": "^0.0.6"
+ }
},
"node_modules/@types/node": {
"version": "12.0.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz",
"integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==",
"dev": true
+ },
+ "node_modules/tunnel": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
+ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
+ "engines": {
+ "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
+ }
}
},
"dependencies": {
"@actions/http-client": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
- "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
+ "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
+ "requires": {
+ "tunnel": "^0.0.6"
+ }
},
"@types/node": {
"version": "12.0.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz",
"integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==",
"dev": true
+ },
+ "tunnel": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
+ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
}
}
}
diff --git a/packages/core/package.json b/packages/core/package.json
index cd914386..8eefd72d 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -36,7 +36,7 @@
"url": "https://github.com/actions/toolkit/issues"
},
"dependencies": {
- "@actions/http-client": "^2.0.0"
+ "@actions/http-client": "^2.0.1"
},
"devDependencies": {
"@types/node": "^12.0.2"
diff --git a/packages/github/package-lock.json b/packages/github/package-lock.json
index defa7724..3e8992fb 100644
--- a/packages/github/package-lock.json
+++ b/packages/github/package-lock.json
@@ -9,7 +9,7 @@
"version": "5.0.2",
"license": "MIT",
"dependencies": {
- "@actions/http-client": "^2.0.0",
+ "@actions/http-client": "^2.0.1",
"@octokit/core": "^3.6.0",
"@octokit/plugin-paginate-rest": "^2.17.0",
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
@@ -19,9 +19,12 @@
}
},
"node_modules/@actions/http-client": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
- "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
+ "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
+ "dependencies": {
+ "tunnel": "^0.0.6"
+ }
},
"node_modules/@octokit/auth-token": {
"version": "2.4.5",
@@ -337,6 +340,14 @@
"proxy": "bin/proxy.js"
}
},
+ "node_modules/tunnel": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
+ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
+ "engines": {
+ "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
+ }
+ },
"node_modules/universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
@@ -350,9 +361,12 @@
},
"dependencies": {
"@actions/http-client": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
- "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
+ "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
+ "requires": {
+ "tunnel": "^0.0.6"
+ }
},
"@octokit/auth-token": {
"version": "2.4.5",
@@ -621,6 +635,11 @@
"debug": "^4.1.1"
}
},
+ "tunnel": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
+ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
+ },
"universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
diff --git a/packages/github/package.json b/packages/github/package.json
index 8ed6c424..881c595e 100644
--- a/packages/github/package.json
+++ b/packages/github/package.json
@@ -38,7 +38,7 @@
"url": "https://github.com/actions/toolkit/issues"
},
"dependencies": {
- "@actions/http-client": "^2.0.0",
+ "@actions/http-client": "^2.0.1",
"@octokit/core": "^3.6.0",
"@octokit/plugin-paginate-rest": "^2.17.0",
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
diff --git a/packages/tool-cache/package-lock.json b/packages/tool-cache/package-lock.json
index bb33ad7f..8bacb776 100644
--- a/packages/tool-cache/package-lock.json
+++ b/packages/tool-cache/package-lock.json
@@ -11,7 +11,7 @@
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.0",
- "@actions/http-client": "^2.0.0",
+ "@actions/http-client": "^2.0.1",
"@actions/io": "^1.1.1",
"semver": "^6.1.0",
"uuid": "^3.3.2"
@@ -48,9 +48,12 @@
}
},
"node_modules/@actions/http-client": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
- "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
+ "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
+ "dependencies": {
+ "tunnel": "^0.0.6"
+ }
},
"node_modules/@actions/io": {
"version": "1.1.2",
@@ -314,9 +317,12 @@
}
},
"@actions/http-client": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.0.tgz",
- "integrity": "sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA=="
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
+ "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
+ "requires": {
+ "tunnel": "^0.0.6"
+ }
},
"@actions/io": {
"version": "1.1.2",
diff --git a/packages/tool-cache/package.json b/packages/tool-cache/package.json
index 7c48d91a..8c157bcc 100644
--- a/packages/tool-cache/package.json
+++ b/packages/tool-cache/package.json
@@ -38,7 +38,7 @@
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.0",
- "@actions/http-client": "^2.0.0",
+ "@actions/http-client": "^2.0.1",
"@actions/io": "^1.1.1",
"semver": "^6.1.0",
"uuid": "^3.3.2"
From 500d0b42fee2552ae9eeb5933091fe2fbf14e72d Mon Sep 17 00:00:00 2001
From: Konrad Pabjan
Date: Fri, 13 May 2022 11:12:58 -0400
Subject: [PATCH 9/9] Bump all packages that have @actions/http-client as a
dependency (#1088)
* bump @actions/artifact
* update @actions/cache
* Update @actions/core
* Update @actions/github
* update @actions/tool-cache
---
packages/artifact/RELEASES.md | 6 +++++-
packages/artifact/package-lock.json | 2 +-
packages/artifact/package.json | 2 +-
packages/cache/RELEASES.md | 5 ++++-
packages/cache/package-lock.json | 2 +-
packages/cache/package.json | 2 +-
packages/core/RELEASES.md | 3 +++
packages/core/package-lock.json | 2 +-
packages/core/package.json | 2 +-
packages/github/RELEASES.md | 3 +++
packages/github/package-lock.json | 2 +-
packages/github/package.json | 2 +-
packages/tool-cache/RELEASES.md | 3 +++
packages/tool-cache/package-lock.json | 2 +-
packages/tool-cache/package.json | 2 +-
15 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/packages/artifact/RELEASES.md b/packages/artifact/RELEASES.md
index 3d4425d8..d9e1935c 100644
--- a/packages/artifact/RELEASES.md
+++ b/packages/artifact/RELEASES.md
@@ -81,4 +81,8 @@
### 1.0.1
-- Update to v2.0.0 of `@actions/http-client`
\ No newline at end of file
+- Update to v2.0.0 of `@actions/http-client`
+
+### 1.0.2
+
+- Update to v2.0.1 of `@actions/http-client` [#1087](https://github.com/actions/toolkit/pull/1087)
\ No newline at end of file
diff --git a/packages/artifact/package-lock.json b/packages/artifact/package-lock.json
index 0740ed4d..f46f3efd 100644
--- a/packages/artifact/package-lock.json
+++ b/packages/artifact/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@actions/artifact",
- "version": "1.0.1",
+ "version": "1.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
diff --git a/packages/artifact/package.json b/packages/artifact/package.json
index cb56c1a8..1a8e1b7a 100644
--- a/packages/artifact/package.json
+++ b/packages/artifact/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/artifact",
- "version": "1.0.1",
+ "version": "1.0.2",
"preview": true,
"description": "Actions artifact lib",
"keywords": [
diff --git a/packages/cache/RELEASES.md b/packages/cache/RELEASES.md
index 58217f86..8adb7e3c 100644
--- a/packages/cache/RELEASES.md
+++ b/packages/cache/RELEASES.md
@@ -58,4 +58,7 @@
- Added support to check if Actions cache service feature is available or not [#1028](https://github.com/actions/toolkit/pull/1028)
### 2.0.3
-- Update to v2.0.0 of `@actions/http-client`
\ No newline at end of file
+- Update to v2.0.0 of `@actions/http-client`
+
+### 2.0.4
+- Update to v2.0.1 of `@actions/http-client` [#1087](https://github.com/actions/toolkit/pull/1087)
\ No newline at end of file
diff --git a/packages/cache/package-lock.json b/packages/cache/package-lock.json
index cdc4c5cd..8ff62189 100644
--- a/packages/cache/package-lock.json
+++ b/packages/cache/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@actions/cache",
- "version": "2.0.3",
+ "version": "2.0.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
diff --git a/packages/cache/package.json b/packages/cache/package.json
index 21bb683a..0b7bff06 100644
--- a/packages/cache/package.json
+++ b/packages/cache/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/cache",
- "version": "2.0.3",
+ "version": "2.0.4",
"preview": true,
"description": "Actions cache lib",
"keywords": [
diff --git a/packages/core/RELEASES.md b/packages/core/RELEASES.md
index 2f00f0ce..f751b4ef 100644
--- a/packages/core/RELEASES.md
+++ b/packages/core/RELEASES.md
@@ -1,5 +1,8 @@
# @actions/core Releases
+### 1.8.2
+- Update to v2.0.1 of `@actions/http-client` [#1087](https://github.com/actions/toolkit/pull/1087)
+
### 1.8.1
- Update to v2.0.0 of `@actions/http-client`
diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json
index dcb996b1..82ddb5f8 100644
--- a/packages/core/package-lock.json
+++ b/packages/core/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@actions/core",
- "version": "1.8.1",
+ "version": "1.8.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
diff --git a/packages/core/package.json b/packages/core/package.json
index 8eefd72d..7a0129c0 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/core",
- "version": "1.8.1",
+ "version": "1.8.2",
"description": "Actions core lib",
"keywords": [
"github",
diff --git a/packages/github/RELEASES.md b/packages/github/RELEASES.md
index abbca6f1..fb7ac2c7 100644
--- a/packages/github/RELEASES.md
+++ b/packages/github/RELEASES.md
@@ -1,5 +1,8 @@
# @actions/github Releases
+### 5.0.3
+- - Update to v2.0.1 of `@actions/http-client` [#1087](https://github.com/actions/toolkit/pull/1087)
+
### 5.0.2
- Update to v2.0.0 of `@actions/http-client`
diff --git a/packages/github/package-lock.json b/packages/github/package-lock.json
index 3e8992fb..b66a87f0 100644
--- a/packages/github/package-lock.json
+++ b/packages/github/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@actions/github",
- "version": "5.0.2",
+ "version": "5.0.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
diff --git a/packages/github/package.json b/packages/github/package.json
index 881c595e..30da3279 100644
--- a/packages/github/package.json
+++ b/packages/github/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/github",
- "version": "5.0.2",
+ "version": "5.0.3",
"description": "Actions github lib",
"keywords": [
"github",
diff --git a/packages/tool-cache/RELEASES.md b/packages/tool-cache/RELEASES.md
index 8285cb22..9fdd4898 100644
--- a/packages/tool-cache/RELEASES.md
+++ b/packages/tool-cache/RELEASES.md
@@ -1,5 +1,8 @@
# @actions/tool-cache Releases
+### 2.0.1
+- Update to v2.0.1 of `@actions/http-client` [#1087](https://github.com/actions/toolkit/pull/1087)
+
### 2.0.0
- Update to v2.0.0 of `@actions/http-client`
- The type of the `headers` parameter in the exported function `downloadTool` has been narrowed from `{ [header: string]: any }` to `{ [header: string]: number | string | string[] | undefined; }` (that is, `http.OutgoingHttpHeaders`).
diff --git a/packages/tool-cache/package-lock.json b/packages/tool-cache/package-lock.json
index 8bacb776..1c7dfe7f 100644
--- a/packages/tool-cache/package-lock.json
+++ b/packages/tool-cache/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@actions/tool-cache",
- "version": "2.0.0",
+ "version": "2.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
diff --git a/packages/tool-cache/package.json b/packages/tool-cache/package.json
index 8c157bcc..c7744d58 100644
--- a/packages/tool-cache/package.json
+++ b/packages/tool-cache/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/tool-cache",
- "version": "2.0.0",
+ "version": "2.0.1",
"description": "Actions tool-cache lib",
"keywords": [
"github",