-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: bump h3-v2 to 2.0.1-rc.5 #5959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -221,8 +221,8 @@ export const handleServerAction = async ({ | |||||||||
| return new Response( | ||||||||||
| nonStreamingBody ? JSON.stringify(nonStreamingBody) : undefined, | ||||||||||
| { | ||||||||||
| status: response?.status, | ||||||||||
| statusText: response?.statusText, | ||||||||||
| status: response.status, | ||||||||||
| statusText: response.statusText, | ||||||||||
| headers: { | ||||||||||
| 'Content-Type': 'application/json', | ||||||||||
| [X_TSS_SERIALIZED]: 'true', | ||||||||||
|
|
@@ -251,8 +251,8 @@ export const handleServerAction = async ({ | |||||||||
| }, | ||||||||||
| }) | ||||||||||
| return new Response(stream, { | ||||||||||
| status: response?.status, | ||||||||||
| statusText: response?.statusText, | ||||||||||
| status: response.status, | ||||||||||
| statusText: response.statusText, | ||||||||||
| headers: { | ||||||||||
| 'Content-Type': 'application/x-ndjson', | ||||||||||
| [X_TSS_SERIALIZED]: 'true', | ||||||||||
|
|
@@ -261,8 +261,8 @@ export const handleServerAction = async ({ | |||||||||
| } | ||||||||||
|
|
||||||||||
| return new Response(undefined, { | ||||||||||
| status: response?.status, | ||||||||||
| statusText: response?.statusText, | ||||||||||
| status: response.status, | ||||||||||
| statusText: response.statusText, | ||||||||||
| }) | ||||||||||
| } catch (error: any) { | ||||||||||
| if (error instanceof Response) { | ||||||||||
|
|
@@ -301,8 +301,8 @@ export const handleServerAction = async ({ | |||||||||
| ) | ||||||||||
| const response = getResponse() | ||||||||||
| return new Response(serializedError, { | ||||||||||
| status: response?.status ?? 500, | ||||||||||
| statusText: response?.statusText, | ||||||||||
| status: response.status ?? 500, | ||||||||||
| statusText: response.statusText, | ||||||||||
|
Comment on lines
+304
to
+305
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent error handling - status fallback without response null check. Line 304 has This is inside the error handler (catch block), so defensive coding would be especially valuable here. If Apply this diff if defensive handling is desired: - status: response.status ?? 500,
- statusText: response.statusText,
+ status: response?.status ?? 500,
+ statusText: response?.statusText,📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| headers: { | ||||||||||
| 'Content-Type': 'application/json', | ||||||||||
| [X_TSS_SERIALIZED]: 'true', | ||||||||||
|
|
||||||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify h3@2.0.1-rc.5 compatibility before merging.
The dependency bump from
2.0.0-beta.4to2.0.1-rc.5moves to a release candidate with a patch version increment. Ensure that:🌐 Web query:
💡 Result:
Short summary of changes from v2.0.0-beta.4 → v2.0.1-rc.5 and migration steps
Key breaking change
Other notable changes (non-breaking but may require attention)
What changed since v2.0.0-beta.4 (items you might already rely on)
Concrete migration steps
Sources
If you want, I can fetch the exact HTTPResponse diff/PR (#1212) and show specific code changes you must make.
The web search confirms there is a breaking change in v2.0.1-rc.5. The HTTPResponse API has changed, which requires code audits. Let me search the codebase to determine if this affects the code being changed.
🏁 Script executed:
Length of output: 0
🏁 Script executed:
Length of output: 0
🏁 Script executed:
Length of output: 409
🏁 Script executed:
Length of output: 60
🏁 Script executed:
Length of output: 723
Let me refine the searches with corrected syntax:
Length of output: 1005
🏁 Script executed:
Length of output: 94
🏁 Script executed:
Length of output: 798
🏁 Script executed:
Length of output: 422
🏁 Script executed:
Length of output: 824
Now let me check what h3 APIs are actually being used in the codebase:
Length of output: 1669
🏁 Script executed:
Length of output: 1284
🏁 Script executed:
Length of output: 1376
Verify and test h3@2.0.1-rc.5 compatibility—breaking HTTPResponse API change confirmed.
The dependency bump introduces a breaking change: the HTTPResponse API has changed in v2.0.1-rc.5. Your code in
packages/start-server-core/src/request-response.tsdirectly inspects and manipulates HTTPResponse headers throughevent.res.headers(lines 140, 146, 153, 162–172, 186–188), which may be affected by this API change.Required actions:
set(),get(),delete(),append(),keys()) still work as expected with the new HTTPResponse shapeThe version bump from beta to rc is positive, but cannot merge without confirming compatibility through testing.
🤖 Prompt for AI Agents