@podium/client 5.0.14 → 5.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [5.0.15](https://github.com/podium-lib/client/compare/v5.0.14...v5.0.15) (2024-05-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Requests hang on http errors ([a9c82b6](https://github.com/podium-lib/client/commit/a9c82b6a931d92540c69c2cbf911184710dc54ee))
7
+
1
8
  ## [5.0.14](https://github.com/podium-lib/client/compare/v5.0.13...v5.0.14) (2024-05-02)
2
9
 
3
10
 
package/lib/http.js CHANGED
@@ -1,23 +1,8 @@
1
- import { Client } from 'undici';
1
+ import { request } from 'undici';
2
2
 
3
3
  export default class HTTP {
4
- // #client;
5
-
6
- // constructor() {
7
- // // this.#client = { request };
8
- // }
9
-
10
4
  async request(url, options) {
11
- const u = new URL(url);
12
- const client = new Client(u.origin, {
13
- ...options,
14
- connect: { rejectUnauthorized: options.rejectUnauthorized },
15
- });
16
-
17
- const { statusCode, headers, body } = await client.request({
18
- ...options,
19
- path: u.pathname,
20
- });
5
+ const { statusCode, headers, body } = await request(new URL(url), options);
21
6
  return { statusCode, headers, body };
22
7
  }
23
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@podium/client",
3
- "version": "5.0.14",
3
+ "version": "5.0.15",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -35,7 +35,7 @@
35
35
  "test": "tap --disable-coverage --allow-empty-coverage"
36
36
  },
37
37
  "dependencies": {
38
- "@hapi/boom": "^10.0.0",
38
+ "@hapi/boom": "10.0.1",
39
39
  "@metrics/client": "2.5.2",
40
40
  "@podium/schemas": "5.0.1",
41
41
  "@podium/utils": "5.0.4",
@@ -43,16 +43,16 @@
43
43
  "http-cache-semantics": "^4.0.3",
44
44
  "lodash.clonedeep": "^4.5.0",
45
45
  "ttl-mem-cache": "4.1.0",
46
- "undici": "^6.0.0"
46
+ "undici": "6.13.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@podium/test-utils": "2.5.2",
50
50
  "@semantic-release/changelog": "6.0.3",
51
51
  "@semantic-release/git": "10.0.1",
52
52
  "@babel/eslint-parser": "7.24.5",
53
- "@semantic-release/github": "9.2.6",
54
- "@semantic-release/npm": "11.0.3",
55
- "@semantic-release/release-notes-generator": "12.1.0",
53
+ "@semantic-release/github": "10.0.3",
54
+ "@semantic-release/npm": "12.0.0",
55
+ "@semantic-release/release-notes-generator": "13.0.0",
56
56
  "@sinonjs/fake-timers": "11.2.2",
57
57
  "benchmark": "2.1.4",
58
58
  "eslint": "8.57.0",