fix: rename executeCount to executionCount in AsyncBatcherState and AsyncQueuerState - #254
fix: rename executeCount to executionCount in AsyncBatcherState and AsyncQueuerState#254manudeli wants to merge 1 commit into
executeCount to executionCount in AsyncBatcherState and AsyncQueuerState#254Conversation
…nd AsyncQueuerState Unifies counter naming with all other utilities (BatcherState, QueuerState, DebouncerState, ThrottlerState, RateLimiterState, AsyncRetryerState), which all use `executionCount`. Pure rename, no behavior change. Fixes TanStack#253 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (17)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughRenames async batcher and queuer execution counters and ChangesAsync execution counter naming
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This PR consistently renames the async state field and related documentation without changing execution behavior; no actionable merge-blocking risk remains. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Fixes #253
What
Renames
executeCount→executionCountinAsyncBatcherStateandAsyncQueuerState, the only two state interfaces that diverged from theexecutionCountname used everywhere else (BatcherState,QueuerState,DebouncerState,ThrottlerState,RateLimiterState,AsyncRetryerState).Pure rename — no behavior change. The counter still increments at execution start and still serves as the key for the internal
asyncRetryersmap andgetAbortSignal().Changes
packages/pacer/src/async-batcher.ts,async-queuer.ts: state field,getAbortSignal(executionCount?)parameter, internal locals, and TSDoc. Also fixed the circular AsyncBatcher field comment ("executions that have been executed" → "executions that have been started", matching the actual increment timing).pnpm generate-docs(only AsyncBatcher/AsyncQueuer pages changed).@tanstack/pacer, with the rename called out as breaking in the changelog entry.maybeExecuteCountfields are untouched — they're named after themaybeExecutemethod, which is a different convention.Verification
pnpm test(vitest): 555/555 pass in@tanstack/pacer;nx affected --targets=test:lib,test:typesgreen across all 10 packages.grep -rn executeCountacross packages/docs/examples returns no remaining references (excludingmaybeExecuteCount).Notes for review
state.executeCount(selectors,initialState, devtools-adjacent code). Since Pacer is pre-1.0 I've marked it minor per 0.x semver — happy to adjust if you'd rather stage a deprecation alias instead.Follow-up idea (not in this PR): guard against future naming drift with a type test
This divergence went unnoticed because nothing ties the sync and async state interfaces together — they're deliberately independent declarations (which keeps the interfaces flat and doc-generation friendly, so I'm not proposing
extends). A lightweight alternative that keeps that structure intact: a type-level test asserting that the fields shared between counterpart interfaces keep the same names, e.g.If maintainers think it's worthwhile, I'd be happy to add such tests for all sync/async counterpart pairs in a follow-up PR.
🤖 Generated with Claude Code
Summary by CodeRabbit
Breaking Changes
executeCounttoexecutionCount.getAbortSignalparameter toexecutionCount.Documentation