Skip to content

fix(next): rename UserSeverFunctionOptions typo to UseServerFunctionOptions - #2420

Merged
dinwwwh merged 2 commits into
mainfrom
claude/charming-archimedes-blnq87
Nov 4, 2026
Merged

dinwwwh merged 2 commits into
mainfrom
claude/charming-archimedes-blnq87

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

The options type for useServerFunction (also extended by useOptimisticServerFunction's options) was misspelled as UserSeverFunctionOptions. Renamed to UseServerFunctionOptions in packages/next/src/hooks.

No deprecated alias: the misspelled name only exists in v2 betas (v1 used UseServerActionOptions).

Checks: root tsc, eslint packages/next/src/hooks, vitest run packages/next (31 tests) pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VVaw7PA8Ff7L1iws43MSJ4

…onOptions`

The options type for `useServerFunction` was misspelled. The old name is
kept as a deprecated type alias exported from `@orpc/next/hooks`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVaw7PA8Ff7L1iws43MSJ4
@pkg-pr-new

pkg-pr-new Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
More templates

@orpc/ai-sdk

npm i https://pkg.pr.new/@orpc/ai-sdk@2420

@orpc/arktype

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

@orpc/bun

npm i https://pkg.pr.new/@orpc/bun@2420

@orpc/client

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

@orpc/cloudflare

npm i https://pkg.pr.new/@orpc/cloudflare@2420

@orpc/contract

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

@orpc/effect

npm i https://pkg.pr.new/@orpc/effect@2420

@orpc/evlog

npm i https://pkg.pr.new/@orpc/evlog@2420

@orpc/hibernation

npm i https://pkg.pr.new/@orpc/hibernation@2420

@orpc/json-schema

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

@orpc/experimental-lock

npm i https://pkg.pr.new/@orpc/experimental-lock@2420

@orpc/mcp

npm i https://pkg.pr.new/@orpc/mcp@2420

@orpc/msw

npm i https://pkg.pr.new/@orpc/msw@2420

@orpc/nest

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

@orpc/next

npm i https://pkg.pr.new/@orpc/next@2420

@orpc/node

npm i https://pkg.pr.new/@orpc/node@2420

@orpc/openapi

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

@orpc/opentelemetry

npm i https://pkg.pr.new/@orpc/opentelemetry@2420

@orpc/pinia-colada

npm i https://pkg.pr.new/@orpc/pinia-colada@2420

@orpc/pino

npm i https://pkg.pr.new/@orpc/pino@2420

@orpc/publisher

npm i https://pkg.pr.new/@orpc/publisher@2420

@orpc/ratelimit

npm i https://pkg.pr.new/@orpc/ratelimit@2420

@orpc/server

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

@orpc/shared

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

@orpc/swr

npm i https://pkg.pr.new/@orpc/swr@2420

@orpc/tanstack-query

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

@orpc/trpc

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

@orpc/valibot

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

@orpc/zod

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

commit: f6ff3de

The misspelled name never shipped in v1, so no alias is needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVaw7PA8Ff7L1iws43MSJ4

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed changes
This PR fixes a typo in the type name UserSeverFunctionOptions to UseServerFunctionOptions across the packages/next/src/hooks module. A @deprecated type alias is exported to maintain backward compatibility for beta users.

  • Rename type: Updated the interface name and all internal references to use the correct spelling.
  • Backward compatibility: Added a @deprecated alias UserSeverFunctionOptions in index.ts so existing consumers don't break.
  • Verification: Ran pnpm vitest run packages/next, all 31 tests passed.

No issues found. Ready to merge.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed changes
This follow-up commit removes the deprecated UserSeverFunctionOptions alias from packages/next/src/hooks/index.ts, leaving the PR as a clean, direct rename to UseServerFunctionOptions.

  • Dropped deprecated alias: The misspelled name only existed in v2 betas (v1 used UseServerActionOptions), so the author chose not to carry a deprecated export forward.
  • Final scope: 2 files changed (server-function.ts and optimistic-server-function.ts), no alias in index.ts.
  • Verification: Re-ran pnpm vitest run packages/next; all 31 tests pass with the alias removed.

The breaking change is intentional and justified in the PR body. Ready to merge.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@dinwwwh
dinwwwh merged commit 52a3ca1 into main Nov 4, 2026
9 checks passed
@codspeed

codspeed Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 5 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 28 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing claude/charming-archimedes-blnq87 (f6ff3de) with main (5937407)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@codecov

codecov Bot commented Nov 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

2 participants