Compare commits

...

4 Commits

Author SHA1 Message Date
Daniel Kennedy a8fde16285 Add a release entry for 4.0.0 2026-01-28 09:55:44 -05:00
Daniel Kennedy c418aefbea Fix a JSON lint issue 2026-01-28 09:55:28 -05:00
Daniel Kennedy 63c41896e9 Add proxy/interfaces exports 2026-01-28 09:55:12 -05:00
Daniel Kennedy 74c953d0d2 http-client: convert to ESM 2026-01-28 09:30:08 -05:00
7 changed files with 55 additions and 13 deletions
+25 -3
View File
@@ -1,38 +1,53 @@
## Releases
# Releases
## 4.0.0
- **Breaking change**: Package is now ESM-only
- CommonJS consumers must use dynamic `import()` instead of `require()`
## 3.0.2
- Bump `undici` from `5.28.5` to `6.23.0`
## 3.0.1
- Add support for ACTIONS_ORCHESTRATION_ID in user-agent and default user-agent [#2229](https://github.com/actions/toolkit/pull/2229)
## 3.0.0
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
## 2.2.3
- Fixed an issue where proxy username and password were not handled correctly [#1799](https://github.com/actions/toolkit/pull/1799)
## 2.2.2
- Better handling of url encoded usernames and passwords in proxy config [#1782](https://github.com/actions/toolkit/pull/1782)
## 2.2.1
- Make sure RequestOptions.keepAlive is applied properly on node20 runtime [#1572](https://github.com/actions/toolkit/pull/1572)
## 2.2.0
- Add function to return proxy agent dispatcher for compatibility with latest octokit packages [#1547](https://github.com/actions/toolkit/pull/1547)
## 2.1.1
- Add `HttpClientResponse.readBodyBuffer` method to read from a response stream and return a buffer [#1475](https://github.com/actions/toolkit/pull/1475)
## 2.1.0
- Add support for `*` and subdomains in `no_proxy` [#1355](https://github.com/actions/toolkit/pull/1355) [#1223](https://github.com/actions/toolkit/pull/1223)
- Bypass proxy for loopback IP adresses [#1360](https://github.com/actions/toolkit/pull/1360))
## 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.
- Types implementing the method `RequestHandler.handleAuthentication()` now throw an `Error` rather than returning `null` if they do not support handling an HTTP 401 response. Callers can still use `canHandleAuthentication()` to determine if this handling is supported or not.
@@ -44,25 +59,32 @@
## 1.0.11
Contains a bug fix where proxy is defined without a user and password. see [PR here](https://github.com/actions/http-client/pull/42)
Contains a bug fix where proxy is defined without a user and password. see [PR here](https://github.com/actions/http-client/pull/42)
## 1.0.9
Throw HttpClientError instead of a generic Error from the \<verb>Json() helper methods when the server responds with a non-successful status code.
Throw HttpClientError instead of a generic Error from the \<verb>Json() helper methods when the server responds with a non-successful status code.
## 1.0.8
Fixed security issue where a redirect (e.g. 302) to another domain would pass headers. The fix was to strip the authorization header if the hostname was different. More [details in PR #27](https://github.com/actions/http-client/pull/27)
## 1.0.7
Update NPM dependencies and add 429 to the list of HttpCodes
## 1.0.6
Automatically sends Content-Type and Accept application/json headers for \<verb>Json() helper methods if not set in the client or parameters.
## 1.0.5
Adds \<verb>Json() helper methods for json over http scenarios.
## 1.0.4
Started to add \<verb>Json() helper methods. Do not use this release for that. Use >= 1.0.5 since there was an issue with types.
## 1.0.1 to 1.0.3
Adds proxy support.
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@actions/http-client",
"version": "3.0.2",
"version": "4.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@actions/http-client",
"version": "3.0.2",
"version": "4.0.0",
"license": "MIT",
"dependencies": {
"tunnel": "^0.0.6",
+20 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/http-client",
"version": "3.0.2",
"version": "4.0.0",
"description": "Actions Http Client",
"keywords": [
"github",
@@ -9,8 +9,27 @@
],
"homepage": "https://github.com/actions/toolkit/tree/main/packages/http-client",
"license": "MIT",
"type": "module",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"exports": {
".": {
"types": "./lib/index.d.ts",
"import": "./lib/index.js"
},
"./lib/auth": {
"types": "./lib/auth.d.ts",
"import": "./lib/auth.js"
},
"./lib/proxy": {
"types": "./lib/proxy.d.ts",
"import": "./lib/proxy.js"
},
"./lib/interfaces": {
"types": "./lib/interfaces.d.ts",
"import": "./lib/interfaces.js"
}
},
"directories": {
"lib": "lib",
"test": "__tests__"
+2 -2
View File
@@ -1,6 +1,6 @@
import * as http from 'http'
import * as ifm from './interfaces'
import {HttpClientResponse} from './index'
import * as ifm from './interfaces.js'
import {HttpClientResponse} from './index.js'
export class BasicCredentialHandler implements ifm.RequestHandler {
username: string
+2 -2
View File
@@ -2,9 +2,9 @@
import * as http from 'http'
import * as https from 'https'
import * as ifm from './interfaces'
import * as ifm from './interfaces.js'
import * as net from 'net'
import * as pm from './proxy'
import * as pm from './proxy.js'
import * as tunnel from 'tunnel'
import {ProxyAgent} from 'undici'
+1 -1
View File
@@ -1,6 +1,6 @@
import * as http from 'http'
import * as https from 'https'
import {HttpClientResponse} from './index'
import {HttpClientResponse} from './index.js'
export interface HttpClient {
options(
+3 -2
View File
@@ -3,8 +3,9 @@
"compilerOptions": {
"outDir": "./lib",
"rootDir": "./src",
"moduleResolution": "node",
"declaration": true,
"module": "node16",
"moduleResolution": "node16",
"declaration": true
},
"include": [
"./src"