Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cockatiel

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cockatiel - npm Package Versions

13

2.0.2

Diff

Changelog

Source

2.0.2

  • feat: improve event performance
  • fix: export IDisposable
connor.peet
published 2.0.1 •

Changelog

Source

2.0.1

  • fix: remove incorrect deprecated marker on RetryPolicy.onGiveUp
  • fix: incorrect typings in retry().backoff() (#34)
connor.peet
published 2.0.0 •

Changelog

Source

2.0.0 - 2020-09-24

  • breaking: reactor: introduce a separate BackoffFactory interface for the first backoff

    This only requires changes if you use retry policies in your own code, outside of the Policy.retry().

    See #30. For some backoff policies, such as delegate and exponential policies, the first backoff was always 0, before next() was called. This is undesirable, and fixing it involved separating the backoff factory from the backoff itself.

    The backoff classes, such as DelegateBackoff and ExponentialBackoff, now only have a next() method. The duration, which is now a property instead of a method, is only available after the first next() call.

    For example, previously if you did this:

    let backoff = new ExponentialBackoff();
    while (!succeeded) {
      if (!tryAgain()) {
        await delay(backoff.duration());
        backoff = backoff.next();
      }
    }
    

    You now need to call next() before you access duration:

    let backoff = new ExponentialBackoff();
    while (!succeeded) {
      if (!tryAgain()) {
        backoff = backoff.next();
        await delay(backoff.duration);
      }
    }
    

    Note: if you use typescript, you will need another variable for it to understand you. Here's an example of how we use it inside the RetryPolicy.

connor.peet
published 1.1.1 •

Changelog

Source

1.1.1 - 2020-07-17

  • fix: events on the timeout policy being emitted incorrectly, or not emitted (see #27)
connor.peet
published 1.1.0 •

Changelog

Source

1.1.0 - 2020-07-08

  • feat: add an optional CancellationToken to IPolicy.execute. Add cancellation awareness to all policies; see their specific documentation for more information. (see #25)
  • docs: fix outdated docs on Policy.circuitBreaker and unnecessary dashes in jsdoc comments (see #22, #23, #24)
connor.peet
published 1.0.1 •

Changelog

Source

1.0.1 - 2020-06-22

  • fix: cockatiel not working in certain browser builds
connor.peet
published 1.0.0 •

Changelog

Source

1.0.0 - 2020-06-16

  • breaking: Node versions <10 are no longer supported.
  • breaking: FallbackPolicy.onFallback is replaced with FallbackPolicy.onFailure. When a failure happens, a fallback will occur.
  • feat: add isBrokenCircuitError, isBulkheadRejectedError, isIsolatedCircuitError, isTaskCancelledError methods to the errors and matching predicate functions.
  • feat: all policies now include onFailure and onSuccess callbacks for monitoring purposes (see #20)
  • fix: add onHalfOpen event to the circuit breaker (see #18)
  • fix: retry.exponential() requiring an argument when it should have been optional (see #18)
connor.peet
published 0.1.5 •

Changelog

Source

0.1.5 - 2020-03-01

  • feat: add .dangerouslyUnref methods for timeouts and retries (#11, thanks to @novemberborn)
connor.peet
published 0.1.4 •

Changelog

Source

0.1.4 - 2020-02-24

  • fix: Timeout.Aggressive triggering timeouts immediately (#16, thanks to @ekillops)
  • fix: correctly compile to ES2018 (#10, thanks to @novemberborn)
connor.peet
published 0.1.3 •

Changelog

Source

0.1.3 - 2020-01-26

  • feat: add new Policy.use() decorator
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc