Last 12 weeks ยท 9 commits
4 of 6 standards met
The star history chart in the README is broken. It relied on an upstream service that is no longer functional because of GitHub stargazer API restrictions, so the chart fails to render for everyone visiting the repository. This switches the chart to a working mirror that needs no API token, restoring the chart with no further maintenance. The link was also migrated to the newer hash-based URL format. Summary by CodeRabbit Documentation** Updated the Star History chart link and image source to the new hosting domain.
Wire AbortSignal event listener and early aborted check in to reject in-flight operations when signal is aborted. Closes #7431 Summary by CodeRabbit Bug Fixes** Improved WebSocket request cancellation with consistent abort errors. Requests cancelled before starting now fail immediately. Active subscriptions now stop cleanly when cancelled, preventing further server messages.
What and rely entirely on the caller-supplied to cancel their in-flight fetch. Their observable cleanup is a , so when a subscriber unsubscribes and the caller's isn't wired to that specific subscription's teardown, the underlying outlives the subscriber โ the same dangling-request/wasted-bandwidth consequence fixed for in #7389 (via #7390). Every other link in the package (, , and after #7390) owns its own and aborts it in cleanup; these two are the remaining holdouts. Fix Mirror #7390's exact pattern in both links: : create an , race its signal with via , and in cleanup unless the request already settled. : same, with the raced signal fed into the batch loader so the batch fetch's sees it. Both track an flag so a completed/errored request is not spuriously aborted. Test Two regression tests in (, ) follow the existing test: they mock , assert the signal is not aborted before unsubscribe, then assert it is aborted (with an reason) after . TDD: both tests fail on (cleanup is , so the fetch signal never aborts) and pass after the fix. Fixes #7468 Summary by CodeRabbit Bug Fixes Canceling an in-progress HTTP request now properly aborts the underlying network operation. Applies to both individual and batched requests. Completed or failed requests are no longer interrupted during cleanup. Tests Added coverage to verify request cancellation behavior and expected abort errors.
Closes #7439 ๐ฏ Changes Bug fix for / . was plumbed into and teardown already called , but there was no matching . Aborting the caller's controller therefore never cancelled in-flight WS queries/mutations/subscriptions. This PR: if is already aborted โ call immediately otherwise โ keep existing removeEventListener + subscription.stop cleanup โ Checklist [x] I have followed the steps listed in the Contributing guide. [ ] If necessary, I have added documentation related to the changes made. [ ] I have added or updated the tests related to the changes made. (Happy to add a focused unit/integration test for signal abort if maintainers want a preferred harness location.) Summary by CodeRabbit Bug Fixes** WebSocket requests now properly stop when their associated cancellation signal is triggered. Requests are canceled immediately when the signal has already been aborted.
Repository: trpc/trpc. Description: ๐งโโ๏ธ Move Fast and Break Nothing. End-to-end typesafe APIs made easy. Stars: 40516, Forks: 1652. Primary language: TypeScript. Languages: TypeScript (84.1%), MDX (14.2%), JavaScript (1%), CSS (0.7%). License: MIT. Homepage: https://tRPC.io Topics: api, next, nextjs, prisma, react, typescript. Latest release: v11.18.0 (1mo ago). Open PRs: 100, open issues: 169. Last activity: 4d ago. Community health: 87%. Top contributors: KATT, dependabot[bot], renovate[bot], juliusmarminge, allcontributors[bot], Nick-Lucas, ixahmedxi, sachinraja, kamilogorek, github-actions[bot] and others.