Packages

@repeaterjs/repeater

3.1.0 · 8 Jun 2026MIT15M / weekRepositoryHomepagenpmAtom feed

Upgrading @repeaterjs/repeater From 2.0.0 to 3.0.0

1 release in betweenevery note read

Reading releases, release notes and advisories…

Other targets from 2.0.0Latest3.1.0
The note of 3.0.0 lists no breaking change or deprecation, which is rare for a major.
  1. 2.0.0yours
  2. 3.0.0target
?
changes to make
0
advisories fixed
0
new
0
fixes
8 other lines we could not sort, mostly version bumps
  • Previously, the n-th call to push resolved to the value passed to the n-th call to Repeater.prototype.next. This was inaccurate insofar as async generators resume the n-th yield with the value passed to the n+1-th call to next. Additionally, async generators completely ignore the first value passed to next entirely. The former behavior of repeaters was confusing insofar as the first call to push would always resolve immediately, because push could not be called until next was called for the first time. In 3.0, the behavior has now been changed so that the n-th call to push resolves to the n+1-th call to next.

    3.0.0
  • Calling Repeater.prototype.throw will now cause the previous push call to reject, rather than simply stopping the repeater and throwing the error. This means errors thrown into repeaters are now recoverable. If you call push without awaiting or calling then/catch on the returned promise and then call the throw method, the repeater will rethrow the error, preserving the previous behavior. However, if you await push or otherwise call the then or catch methods, it becomes your responsibility to handle errors thrown in via throw and stop the repeater. #43

    3.0.0
  • The stop promise no longer resolves to the value passed to Repeater.prototype.return. Instead, it consistently fulfills to undefined when the repeater is stopped. Additionally, calling Repeater.prototype.return will return a result whose value is always whatever was passed to return. In the case of premature returns, the return value of the executor is ignored unless it throws an error. #41

    3.0.0
  • Errors thrown by the executor now take priority over rejections passed to push. If a pushed promise rejects, the repeater will await the execution result and throw an error thrown by the executor instead of the rejected promise.

    3.0.0
  • Changes to combinator methods

    3.0.0
  • Repeater, RepeaterExecutor, Push and other related types now take the type parameters TReturn and TNext in line with typescript 3.6’s strict async generator typings.

    3.0.0
  • The RepeaterBuffer interface and concrete classes no longer accept a type parameter. All places where the type parameter would have been used, unknown is used instead. You should never directly add or remove values from buffers.

    3.0.0
  • The typings of the next and return methods have been changed to accept PromiseLike<T> and PromiseLike<TReturn> respectively as parameters.

    3.0.0

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.