@podium/client 5.0.0 → 5.0.2

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,17 @@
1
+ ## [5.0.2](https://github.com/podium-lib/client/compare/v5.0.1...v5.0.2) (2023-12-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Consume body on non 200 requests ([ebfc8be](https://github.com/podium-lib/client/commit/ebfc8be4cbb2fcb57ac49febc93fd0381fa9c09f))
7
+
8
+ ## [5.0.1](https://github.com/podium-lib/client/compare/v5.0.0...v5.0.1) (2023-11-30)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * set correct types file ([6d08e50](https://github.com/podium-lib/client/commit/6d08e501728745e180c7a5d436f238c468dec136))
14
+
1
15
  # [5.0.0](https://github.com/podium-lib/client/compare/v4.6.1...v5.0.0) (2023-11-28)
2
16
 
3
17
 
@@ -166,6 +166,8 @@ export default class PodletClientContentResolver {
166
166
  },
167
167
  };
168
168
 
169
+ // Body must be consumed; https://github.com/nodejs/undici/issues/583#issuecomment-855384858
170
+ await body.text();
169
171
  throw new Boom(errorMessage, errorOptions);
170
172
  }
171
173
  if (resError) {
@@ -186,7 +188,10 @@ export default class PodletClientContentResolver {
186
188
  js: utils.filterAssets("fallback", outgoing.manifest.js),
187
189
  css: utils.filterAssets("fallback", outgoing.manifest.css),
188
190
  }),
189
- );
191
+ );
192
+
193
+ // Body must be consumed; https://github.com/nodejs/undici/issues/583#issuecomment-855384858
194
+ await body.text();
190
195
  return outgoing;
191
196
  }
192
197
 
@@ -211,7 +216,7 @@ export default class PodletClientContentResolver {
211
216
  this.#log.info(
212
217
  `podlet version number in header differs from cached version number - aborting request to remote resource for content - resource: ${outgoing.name} - url: ${outgoing.contentUri}`,
213
218
  );
214
- // TODO r.abort();
219
+
215
220
  outgoing.status = 'stale';
216
221
  return outgoing;
217
222
  }
@@ -113,6 +113,9 @@ export default class PodletClientFallbackResolver {
113
113
  );
114
114
 
115
115
  outgoing.fallback = '';
116
+
117
+ // Body must be consumed; https://github.com/nodejs/undici/issues/583#issuecomment-855384858
118
+ await body.text();
116
119
  return outgoing;
117
120
  }
118
121
 
@@ -99,6 +99,9 @@ export default class PodletClientManifestResolver {
99
99
  this.#log.warn(
100
100
  `remote resource responded with non 200 http status code for manifest - code: ${statusCode} - resource: ${outgoing.name} - url: ${outgoing.manifestUri}`,
101
101
  );
102
+
103
+ // Body must be consumed; https://github.com/nodejs/undici/issues/583#issuecomment-855384858
104
+ await body.text();
102
105
  return outgoing;
103
106
  }
104
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@podium/client",
3
- "version": "5.0.0",
3
+ "version": "5.0.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -28,7 +28,7 @@
28
28
  "lib"
29
29
  ],
30
30
  "main": "./lib/client.js",
31
- "types": "index.d.ts",
31
+ "types": "client.d.ts",
32
32
  "scripts": {
33
33
  "lint": "eslint .",
34
34
  "lint:fix": "eslint --fix .",
@@ -50,9 +50,9 @@
50
50
  "@semantic-release/changelog": "6.0.3",
51
51
  "@semantic-release/git": "10.0.1",
52
52
  "@babel/eslint-parser": "7.23.3",
53
- "@semantic-release/github": "8.1.0",
54
- "@semantic-release/npm": "8.0.3",
55
- "@semantic-release/release-notes-generator": "10.0.3",
53
+ "@semantic-release/github": "9.2.4",
54
+ "@semantic-release/npm": "11.0.1",
55
+ "@semantic-release/release-notes-generator": "12.1.0",
56
56
  "@sinonjs/fake-timers": "11.2.2",
57
57
  "benchmark": "2.1.4",
58
58
  "eslint": "8.54.0",