Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update other packages to use http-client v2 #1082

Merged
merged 9 commits into from May 11, 2022

Conversation

brcrista
Copy link
Contributor

@brcrista brcrista commented May 10, 2022

We moved @actions/http-client to be part of the toolkit in #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.

@brcrista brcrista requested review from a team as code owners May 10, 2022 16:46
@@ -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'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having to put /lib/ here is a Lerna thing now that we're using the same version of the package that's in the repo.

Comment on lines +3 to +6
### 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.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the major version bump. This could be considered a bug fix, but I went with bumping the major version to be conservative.

Copy link
Contributor

@luketomlinson luketomlinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@brcrista brcrista merged commit aa676f3 into main May 11, 2022
@brcrista brcrista deleted the brcrista/http-client-update-other-packages branch May 11, 2022 21:14
at-wat pushed a commit to at-wat/actions-toolkit that referenced this pull request Aug 31, 2023
We moved `@actions/http-client` to be part of the toolkit in actions#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants