Skip to content

feat(standard-server-peer): promote to stable#766

Merged
dinwwwh merged 3 commits intomainfrom
feat/standard-server-peer/go-stable
Jul 14, 2025
Merged

feat(standard-server-peer): promote to stable#766
dinwwwh merged 3 commits intomainfrom
feat/standard-server-peer/go-stable

Conversation

@dinwwwh
Copy link
Copy Markdown
Member

@dinwwwh dinwwwh commented Jul 14, 2025

Summary by CodeRabbit

  • Refactor
    • Removed the "experimental_" prefix from class, interface, and function names across the codebase and documentation, promoting them to stable APIs.
    • Updated all relevant import statements and code examples to use the new stable names.
    • No changes to functionality, control flow, or logic were introduced.
  • Documentation
    • Updated code examples in documentation to reflect the new stable API names, ensuring consistency and clarity for end-users.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
orpc ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2025 0:19am

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 14, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jul 14, 2025

Walkthrough

This change removes the "experimental_" prefix from various class, interface, type, and function names related to RPC handlers and links across multiple packages, adapters, and documentation. All references, imports, and exports are updated to use the stable names, with no changes to logic, control flow, or implementation beyond renaming.

Changes

Files/Groups Change Summary
apps/content/docs/adapters/*.md, apps/content/docs/plugins/hibernation.md Updated documentation examples to remove experimental_ prefix from imports of RPCHandler and RPCLink.
packages/client/src/adapters/message-port/link-client.ts, .../websocket/link-client.ts Renamed interfaces and classes to remove experimental_ prefix; updated constructor parameter types.
packages/client/src/adapters/message-port/rpc-link.ts, .../websocket/rpc-link.ts Renamed interfaces and classes to stable names; updated imports and constructor signatures accordingly.
packages/client/src/adapters/message-port/rpc-link.test.ts, .../websocket/rpc-link.test.ts Updated test imports to use stable RPCLink name.
packages/durable-event-iterator/src/client/plugin.ts, .../durable-object/object.ts Updated imports to use stable RPCLinkOptions, RPCLink, and RPCHandler names.
packages/server/src/adapters/standard-peer/utils.ts Renamed exported type and function to stable names (HandleStandardServerPeerMessageOptions, handle...).
packages/server/src/adapters/standard-peer/utils.test.ts Updated test import to use stable handleStandardServerPeerMessage name.
packages/server/src/adapters/message-port/handler.ts, .../ws/handler.ts, .../websocket/handler.ts, ... Renamed handler classes and related types/functions to remove experimental_ prefix throughout adapters.
packages/server/src/adapters/message-port/rpc-handler.ts, .../ws/rpc-handler.ts, .../websocket/rpc-handler.ts Renamed exported handler classes to stable RPCHandler name; updated imports accordingly.
packages/server/src/adapters/bun-ws/handler.ts, .../rpc-handler.ts Renamed handler class and related types/functions to stable names.
packages/server/src/adapters/crossws/handler.ts Updated imports to stable names for peer message handling utilities.
packages/server/tests/message-port.test.ts Updated imports to use stable RPCLink and RPCHandler names.
playgrounds/browser-extension/entrypoints/background/index.ts, .../popup/lib/orpc.ts Updated imports to use stable RPCHandler and RPCLink names.
playgrounds/electron/src/main/index.ts, .../renderer/src/lib/orpc.ts Updated imports to use stable RPCHandler and RPCLink names.
packages/arktype/README.md Reformatted import statement for readability; no logic changes.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant RPCLink
    participant Server
    participant RPCHandler

    Client->>RPCLink: Send RPC request
    RPCLink->>Server: Transmit message (via port/ws)
    Server->>RPCHandler: Forward request
    RPCHandler-->>Server: Process and respond
    Server-->>RPCLink: Return response
    RPCLink-->>Client: Deliver result
Loading

Possibly related PRs

  • unnoq/orpc#528: The main PR updates documentation and code examples to remove the "experimental_" prefix from RPCHandler and RPCLink imports and related classes, reflecting their stabilization, while the retrieved PR originally introduced the Message Port Adapter with these experimental classes and interfaces; thus, the main PR changes are directly related to the retrieved PR as they evolve the same code entities from experimental to stable naming.

Suggested labels

size:S

Poem

The "experimental_" tags have hopped away,
Now stable names are here to stay.
RPCLinks and Handlers, neat and trim,
No prefixes to make things grim!
🐇✨
With every hop, our code feels bright—
Stable APIs, oh what delight!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 61cd5de and 315f6e6.

📒 Files selected for processing (1)
  • packages/arktype/README.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/arktype/README.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @unnoq, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request marks a significant step in the project's maturity by promoting several key RPC handling and linking components from an experimental state to stable. The changes primarily involve removing the experimental_ prefix from various classes, interfaces, and functions, and updating all references in the codebase, including documentation and examples. This ensures a more stable and predictable API for developers.

Highlights

  • API Stability: The experimental_ prefix has been removed from core RPCHandler and RPCLink classes, interfaces, and related utilities across @orpc/client and @orpc/server adapters (message-port, websocket, bun-ws, ws), signifying their promotion to stable APIs.
  • Codebase Modernization: Updated imports and class/interface names throughout the client and server adapter implementations to reflect the newly stable API, improving readability and consistency.
  • Documentation & Examples: All relevant documentation files and playground examples have been updated to use the stable API names, ensuring users have up-to-date guidance.
  • Partial Promotion for CrossWS: While the standard-server-peer utilities used by the crossws adapter have been promoted, the experimental_CrosswsHandler class itself retains its experimental_ prefix, indicating that the crossws adapter might still be under active development or considered experimental.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jul 14, 2025

More templates

@orpc/arktype

npm i https://pkg.pr.new/@orpc/arktype@766

@orpc/client

npm i https://pkg.pr.new/@orpc/client@766

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@766

@orpc/experimental-durable-event-iterator

npm i https://pkg.pr.new/@orpc/experimental-durable-event-iterator@766

@orpc/hey-api

npm i https://pkg.pr.new/@orpc/hey-api@766

@orpc/json-schema

npm i https://pkg.pr.new/@orpc/json-schema@766

@orpc/nest

npm i https://pkg.pr.new/@orpc/nest@766

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@766

@orpc/openapi-client

npm i https://pkg.pr.new/@orpc/openapi-client@766

@orpc/react

npm i https://pkg.pr.new/@orpc/react@766

@orpc/react-query

npm i https://pkg.pr.new/@orpc/react-query@766

@orpc/server

npm i https://pkg.pr.new/@orpc/server@766

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@766

@orpc/solid-query

npm i https://pkg.pr.new/@orpc/solid-query@766

@orpc/standard-server

npm i https://pkg.pr.new/@orpc/standard-server@766

@orpc/standard-server-aws-lambda

npm i https://pkg.pr.new/@orpc/standard-server-aws-lambda@766

@orpc/standard-server-fetch

npm i https://pkg.pr.new/@orpc/standard-server-fetch@766

@orpc/standard-server-node

npm i https://pkg.pr.new/@orpc/standard-server-node@766

@orpc/standard-server-peer

npm i https://pkg.pr.new/@orpc/standard-server-peer@766

@orpc/svelte-query

npm i https://pkg.pr.new/@orpc/svelte-query@766

@orpc/tanstack-query

npm i https://pkg.pr.new/@orpc/tanstack-query@766

@orpc/trpc

npm i https://pkg.pr.new/@orpc/trpc@766

@orpc/valibot

npm i https://pkg.pr.new/@orpc/valibot@766

@orpc/vue-colada

npm i https://pkg.pr.new/@orpc/vue-colada@766

@orpc/vue-query

npm i https://pkg.pr.new/@orpc/vue-query@766

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@766

commit: 315f6e6

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request promotes the standard-server-peer and related adapters to stable by removing the experimental_ prefix. A correction is suggested for a documentation error in the @orpc/arktype README.

Comment thread packages/arktype/README.md Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🔭 Outside diff range comments (3)
packages/client/src/adapters/message-port/rpc-link.test.ts (2)

30-33: Await the async expectation to ensure the test actually fails when the promise rejects

Without awaiting or returning the promise produced by expect(...).resolves, Jest/Vitest may finish the test before the assertion settles, leading to false-positives.

-    expect(orpc.ping('input')).resolves.toEqual('pong')
+    const promise = expect(orpc.ping('input')).resolves.toEqual('pong')
...
+    await promise

Repeat the same pattern wherever you use resolves/rejects below.


70-73: rejects assertion is not awaited

-    expect(orpc.ping('input')).rejects.toThrow(/aborted/)
+    await expect(orpc.ping('input')).rejects.toThrow(/aborted/)
packages/client/src/adapters/websocket/rpc-link.test.ts (1)

70-73: Await the rejects expectation

-    expect(orpc.ping('input')).rejects.toThrow(/aborted/)
+    await expect(orpc.ping('input')).rejects.toThrow(/aborted/)
♻️ Duplicate comments (1)
packages/client/src/adapters/message-port/rpc-link.test.ts (1)

50-54: Same missing-await issue in “on success with blob”

Apply the same fix here:

-    expect(orpc.ping(new Blob(['input']))).resolves.toEqual('pong')
+    const promise = expect(orpc.ping(new Blob(['input']))).resolves.toEqual('pong')
...
+    await promise
🧹 Nitpick comments (15)
packages/client/src/adapters/message-port/rpc-link.test.ts (1)

12-19: Consider cleaning up message ports in afterEach

Failing to close both ports can leak event listeners between tests:

afterEach(() => {
  clientPort.close()
  serverPort.close()
})
playgrounds/electron/src/renderer/src/lib/orpc.ts (1)

1-1: Suspicious relative path

'../../../main/router' is three levels up; verify this is intended for both build and runtime environments. Consider using a TS path alias for cross-package imports to avoid fragile deep relatives.

packages/durable-event-iterator/src/durable-object/object.ts (1)

7-9: Left-over experimental_ prefix may confuse users.

experimental_HibernationPlugin still carries the prefix while adjacent code has been promoted to stable.
If the plugin itself is also considered stable now, rename it (and its import path) for consistency; otherwise add a comment clarifying why it remains experimental.

packages/durable-event-iterator/src/client/plugin.ts (1)

4-11: Generic constraint could be widened

RPCLinkOptions<object> narrows the link to payloads assignable to object. If users pass primitives (e.g. string payloads) this breaks. Consider:

-import type { RPCLinkOptions } from '@orpc/client/websocket'
-...
-private readonly linkOptions: Omit<RPCLinkOptions<object>, 'websocket'>
+import type { RPCLinkOptions } from '@orpc/client/websocket'
+...
+private readonly linkOptions: Omit<RPCLinkOptions<unknown>, 'websocket'>

Using unknown maintains type-safety while staying payload-agnostic.

Also applies to: 20-21, 42-43

apps/content/docs/adapters/websocket.md (1)

22-24: Docs update is correct; check remaining examples for consistency

Great to see the stable RPCHandler being referenced here. Note, however, that the CrossWS example further down (line 43) still imports experimental_RPCHandler. Updating that snippet as well will keep the docs consistent with the new API surface.

packages/server/src/adapters/websocket/rpc-handler.ts (1)

5-6: Fine rename; consider temporary alias for smoother migration

The switch to the stable WebsocketHandler import compiles cleanly. If you expect downstream consumers to still reference experimental_WebsocketHandler, you may want to leave a deprecated re-export in handler.ts for one minor version to avoid a hard break.

packages/server/src/adapters/ws/rpc-handler.ts (1)

5-6: Import rename accepted

Matches underlying handler implementation. Same deprecation-alias thought applies.

packages/server/src/adapters/bun-ws/rpc-handler.ts (1)

5-6: Import name aligned; watch for consumer breakage

As with the other adapters, consider a deprecated alias to reduce churn.

packages/server/src/adapters/bun-ws/handler.ts (1)

50-57: Auto-clean up peer on native close event

Bun.WebSocket emits its own "close"/"end" events. Currently BunWsHandler relies on the caller to invoke close(ws); if that is forgotten, the WeakMap entry survives until GC gets the ws itself. Hooking the websocket’s native close event guarantees tidy shutdown and avoids dangling ServerPeers:

@@ constructor(
   private readonly standardHandler: StandardHandler<T>,
 ) {
+  // Ensure peers are cleaned up even if the integrator forgets to call `close()`
+  // (Bun’s WebSocket inherits from EventTarget)
+  (ws: ServerWebSocket) => {
+    ws.addEventListener?.('close', () => this.close(ws), { once: true })
+  }
 }
packages/client/src/adapters/message-port/link-client.ts (1)

20-27: Detach listeners to prevent MessagePort leaks

onMessagePortMessage / onMessagePortClose appear to register permanent listeners.
When this client is disposed the port may live on, keeping ClientPeer in memory.
Store the unsubscribe handles and expose a close()/dispose() method:

   constructor(options: LinkMessagePortClientOptions) {
@@
-    onMessagePortMessage(options.port, async (message) => {
-      await this.peer.message(message)
-    })
-
-    onMessagePortClose(options.port, () => {
-      this.peer.close()
-    })
+    const offMsg = onMessagePortMessage(options.port, (m) => this.peer.message(m))
+    const offClose = onMessagePortClose(options.port, () => this.peer.close())
+
+    // provide a way for callers to clean up proactively
+    this.dispose = () => {
+      offMsg()
+      offClose()
+      this.peer.close()
+    }
   }
+
+  /** Call when the client should be torn down. */
+  dispose(): void { /* overwritten in ctor */ }
packages/client/src/adapters/websocket/link-client.ts (1)

