h3-nightly 2.0.1-rc.7 → 2.0.1-rc.8

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.
Files changed (2) hide show
  1. package/dist/h3.mjs +9 -2
  2. package/package.json +8 -8
package/dist/h3.mjs CHANGED
@@ -136,7 +136,6 @@ var HTTPError = class HTTPError extends Error {
136
136
  ].filter(Boolean).join(" ");
137
137
  super(message, { cause: details });
138
138
  this.cause = details;
139
- Error.captureStackTrace?.(this, this.constructor);
140
139
  this.status = status;
141
140
  this.statusText = statusText || void 0;
142
141
  const rawHeaders = details?.headers || (details?.cause)?.headers;
@@ -900,8 +899,16 @@ function callNodeHandler(handler, req, res) {
900
899
  return new Promise((resolve, reject) => {
901
900
  res.once("close", () => resolve(kHandled));
902
901
  res.once("finish", () => resolve(kHandled));
903
- res.once("pipe", (stream) => resolve(stream));
904
902
  res.once("error", (error) => reject(error));
903
+ res.once("pipe", (stream) => {
904
+ resolve(new Promise((resolve$1, reject$1) => {
905
+ stream.once("close", () => resolve$1(kHandled));
906
+ stream.once("error", (error) => {
907
+ console.error("[h3] Stream error in Node.js handler", { cause: error });
908
+ reject$1(kHandled);
909
+ });
910
+ }));
911
+ });
905
912
  try {
906
913
  if (isMiddleware) Promise.resolve(handler(req, res, (error) => error ? reject(new HTTPError({
907
914
  cause: error,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "h3-nightly",
3
- "version": "2.0.1-rc.7",
3
+ "version": "2.0.1-rc.8",
4
4
  "description": "Minimal H(TTP) framework built for high performance and portability.",
5
5
  "homepage": "https://h3.dev",
6
6
  "repository": "h3js/h3",
@@ -66,28 +66,28 @@
66
66
  "connect": "^3.7.0",
67
67
  "cookie-es": "^2.0.0",
68
68
  "crossws": "^0.4.1",
69
- "elysia": "^1.4.19",
69
+ "elysia": "^1.4.21",
70
70
  "esbuild": "^0.27.2",
71
71
  "eslint": "^9.39.2",
72
- "eslint-config-unjs": "^0.5.0",
72
+ "eslint-config-unjs": "^0.6.2",
73
73
  "express": "^5.2.1",
74
74
  "fetchdts": "^0.1.7",
75
75
  "get-port-please": "^3.2.0",
76
- "h3-nightly": "^2.0.0-20251212-101841-5405a1b",
76
+ "h3-nightly": "^2.0.1-rc.7",
77
77
  "happy-dom": "^20.0.11",
78
78
  "hono": "^4.11.3",
79
79
  "magic-string": "^0.30.21",
80
80
  "memoirist": "^0.4.0",
81
81
  "mitata": "^1.0.34",
82
- "obuild": "^0.4.9",
83
- "oxc-parser": "^0.106.0",
82
+ "obuild": "^0.4.10",
83
+ "oxc-parser": "^0.107.0",
84
84
  "prettier": "^3.7.4",
85
85
  "react": "^19.2.3",
86
86
  "react-dom": "^19.2.3",
87
87
  "typescript": "^5.9.3",
88
88
  "vite": "^7.3.0",
89
89
  "vitest": "^4.0.16",
90
- "zod": "^4.2.1"
90
+ "zod": "^4.3.5"
91
91
  },
92
92
  "peerDependencies": {
93
93
  "crossws": "^0.4.1"
@@ -97,7 +97,7 @@
97
97
  "optional": true
98
98
  }
99
99
  },
100
- "packageManager": "pnpm@10.26.2",
100
+ "packageManager": "pnpm@10.27.0",
101
101
  "engines": {
102
102
  "node": ">=20.11.1"
103
103
  }