---
title: "p-retry 9.0.0 Breaking Changes on npm | Since.dev"
description: "What each p-retry release removed, renamed or changed: 27 breaking changes in 3 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/p-retry
last_updated: 2026-12-04
---

# p-retry breaking changes

p-retry 9.0.0 (November 2, 2026) is its newest release with breaking changes, 17 of them. The first: Behavior changed randomize. Every breaking API change we have recorded in p-retry on npm: 27 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `9.0.0`, released November 2, 2026. [Source repository](https://github.com/sindresorhus/p-retry)

Its 7.0.0 release requires [Node.js 20](https://since.dev/calendar/nodejs/20.md) or later. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [8.0.0](#v-8-0-0) to [9.0.0](#v-9-0-0): 17 breaking changes in 1 version.
- From [7.0.0](#v-7-0-0) to [9.0.0](#v-9-0-0): 20 breaking changes in 2 versions.

## p-retry 9.0.0 breaking changes

p-retry 9.0.0, released November 2, 2026: 17 breaking changes.

- **Behavior changed** `randomize`  

The randomize option now throws a TypeError when it is not a boolean. Pass true or false only. [github.com](https://github.com/sindresorhus/p-retry/releases/tag/v9.0.0)
- **Behavior changed** `shouldConsumeRetry`  

A shouldConsumeRetry callback that returns nothing now counts as true, so failures consume the retries budget. Callbacks that omit a return value will behave differently. [github.com](https://github.com/sindresorhus/p-retry/releases/tag/v9.0.0)
- **Behavior changed** `signal`  

Once the signal is aborted, the promise rejects with the abort reason and no more callbacks run. Code that relied on callbacks still running after an abort, or on the operation's error being the rejection value, must change. [github.com](https://github.com/sindresorhus/p-retry/releases/tag/v9.0.0)
- **Behavior changed** `unref`  

The unref option now throws a TypeError when it is not a boolean. Pass true or false only. [github.com](https://github.com/sindresorhus/p-retry/releases/tag/v9.0.0)
- **Signature changed** `AbortError.constructor`  

Was constructor(message: string | Error); now constructor(message?: string | Error). [npmjs.com](https://www.npmjs.com/package/p-retry/v/9.0.0)
- **Signature changed** `makeRetriable`  

Was function makeRetriable\<Arguments extends readonly unknown\[\], Result>(function\_: (...arguments\_: Arguments) => PromiseLike\<Result> | Result, options?: Options): (...arguments\_: Arguments) => Promise\<Result>; now function... [npmjs.com](https://www.npmjs.com/package/p-retry/v/9.0.0)
- **Signature changed** `Options`  

Was type Options = {readonly onFailedAttempt?: (context: RetryContext) => void | Promise\<void>; readonly shouldRetry?: (context: RetryContext) => boolean | Promise\<boolean>; readonly shouldConsumeRetry?: (context: RetryContext) => boolean... [npmjs.com](https://www.npmjs.com/package/p-retry/v/9.0.0)
- **Signature changed** `Options.factor`  

Was readonly factor?: number; now readonly factor?: number | undefined. [npmjs.com](https://www.npmjs.com/package/p-retry/v/9.0.0)
- **Signature changed** `Options.maxRetryTime`  

Was readonly maxRetryTime?: number; now readonly maxRetryTime?: number | undefined. [npmjs.com](https://www.npmjs.com/package/p-retry/v/9.0.0)
- **Signature changed** `Options.maxTimeout`  

Was readonly maxTimeout?: number; now readonly maxTimeout?: number | undefined. [npmjs.com](https://www.npmjs.com/package/p-retry/v/9.0.0)
- **Signature changed** `Options.minTimeout`  

Was readonly minTimeout?: number; now readonly minTimeout?: number | undefined. [npmjs.com](https://www.npmjs.com/package/p-retry/v/9.0.0)
- **Signature changed** `Options.onFailedAttempt`  

Was readonly onFailedAttempt?: (context: RetryContext) => void | Promise\<void>; now readonly onFailedAttempt?: ((context: RetryContext) => void | Promise\<void>) | undefined. [npmjs.com](https://www.npmjs.com/package/p-retry/v/9.0.0)
- **Signature changed** `Options.randomize`  

Was readonly randomize?: boolean; now readonly randomize?: boolean | undefined. [npmjs.com](https://www.npmjs.com/package/p-retry/v/9.0.0)
- **Signature changed** `Options.retries`  

Was readonly retries?: number; now readonly retries?: number | undefined. [npmjs.com](https://www.npmjs.com/package/p-retry/v/9.0.0)
- **Signature changed** `Options.shouldConsumeRetry`  

Was readonly shouldConsumeRetry?: (context: RetryContext) => boolean | Promise\<boolean>; now readonly shouldConsumeRetry?: ((context: RetryContext) => boolean | void | Promise\<boolean | void>) | undefined. [npmjs.com](https://www.npmjs.com/package/p-retry/v/9.0.0)
- **Signature changed** `Options.shouldRetry`  

Was readonly shouldRetry?: (context: RetryContext) => boolean | Promise\<boolean>; now readonly shouldRetry?: ((context: RetryContext) => boolean | Promise\<boolean>) | undefined. [npmjs.com](https://www.npmjs.com/package/p-retry/v/9.0.0)
- **Signature changed** `Options.unref`  

Was readonly unref?: boolean; now readonly unref?: boolean | undefined. [npmjs.com](https://www.npmjs.com/package/p-retry/v/9.0.0)

## p-retry 8.0.0 breaking changes

p-retry 8.0.0, released March 26, 2026: 3 breaking changes.

- **Behavior changed**  

The package now requires Node.js 22. Retry callbacks run in the order shouldConsumeRetry, then onFailedAttempt, then shouldRetry; code relying on the old order must be updated. [github.com](https://github.com/sindresorhus/p-retry/releases/tag/v8.0.0)
- **Behavior changed** `onFailedAttempt`  

Callback order is now shouldConsumeRetry, then onFailedAttempt, then shouldRetry. Code that depends on the previous order must be adjusted. [github.com](https://github.com/sindresorhus/p-retry/releases/tag/v8.0.0)
- **Signature changed** `RetryContext`  

Was type RetryContext = {readonly error: Error; readonly attemptNumber: number; readonly retriesLeft: number; readonly retriesConsumed: number;}; now type RetryContext = {readonly error: Error; readonly attemptNumber: number; readonly... [npmjs.com](https://www.npmjs.com/package/p-retry/v/8.0.0)

## p-retry 7.0.0 breaking changes

p-retry 7.0.0, released August 21, 2025: 7 breaking changes.

- **Removed** `FailedAttemptError`  

FailedAttemptError was removed in p-retry 7.0.0 [npmjs.com](https://www.npmjs.com/package/p-retry/v/7.0.0)
- **Removed** `forever`  

The forever option is removed. Use {retries: Infinity} for infinite retries instead. [github.com](https://github.com/sindresorhus/p-retry/releases/tag/v7.0.0)
- **Configuration changed**  

The package now requires Node.js 20. Users on older Node.js versions must upgrade before installing this release. [github.com](https://github.com/sindresorhus/p-retry/releases/tag/v7.0.0)
- **Signature changed** `default`  

Was function pRetry\<T>(input: (attemptCount: number) => PromiseLike\<T> | T, options?: Options): Promise\<T>; now function pRetry\<T>(input: (attemptNumber: number) => PromiseLike\<T> | T, options?: Options): Promise\<T>. [npmjs.com](https://www.npmjs.com/package/p-retry/v/7.0.0)
- **Signature changed** `onFailedAttempt`  

The callback receives a context object. Access the error as object.error instead of using the object itself as the error; attemptNumber and retriesLeft are unchanged. [github.com](https://github.com/sindresorhus/p-retry/releases/tag/v7.0.0)
- **Signature changed** `Options`  

Was type Options = {readonly onFailedAttempt?: (error: FailedAttemptError) => void | Promise\<void>; readonly shouldRetry?: (error: FailedAttemptError) => boolean | Promise\<boolean>; readonly signal?: AbortSignal;} & OperationOptions; now... [npmjs.com](https://www.npmjs.com/package/p-retry/v/7.0.0)
- **Signature changed** `shouldRetry`  

The callback receives a context object. Access the error as object.error instead of using the object itself as the error; attemptNumber and retriesLeft are unchanged. [github.com](https://github.com/sindresorhus/p-retry/releases/tag/v7.0.0)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