31-41: Handle WebSocket error / close consistently

close is handled, but an 'error' followed by abrupt socket termination would leave ClientPeer open. Consider mirroring the close cleanup for 'error':

 options.websocket.addEventListener('close', () => {
   this.peer.close()
+})
+
+options.websocket.addEventListener('error', () => {
+  this.peer.close()
 })
packages/server/src/adapters/ws/handler.ts (1)

26-33: Browser Blob conversion can allocate large buffers

Converting an array of fragments to a single Blob (new Blob(event.data)) copies the payload.
For large messages this doubles memory. If the target runtimes include Node’s ws, you can avoid the copy by concatenating Buffers or forwarding each fragment in order.
Not urgent, but worth profiling.

packages/server/src/adapters/websocket/handler.ts (3)

9-13: Consider including the close() method in MinimalWebsocket

upgrade() subscribes to the 'close' event but close() isn’t required on the type.
If external callers ever need to invoke ws.close() directly, adding it now avoids future widening casts.


45-48: Broaden accepted binary payload types for Node compatibility

ws implementations in Node emit Buffer objects (an ArrayBufferView).
Extending the union prevents an unnecessary as cast for consumers.

-    data: string | ArrayBuffer | Blob,
+    data: string | ArrayBuffer | ArrayBufferView | Blob,

72-78: Delete peer entry after closing to speed up GC

Although WeakMap holds keys weakly, removing the entry proactively avoids dangling listeners and eases reasoning.

   if (peer) {
     peer.close()
+    this.#peers.delete(ws)
   }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9cd4eb7 and 61cd5de.

📒 Files selected for processing (35)
  • apps/content/docs/adapters/browser.md (6 hunks)
  • apps/content/docs/adapters/electron.md (1 hunks)
  • apps/content/docs/adapters/message-port.md (2 hunks)
  • apps/content/docs/adapters/websocket.md (5 hunks)
  • apps/content/docs/adapters/worker-threads.md (2 hunks)
  • apps/content/docs/plugins/hibernation.md (2 hunks)
  • packages/arktype/README.md (1 hunks)
  • packages/client/src/adapters/message-port/link-client.ts (1 hunks)
  • packages/client/src/adapters/message-port/rpc-link.test.ts (1 hunks)
  • packages/client/src/adapters/message-port/rpc-link.ts (1 hunks)
  • packages/client/src/adapters/websocket/link-client.ts (1 hunks)
  • packages/client/src/adapters/websocket/rpc-link.test.ts (1 hunks)
  • packages/client/src/adapters/websocket/rpc-link.ts (2 hunks)
  • packages/durable-event-iterator/src/client/plugin.ts (1 hunks)
  • packages/durable-event-iterator/src/durable-object/object.ts (1 hunks)
  • packages/server/src/adapters/bun-ws/handler.ts (1 hunks)
  • packages/server/src/adapters/bun-ws/rpc-handler.test.ts (1 hunks)
  • packages/server/src/adapters/bun-ws/rpc-handler.ts (1 hunks)
  • packages/server/src/adapters/crossws/handler.ts (1 hunks)
  • packages/server/src/adapters/message-port/handler.ts (1 hunks)
  • packages/server/src/adapters/message-port/rpc-handler.test.ts (1 hunks)
  • packages/server/src/adapters/message-port/rpc-handler.ts (1 hunks)
  • packages/server/src/adapters/standard-peer/utils.test.ts (1 hunks)
  • packages/server/src/adapters/standard-peer/utils.ts (1 hunks)
  • packages/server/src/adapters/websocket/handler.ts (4 hunks)
  • packages/server/src/adapters/websocket/rpc-handler.test.ts (1 hunks)
  • packages/server/src/adapters/websocket/rpc-handler.ts (1 hunks)
  • packages/server/src/adapters/ws/handler.ts (1 hunks)
  • packages/server/src/adapters/ws/rpc-handler.test.ts (1 hunks)
  • packages/server/src/adapters/ws/rpc-handler.ts (1 hunks)
  • packages/server/tests/message-port.test.ts (1 hunks)
  • playgrounds/browser-extension/entrypoints/background/index.ts (1 hunks)
  • playgrounds/browser-extension/entrypoints/popup/lib/orpc.ts (1 hunks)
  • playgrounds/electron/src/main/index.ts (1 hunks)
  • playgrounds/electron/src/renderer/src/lib/orpc.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (9)
