Compare commits

..

No commits in common. "develop" and "0.23.21" have entirely different histories.

2 changed files with 5 additions and 11 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@ztimson/utils",
"version": "0.23.22",
"version": "0.23.21",
"description": "Utility library",
"author": "Zak Timson",
"license": "MIT",
@ -14,9 +14,9 @@
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
}
},
"scripts": {
@ -34,7 +34,7 @@
"typedoc": "^0.26.7",
"typescript": "^5.3.3",
"vite": "^5.0.12",
"vite-plugin-dts": "^4.5.3"
"vite-plugin-dts": "^3.7.2"
},
"files": [
"dist"

View File

@ -30,13 +30,7 @@ class HttpResponse<T = any> extends Response {
url!: string;
constructor(resp: Response, stream: ReadableStream) {
const body = [204, 205, 304].includes(resp.status) ? null : stream;
super(body, {
headers: resp.headers,
status: resp.status,
statusText: resp.statusText,
});
super(stream, {headers: resp.headers, status: resp.status, statusText: resp.statusText});
this.ok = resp.ok;
this.redirected = resp.redirected;
this.type = resp.type;