Back to Explore

humanwhocodes/retry

GitHub
1 watchersOpen source

Last release: 5/7/2025

A JavaScript utility for retrying failed async calls, based on a predicate that checks the error returned. Useful for re-running operations after transient failures, with options to control timeout, concurrency, and support canceling retries with an AbortSignal.

Project status

  • The repository appears actively maintained, with multiple tagged updates in 2024-2025 and an upstream push as recently as 2026-04-22.
  • Update cadence looks periodic rather than rapid, with the provided updates landing roughly every 3 to 6 months (v0.4.1 in 2024-11, v0.4.2 in 2025-02, v0.4.3 in 2025-05).

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • retry-v0.4.3

    5/7/2025

    Release 0.4.3 primarily improves the TypeScript type definitions for Retrier.retry. The only code change in src/retrier.js is a more precise JSDoc generic typing for the function argument and the returned Promise type, with the rest of the diff consisting of repository metadata and release bookkeeping.

  • retry-v0.4.2

    2/19/2025

    retry v0.4.2 (2025-02-19) primarily fixes an issue where temporary promises could reject and trigger unhandledRejection behavior. The code change is centered in Retrier.retry, with supporting test coverage and additional CI/workflow adjustments.

  • retry-v0.4.1

    11/5/2024

    v0.4.1 primarily updates the library's debug logging behavior. The release notes describe gating debug output behind a specific DEBUG value, and the code implements that change with additional logging semantics.

  • retry-v0.4.0

    10/31/2024

    v0.4.0 introduces concurrency support to the Retrier so multiple retried function calls can be in flight at the same time. The core implementation in src/retrier.js was reworked around new internal queues and task counters, and the test suite was expanded to validate concurrent behavior. Release notes only mention concurrency at a high level, but the code includes additional observable API and runtime changes.

    Features
  • retry-v0.3.1

    10/4/2024

    Release v0.3.1 focuses on bug fixes, specifically addressing long retries behavior and correcting the repository URL metadata in package.json. The code diff shows changes to the retry scheduler in src/retrier.js that alter how tasks are re-queued and when the queue processing loop continues.

  • retry-v0.3.0

    5/9/2024

    v0.3.0 adds retry cancellation support via AbortSignal. It also includes fixes related to shipping correct TypeScript types for npm and JSR.

    Features
  • retry-v0.2.4

    5/3/2024

    v0.2.4 focuses on improving how retry handles asynchronous return values. Specifically, it now supports retrying when the retried function returns a non-Promise thenable (an object with a then method).

  • retry-v0.2.3

    4/12/2024

    retry v0.2.3 includes a metadata-oriented change to how the package exports are ordered, intended to satisfy tooling expectations. The diff also updates packaging configuration for JSR and bumps the TypeScript devDependency.

  • retry-v0.2.2

    3/14/2024

    Release v0.2.2 contains a CI-only fix to ensure the dist output is built before publishing to JSR. The rest of the diff is version and changelog bookkeeping to reflect 0.2.2.

  • retry-v0.2.1

    3/13/2024

    Release v0.2.1 primarily updates CI configuration to enable publishing by adding an OpenID Connect (OIDC) token permission. No runtime/library code changes are evident in the provided diff, aside from version and changelog metadata updates.