packages/server/src/adapters/message-port/handler.ts (1)
packages/server/src/context.ts (1)
  • Context (1-1)
packages/server/src/adapters/ws/rpc-handler.ts (2)
packages/server/src/context.ts (1)
  • Context (1-1)
packages/server/src/adapters/ws/handler.ts (1)
  • WsHandler (14-43)
packages/server/src/adapters/bun-ws/rpc-handler.ts (2)
packages/server/src/context.ts (1)
  • Context (1-1)
packages/server/src/adapters/bun-ws/handler.ts (1)
  • BunWsHandler (17-58)
packages/client/src/adapters/message-port/link-client.ts (3)
packages/client/src/adapters/message-port/message-port.ts (1)
  • SupportedMessagePort (22-22)
packages/client/src/adapters/standard/types.ts (1)
  • StandardLinkClient (9-11)
packages/standard-server-peer/src/client.ts (1)
  • ClientPeer (19-157)
packages/client/src/adapters/websocket/link-client.ts (2)
packages/client/src/adapters/standard/types.ts (1)
  • StandardLinkClient (9-11)
packages/standard-server-peer/src/client.ts (1)
  • ClientPeer (19-157)
packages/server/src/adapters/websocket/rpc-handler.ts (2)
packages/server/src/context.ts (1)
  • Context (1-1)
