unstale

npm / p-cancelable

p-cancelable

What changed in p-cancelable 2 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-05.

6 breaking1 behavior and defaults5 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.11 on npm

p-cancelable 56 changes

Breaking changes 1

Behavior and default changes 1

  • Cancellation is allowed while an adopted promise is pending.

    5.0.0release notes

Fixes and other changes 4

  • Errors are preserved during resolution and cancellation.

    5.0.0release notes

  • Types no longer claim that static Promise methods exist on PCancelable.

    5.0.0release notes

  • All cancel handlers run even if one throws.

    5.0.0release notes

  • The state is settled when the executor throws.

    5.0.0release notes

p-cancelable 42 changes

Breaking changes 1

  • Node.js 14 is now required to use p-cancelable.

    4.0.0release notes

Fixes and other changes 1

  • The error message is improved when attaching onCancel after the promise has settled.

    4.0.0release notes

p-cancelable 31 changes

Breaking changes 1

  • The package is now pure ESM, so developers must use it as an ES module.

    3.0.0release notes

p-cancelable 23 changes

Breaking changes 3

  • Node.js 8 is now required.

    2.0.0release notes

  • Calling onCancel after the promise settles now throws an error.

    2.0.0release notes

  • The TypeScript definition now uses a CommonJS-compatible export; TypeScript users need to switch to the require-style import.

    2.0.0release notes