feat: rename event iterator functions to async iterator object for clarity#1627
Conversation
…ect" across documentation and codebase
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
More templates
@orpc/arktype
@orpc/bun
@orpc/client
@orpc/cloudflare
@orpc/contract
@orpc/experimental-effect
@orpc/evlog
@orpc/interop
@orpc/json-schema
@orpc/nest
@orpc/next
@orpc/openapi
@orpc/opentelemetry
@orpc/pino
@orpc/publisher
@orpc/ratelimit
@orpc/server
@orpc/shared
@orpc/tanstack-query
@orpc/valibot
@orpc/zod
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
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
eventIteratorschema helper toasyncIteratorObjectand updates docs / nav links accordingly. - Moves
consumeEventIteratorto@orpc/sharedasconsumeAsyncIteratorand re-exports it (with a deprecated alias) from@orpc/client. - Renames
wrapEventIteratorPreservingMetatowrapAsyncIteratorPreservingEventMeta. - Renames
streamToAsyncIteratorClasstostreamToAsyncIteratorObjectand keeps deprecated aliases. - Bumps
@standardserver/*from0.0.25to0.0.32andpnpmto11.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.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
…bject" in tests and documentation for clarity
There was a problem hiding this comment.
✅ 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
consumeAsyncIteratorsoonError/onFinisherror types combine the promise rejection type withThrowableError, reflecting that iteration can throw any error. Addedpackages/shared/src/iterator.test-d.tstype tests and expandedpackages/shared/src/iterator.test.tsunit tests. - Updated test and documentation descriptions throughout the touched files to consistently say
AsyncIteratorObjectinstead of "async iterator" or "event iterator".
Kimi K2 (free via Pullfrog for OSS) | 𝕏

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