Skip to content

feat: rename event iterator functions to async iterator object for clarity#1627

Merged
dinwwwh merged 9 commits into
middleapi:mainfrom
dinwwwh:feat/rename-event-iterator-functions-to-async-iterator-object-for-clarity
Jul 5, 2026
Merged

feat: rename event iterator functions to async iterator object for clarity#1627
dinwwwh merged 9 commits into
middleapi:mainfrom
dinwwwh:feat/rename-event-iterator-functions-to-async-iterator-object-for-clarity

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Jul 5, 2026

Copy link
Copy Markdown
Member

Benefit: one fewer custom definition, we can reuse existing terminology instead of introducing a new one.
Downside: It's less consistent with the withEventMeta helper (which attaches additional event metadata.)

@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
orpc Ready Ready Preview, Comment Jul 5, 2026 8:07am

@pkg-pr-new

pkg-pr-new Bot commented Jul 5, 2026

Copy link
Copy Markdown
More templates

@orpc/arktype

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

@orpc/bun

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

@orpc/client

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

@orpc/cloudflare

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

@orpc/contract

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

@orpc/experimental-effect

npm i https://pkg.pr.new/@orpc/experimental-effect@1627

@orpc/evlog

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

@orpc/interop

npm i https://pkg.pr.new/@orpc/interop@1627

@orpc/json-schema

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

@orpc/nest

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

@orpc/next

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

@orpc/openapi

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

@orpc/opentelemetry

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

@orpc/pino

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

@orpc/publisher

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

@orpc/ratelimit

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

@orpc/server

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

@orpc/shared

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

@orpc/tanstack-query

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

@orpc/valibot

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

@orpc/zod

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

commit: e0bae55

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

The rename is mechanically sound and the full test suite passes, but several previously public symbols were removed without deprecated aliases or runtime backward-compat. Please add the missing aliases before merging.

Reviewed changes — renames "event iterator" terminology and functions to "AsyncIteratorObject" across docs, tests, types, and public APIs, and bumps @standardserver/* dependencies.

  • Renames the eventIterator schema helper to asyncIteratorObject and updates docs / nav links accordingly.
  • Moves consumeEventIterator to @orpc/shared as consumeAsyncIterator and re-exports it (with a deprecated alias) from @orpc/client.
  • Renames wrapEventIteratorPreservingMeta to wrapAsyncIteratorPreservingEventMeta.
  • Renames streamToAsyncIteratorClass to streamToAsyncIteratorObject and keeps deprecated aliases.
  • Bumps @standardserver/* from 0.0.25 to 0.0.32 and pnpm to 11.10.0.

⚠️ Old doc URLs have no redirects

The VitePress pages /docs/event-iterator and /docs/client/event-iterator are renamed to /docs/async-iterator-object and /docs/client/async-iterator-object. Existing external bookmarks and any hard-coded in-repo links will 404. Consider adding VitePress redirects or a note in the PR description about the URL change.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

Comment thread packages/client/src/async-iterator-object.ts
Comment thread packages/client/src/index.ts
Comment thread packages/shared/src/iterator.ts
Comment thread packages/client/src/plugins/retry.ts
Comment thread packages/contract/src/schema-built-in.ts
Comment thread packages/contract/src/schema-built-in.ts
Comment thread packages/contract/src/schema-built-in.ts

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found in the incremental diff.

Reviewed changes — the two commits since 3cbb678e tighten consumeAsyncIterator typing and finish the terminology migration from "async iterator" to AsyncIteratorObject in test descriptions and docs.

  • Tightened consumeAsyncIterator so onError/onFinish error types combine the promise rejection type with ThrowableError, reflecting that iteration can throw any error. Added packages/shared/src/iterator.test-d.ts type tests and expanded packages/shared/src/iterator.test.ts unit tests.
  • Updated test and documentation descriptions throughout the touched files to consistently say AsyncIteratorObject instead of "async iterator" or "event iterator".

Pullfrog  | View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

@dinwwwh dinwwwh merged commit 2ebfca2 into middleapi:main Jul 5, 2026
9 checks passed
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.

1 participant