@podium/client
Advanced tools
Comparing version 5.0.14 to 5.0.15
@@ -0,1 +1,8 @@ | ||
## [5.0.15](https://github.com/podium-lib/client/compare/v5.0.14...v5.0.15) (2024-05-07) | ||
### Bug Fixes | ||
* Requests hang on http errors ([a9c82b6](https://github.com/podium-lib/client/commit/a9c82b6a931d92540c69c2cbf911184710dc54ee)) | ||
## [5.0.14](https://github.com/podium-lib/client/compare/v5.0.13...v5.0.14) (2024-05-02) | ||
@@ -2,0 +9,0 @@ |
@@ -1,23 +0,8 @@ | ||
import { Client } from 'undici'; | ||
import { request } from 'undici'; | ||
export default class HTTP { | ||
// #client; | ||
// constructor() { | ||
// // this.#client = { request }; | ||
// } | ||
async request(url, options) { | ||
const u = new URL(url); | ||
const client = new Client(u.origin, { | ||
...options, | ||
connect: { rejectUnauthorized: options.rejectUnauthorized }, | ||
}); | ||
const { statusCode, headers, body } = await client.request({ | ||
...options, | ||
path: u.pathname, | ||
}); | ||
const { statusCode, headers, body } = await request(new URL(url), options); | ||
return { statusCode, headers, body }; | ||
} | ||
} |
{ | ||
"name": "@podium/client", | ||
"version": "5.0.14", | ||
"version": "5.0.15", | ||
"type": "module", | ||
@@ -38,3 +38,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"@hapi/boom": "^10.0.0", | ||
"@hapi/boom": "10.0.1", | ||
"@metrics/client": "2.5.2", | ||
@@ -47,3 +47,3 @@ "@podium/schemas": "5.0.1", | ||
"ttl-mem-cache": "4.1.0", | ||
"undici": "^6.0.0" | ||
"undici": "6.13.0" | ||
}, | ||
@@ -55,5 +55,5 @@ "devDependencies": { | ||
"@babel/eslint-parser": "7.24.5", | ||
"@semantic-release/github": "9.2.6", | ||
"@semantic-release/npm": "11.0.3", | ||
"@semantic-release/release-notes-generator": "12.1.0", | ||
"@semantic-release/github": "10.0.3", | ||
"@semantic-release/npm": "12.0.0", | ||
"@semantic-release/release-notes-generator": "13.0.0", | ||
"@sinonjs/fake-timers": "11.2.2", | ||
@@ -60,0 +60,0 @@ "benchmark": "2.1.4", |
125962
1528
+ Addedundici@6.13.0(transitive)
- Removedundici@6.21.1(transitive)
Updated@hapi/boom@10.0.1
Updatedundici@6.13.0