Skip to content

Commit 8a75d65

Browse files
peppescgcursoragent
andcommitted
chore: remove deprecated @hey-api/client-next dependency
The @hey-api/client-next package has been deprecated since v0.73.0 of @hey-api/openapi-ts, which now bundles the client functionality directly. This removes the redundant dependency. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2623163 commit 8a75d65

3 files changed

Lines changed: 7 additions & 15 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
},
7878
"devDependencies": {
7979
"@biomejs/biome": "2.3.12",
80-
"@hey-api/client-next": "0.5.1",
8180
"@hey-api/openapi-ts": "0.90.10",
8281
"@mswjs/http-middleware": "^0.10.2",
8382
"@playwright/test": "^1.56.1",

pnpm-lock.yaml

Lines changed: 0 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/generated/client/client.gen.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,16 @@ export const createClient = (config: Config = {}): Client => {
144144
case "arrayBuffer":
145145
case "blob":
146146
case "formData":
147-
case "json":
148147
case "text":
149148
data = await response[parseAs]();
150149
break;
150+
case "json": {
151+
// Some servers return 200 with no Content-Length and empty body.
152+
// response.json() would throw; read as text and parse if non-empty.
153+
const text = await response.text();
154+
data = text ? JSON.parse(text) : {};
155+
break;
156+
}
151157
case "stream":
152158
return {
153159
data: response.body,

0 commit comments

Comments
 (0)