packages/server/src/adapters/websocket/handler.ts (1)
  • WebsocketHandler (11-79)
packages/client/src/adapters/websocket/rpc-link.ts (2)
packages/client/src/adapters/message-port/rpc-link.ts (2)
  • RPCLinkOptions (7-8)
  • RPCLink (16-21)
packages/client/src/adapters/standard/rpc-link.ts (1)
  • StandardRPCLink (14-22)
packages/server/src/adapters/websocket/handler.ts (2)
packages/server/src/context.ts (1)
  • Context (1-1)
packages/standard-server-peer/src/server.ts (1)
  • ServerPeer (19-135)
packages/server/src/adapters/ws/handler.ts (1)
packages/server/src/context.ts (1)
  • Context (1-1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: lint
  • GitHub Check: publish-commit
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (33)
packages/client/src/adapters/message-port/rpc-link.test.ts (1)

4-4: Import rename looks correct – matches the newly-stabilised class name.

packages/client/src/adapters/websocket/rpc-link.test.ts (1)

3-3: Import rename acknowledged – no issues spotted.

playgrounds/browser-extension/entrypoints/popup/lib/orpc.ts (1)

4-4: Import update looks good.

packages/server/src/adapters/message-port/rpc-handler.test.ts (1)

3-3: Import rename OK – aligns with the stable API.

playgrounds/electron/src/renderer/src/lib/orpc.ts (1)

4-4: Import update looks correct.

packages/server/src/adapters/bun-ws/rpc-handler.test.ts (1)

3-3: Rename lingering experimental_RPCHandler references

The experimental_RPCHandler identifier is still present in tests, docs, and the handler implementation. Update these to use RPCHandler directly to avoid build breakages:

packages/server/src/adapters/crossws/rpc-handler.test.ts

- import { experimental_RPCHandler as RPCHandler } from './rpc-handler'
+ import { RPCHandler } from './rpc-handler'

apps/content/docs/adapters/websocket.md

- import { experimental_RPCHandler as RPCHandler } from '@orpc/server/crossws'
+ import { RPCHandler } from '@orpc/server/crossws'

packages/server/src/adapters/crossws/rpc-handler.ts

- export class experimental_RPCHandler<T extends Context> extends CrosswsHandler<T> {
+ export class RPCHandler<T extends Context> extends CrosswsHandler<T> {

Likely an incorrect or invalid review comment.

packages/server/src/adapters/ws/rpc-handler.test.ts (1)

3-3: Import rename acknowledged – LGTM.

No functional impact; test continues to compile against the stabilised RPCHandler.

packages/server/src/adapters/websocket/rpc-handler.test.ts (1)

3-3: Stable name adoption confirmed.

Good to see the WebSocket adapter tests moved over as well.

playgrounds/electron/src/main/index.ts (1)

4-5: Electron entry-point updated – looks correct.

The import path now matches the stable package export. No additional action required.

packages/server/src/adapters/standard-peer/utils.test.ts (1)

3-4: Import rename looks good; double-check re-export path

The test now imports handleStandardServerPeerMessage directly. Make sure packages/server/src/adapters/standard-peer/utils.ts actually re-exports the stable symbol under that exact name (no alias left hanging around) so TS consumers don’t fall back to an any.

packages/server/tests/message-port.test.ts (1)

3-7: Renamed symbols compile but watch for transitive re-exports

RPCLink and RPCHandler are referenced from their new stable locations. Verify that every barrel file inside @orpc/client/message-port and @orpc/server/message-port forwards the same identifiers to avoid breaking downstream paths/exports maps.

apps/content/docs/adapters/worker-threads.md (1)

16-17: Docs update LGTM

Examples reflect the stable API. No further action.

Also applies to: 35-36

apps/content/docs/adapters/message-port.md (1)

27-29: Docs import rename confirmed

The snippet now matches the public API; nothing else needed.

Also applies to: 39-41

packages/server/src/adapters/crossws/handler.ts (1)

5-5: LGTM! Clean stabilization of API imports.

The removal of the experimental_ prefix from both the type and function imports aligns perfectly with the PR objective to promote standard-server-peer to stable. The changes are consistent and maintain the same functionality.

Also applies to: 8-8

playgrounds/browser-extension/entrypoints/background/index.ts (1)

1-1: LGTM! API stabilization complete.

The removal of the experimental_ prefix from RPCHandler import correctly reflects the promotion to stable API. The usage remains identical, ensuring seamless transition.

apps/content/docs/plugins/hibernation.md (1)

71-71: LGTM! Documentation updated for stable API.

The documentation examples have been correctly updated to reflect the stable API by removing the experimental_ prefix from both RPCHandler and RPCLink imports. This ensures users are guided to use the stable APIs.

Also applies to: 149-149

apps/content/docs/adapters/electron.md (1)

15-15: LGTM! Documentation reflects stable API.

The documentation example has been correctly updated to use the stable RPCHandler import, removing the experimental_ prefix. This guides users to the stable API for Electron integration.

apps/content/docs/adapters/browser.md (1)

21-21: LGTM! Comprehensive documentation update for stable API.

All browser adapter examples have been consistently updated to use the stable API by removing the experimental_ prefix from both RPCHandler and RPCLink imports. This provides users with accurate guidance for using the stable APIs across different browser integration scenarios.

Also applies to: 33-33, 55-55, 73-73, 125-125, 137-137

apps/content/docs/adapters/websocket.md (4)

74-78: LGTM – import now matches the codebase


88-92: LGTM@orpc/server/bun-ws import is in sync with implementation.


114-118: LGTM – Consistent update for the hibernation example.


156-160: LGTM – Client-side example now points to the stable RPCLink.

packages/server/src/adapters/websocket/rpc-handler.ts (1)

13-16: LGTM – no behavioral change

packages/server/src/adapters/ws/rpc-handler.ts (1)

13-16: LGTM – Pure rename, logic untouched.

packages/server/src/adapters/bun-ws/rpc-handler.ts (1)

13-16: LGTM – No functional modifications detected.

packages/server/src/adapters/message-port/handler.ts (3)

6-7: Typename update looks correct

The type alias matches the updated export in standard-peer; no type errors expected.


12-13: Import rename OK

handleStandardServerPeerMessage is used consistently below.


15-16: LGTM – Class rename only; implementation unchanged.

packages/server/src/adapters/message-port/rpc-handler.ts (1)

5-15: Stable rename looks good

Import path and class rename are consistent with the promotion-to-stable objective. No functional change introduced – compilation should remain green.

packages/server/src/adapters/standard-peer/utils.ts (2)

6-8: Renaming looks good

Type alias renamed cleanly; downstream consumers remain unaffected.


9-14: Function promotion LGTM

Signature & internal usage updated consistently; no behavioural change introduced.

packages/client/src/adapters/websocket/rpc-link.ts (1)

16-21: No issues – rename propagated correctly

Constructor wiring & option shaping remain intact; good job on the clean promotion.

packages/client/src/adapters/message-port/rpc-link.ts (1)

16-20: Looks solid

Message-port link mirrors the WebSocket variant faithfully; no functional concerns.

Comment thread packages/arktype/README.md Outdated
Comment thread playgrounds/browser-extension/entrypoints/popup/lib/orpc.ts
@dinwwwh dinwwwh merged commit 4f419f3 into main Jul 14, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant