Skip to content

Conversation

@JPeer264
Copy link
Member

@JPeer264 JPeer264 commented Jan 8, 2026

closes #18437
closes JS-1272

This adds a new type BaseWinterTCOptions. I created two commits, the first one moving only what was already shared and the latter adding new options which would work for both, Node and Bun runtimes for sure.

For now we don't have a nice testing strategy for Bun yet, and I didn't want to copy paste all Node integration/e2e tests just for this, I'm still up for suggestions.

@JPeer264 JPeer264 self-assigned this Jan 8, 2026
@linear
Copy link

linear bot commented Jan 8, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,217 - 9,240 -0%
GET With Sentry 1,841 20% 1,697 +8%
GET With Sentry (error only) 6,300 68% 5,973 +5%
POST Baseline 1,223 - 1,176 +4%
POST With Sentry 621 51% 581 +7%
POST With Sentry (error only) 1,049 86% 1,051 -0%
MYSQL Baseline 3,426 - 3,239 +6%
MYSQL With Sentry 551 16% 442 +25%
MYSQL With Sentry (error only) 2,774 81% 2,645 +5%

View base workflow run

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for adding! Had a naming suggestion and I have another question: What about Cloudflare and Vercel edge? Both are based on the ServerRuntimeClient so I'm wondering if we can use these options as well. Also, both are WinterTC compliant 😅

Not saying the other runtimes have to happen in this PR. I'm more interested in the general approach we're taking here.

*
* @see https://wintercg.org/
*/
export interface BaseWinterTCOptions {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apologies for the naming bike shedding in advance 😅 Feel free to disregard/overrule me but should we call this something more user-friendly? Something like ServerRuntimeOptions?

This would match the ServerRuntimeClientOptions we already have for the respective client.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I would 2nd this. WinterTC hasn't been around for long and might change name again!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes total sense. I like it more than WinterTCOptions

@JPeer264
Copy link
Member Author

JPeer264 commented Jan 8, 2026

What about Cloudflare and Vercel edge?

You are absolutely right, theoretically also Deno right?

Not saying the other runtimes have to happen in this PR. I'm more interested in the general approach we're taking here.

Once this PR lands I'll do a follow up right with the other runtimes/SDKs.

@JPeer264 JPeer264 force-pushed the jp/align-types branch 2 times, most recently from fb8136c to 569cc6f Compare January 9, 2026 07:40
@JPeer264 JPeer264 changed the title feat(core): Consolidate bun and node types with BaseWinterTCOptions feat(node-core): Consolidate bun and node types with BaseWinterTCOptions Jan 12, 2026
@JPeer264
Copy link
Member Author

@Lms24 as a quick update. The types had to be moved from core to node-core due to OTel, as there is no OTel dependency in core for good reasons.

@JPeer264 JPeer264 requested a review from Lms24 January 12, 2026 13:36
*
* @see https://wintercg.org/
*/
export interface ServerRuntimeOptions {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, let's ensure that ServerRuntimeOptions only includes the options that can be used across all SDKs using or extending from ServerRuntimeClient.

For the remaining options shared by Node and Bun, we can do whatever makes the most sense. Happy to leave this up to you.

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend BunOptions and NodeOptions from new, common WinterTCOptions base type

4 participants