Skip to content
Source
Sign inSign up
TanStack/pacer

fix(pacer): Keep leading debounce calls out of pending work #276

OpenKevinVandywants to merge 1 commit intomain fromfeat-234-debounce-leading-flushopened

KevinVandycommented

🎯 Changes

  • Avoid storing a leading call as pending trailing work in Debouncer and LiteDebouncer. A single leading call stays idle and flush() cannot repeat it.
  • Preserve the cooldown, subsequent trailing calls and cancellation. Add 16 regressions covering those boundaries, zero wait, and functional wait/enabled options. Include a patch changeset for both packages.
  • The affected suites pass 103 tests. pnpm test and pnpm run test:pr pass the workspace checks and package builds.

Adapts the two argument-storage guards from #234 by @Don-Erfan, with additional boundary coverage.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).
    1. Important

      Draft PR not reviewed

      Draft PRs are not automatically reviewed by default.

      • Trigger a manual review

      To automatically review draft PRs, update your CodeRabbit configuration:

      reviews:
        auto_review:
          drafts: true
      • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Autopilot is currently an internal CodeRabbit preview.


      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.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. 🚀 Changeset Version Preview

      2 package(s) bumped directly, 4 bumped as dependents.

      🟩 Patch bumps

      PackageVersionReason
      @tanstack/pacer0.23.0 → 0.23.1Changeset
      @tanstack/pacer-lite0.3.0 → 0.3.1Changeset
      @tanstack/angular-pacer0.25.0 → 0.25.1Dependent
      @tanstack/preact-pacer0.24.0 → 0.24.1Dependent
      @tanstack/react-pacer0.24.0 → 0.24.1Dependent
      @tanstack/solid-pacer0.23.0 → 0.23.1Dependent
    3. View your CI Pipeline Execution ↗ for commit 6653262a8700ddd5dbc8a0e3979f2b8eb4ac4f90


      ☁️ Nx Cloud last updated this comment at 2026-09-30 20:06:45 UTC

    4. View your CI Pipeline Execution ↗ for commit 6653262a8700ddd5dbc8a0e3979f2b8eb4ac4f90

      CommandStatusDurationResult
      nx run-many --targets=build --exclude=examples/**✅ Succeeded<1sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-09-30 20:06:45 UTC

    5. More templates

      @tanstack/angular-pacer

      npm i https://pkg.pr.new/@tanstack/angular-pacer@276

      @tanstack/pacer

      npm i https://pkg.pr.new/@tanstack/pacer@276

      @tanstack/pacer-devtools

      npm i https://pkg.pr.new/@tanstack/pacer-devtools@276

      @tanstack/pacer-lite

      npm i https://pkg.pr.new/@tanstack/pacer-lite@276

      @tanstack/preact-pacer

      npm i https://pkg.pr.new/@tanstack/preact-pacer@276

      @tanstack/preact-pacer-devtools

      npm i https://pkg.pr.new/@tanstack/preact-pacer-devtools@276

      @tanstack/react-pacer

      npm i https://pkg.pr.new/@tanstack/react-pacer@276

      @tanstack/react-pacer-devtools

      npm i https://pkg.pr.new/@tanstack/react-pacer-devtools@276

      @tanstack/solid-pacer

      npm i https://pkg.pr.new/@tanstack/solid-pacer@276

      @tanstack/solid-pacer-devtools

      npm i https://pkg.pr.new/@tanstack/solid-pacer-devtools@276

      commit: 6653262

Sign in to join this conversation.