router icon indicating copy to clipboard operation
router copied to clipboard

H3 methods removed

Open luixo opened this issue 3 months ago • 5 comments

Which project does this relate to?

Start

Describe the bug

Hello, Since version v1.132.0 some h3-related method were removed from @tanstack/start-server-core It's been 67 of them now there are only 17.

Specifially, I noted removal of proxyRequest method I used to conditionally proxy a request to my mock server in tests (a similar case was described in a discussion).

I think this should be reverted and all h3 methods should be exposed again. At least the getH3Event should be exposed for those who want to manually use h3 methods not published via start-server-core.

Your Example Website or App

Steps to Reproduce the Bug or Issue

  1. Migrate from v1.131.x to v1.132.x

Expected behavior

Expected to have H3 methods (like, proxyRequest)

Screenshots or Videos

No response

Platform

  • Router / Start Version: v1.132.x

Additional context

No response

luixo avatar Oct 03 '25 21:10 luixo

H3 is an internal implementation detail now and not exposed. we might add some of the methods by wrapping them. which exactly do you need?

schiller-manuel avatar Oct 04 '25 05:10 schiller-manuel

One of the key pros of the Tanstack Start (and ecosystem in general) versus Next.js and others is ability to customize things.

I would like to have all the options on the table, so I guess you should wrap all the methods available in H3 (and preferrably provide the getH3Event as well for those who might implement ideas H3 didn't think of). Also, it's basically free for the framework developers.

This was one of the biggest flaws in Next.js - I had to add a dozen of patches in a big enough project to make it do what I need it to do. And this did not happen with Start yet and I hope it will stay like this.

luixo avatar Oct 05 '25 13:10 luixo

Start is not based on h3 anymore. we merely use h3 for request/response utils. H3Event is just a container for the request/response. There is no H3 "app instance" anymore, so some methods that require this cannot be used anyhow.

schiller-manuel avatar Oct 05 '25 15:10 schiller-manuel

If you plan to keep using it - why not expose all of its convenient tools? Currently res is hidden and there's not way to interact with it in a clear manner

luixo avatar Oct 11 '25 22:10 luixo

@schiller-manuel

Previously in start with vinxi it was possible to use getEvent and connect it to mcp sdk.

https://github.com/jherr/ts-mcp/blob/main/src/routes/api.sse.ts

without exposing getEvent how would you do this today?

aarjithn avatar Dec 06 '25 16:12 aarjithn