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
Conversation
@@ -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' |
There was a problem hiding this comment.
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.
### 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.