@podium/client 5.0.1 → 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 +7 -0
- package/lib/resolver.content.js +7 -2
- package/lib/resolver.fallback.js +3 -0
- package/lib/resolver.manifest.js +3 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
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
|
+
|
|
1
8
|
## [5.0.1](https://github.com/podium-lib/client/compare/v5.0.0...v5.0.1) (2023-11-30)
|
|
2
9
|
|
|
3
10
|
|
package/lib/resolver.content.js
CHANGED
|
@@ -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
|
-
|
|
219
|
+
|
|
215
220
|
outgoing.status = 'stale';
|
|
216
221
|
return outgoing;
|
|
217
222
|
}
|
package/lib/resolver.fallback.js
CHANGED
package/lib/resolver.manifest.js
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -50,7 +50,7 @@
|
|
|
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": "9.2.
|
|
53
|
+
"@semantic-release/github": "9.2.4",
|
|
54
54
|
"@semantic-release/npm": "11.0.1",
|
|
55
55
|
"@semantic-release/release-notes-generator": "12.1.0",
|
|
56
56
|
"@sinonjs/fake-timers": "11.2.2",
|