Skip to content

Commit c995fc3

Browse files
authored
Merge pull request #52 from langchain-ai/dqbd/hono-json-extra
fix(api): do not rely on Response for `jsonExtra`
2 parents 076e58c + d47c772 commit c995fc3

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

libs/langgraph-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@langchain/langgraph-api",
3-
"version": "0.0.24",
3+
"version": "0.0.25",
44
"type": "module",
55
"engines": {
66
"node": "^18.19.0 || >=20.16.0"

libs/langgraph-api/src/utils/hono.mts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ import { stream } from "hono/streaming";
44
import { StreamingApi } from "hono/utils/stream";
55

66
export function jsonExtra<T>(c: Context, object: T) {
7-
return new Response(serialiseAsDict(object), {
8-
...c.res,
9-
headers: { ...c.res.headers, "Content-Type": "application/json" },
10-
});
7+
c.header("Content-Type", "application/json");
8+
return c.body(serialiseAsDict(object));
119
}
1210

1311
export function waitKeepAlive(c: Context, promise: Promise<unknown>) {

libs/langgraph-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@langchain/langgraph-cli",
3-
"version": "0.0.24",
3+
"version": "0.0.25",
44
"type": "module",
55
"engines": {
66
"node": "^18.19.0 || >=20.16.0"

libs/langgraph-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@langchain/langgraph-ui",
3-
"version": "0.0.24",
3+
"version": "0.0.25",
44
"type": "module",
55
"engines": {
66
"node": "^18.19.0 || >=20.16.0"

0 commit comments

Comments
 (0)