@repeaterjs/repeater
3.1.0 · 8 Jun 2026MIT15M / weekRepositoryHomepagenpmAtom feed
Upgrading @repeaterjs/repeater From 1.0.0 to 3.1.0
9 releases in betweenevery note read
Reading releases, release notes and advisories…
- 1
- change to make
- 0
- advisories fixed
- 8
- new
- 5
- fixes
Before you upgrade
Tick each one off as you go- Deprecated3.1.0
Release by release
- Deprecated
The
@repeaterjs/timersand@repeaterjs/limitersutilities are now folded into the package; the standalone packages are deprecated. - New
~half the bundle size. Native ESM output (esbuild, no more ES5 down-leveling) takes
import { Repeater }from 4.5 KB → 2.1 KB gzipped — same API. - New
@repeaterjs/repeater/core— the class + buffers, no combinators (1.4 KB gzipped) - New
@repeaterjs/repeater/combinators—race/merge/zip/lateststandalone - New
@repeaterjs/repeater/timers—createDelay/createInterval/createTimeout - New
@repeaterjs/repeater/limiters—createSemaphore/createThrottle - New
Explicit Resource Management —
RepeaterimplementsSymbol.asyncDispose/Symbol.dispose, soawait using/usingclean it up on scope exit (a no-op on runtimes without the symbols).
- Deprecated
- Fixed
Fix promise returned from
pushfunction not resolving when using a buffer.
- Fixed
- New
Add export maps to package.json files for the TypeScript
nodenext
- New
- Fixed
Fixed memory leaks in static combinator functions race, merge, zip and latest due to Promise.race.
- Fixed
- Fixed
Fixed missing file in package.json.
- Fixed
- New
Added ESM support for newer versions of node.
- Fixed
Fixed throw method not catching promises in newer versions of v8 (node.js 12+).
- New
- Fixed
Build files with target set to es5 rather than esnext
- Fixed
2.0.0 – 3.0.02 releases, nothing new or fixed in the notes
9 other lines we could not sort, mostly version bumps
- 3.0.0
Previously, the n-th call to
pushresolved to the value passed to the n-th call toRepeater.prototype.next. This was inaccurate insofar as async generators resume the n-thyieldwith the value passed to the n+1-th call tonext. Additionally, async generators completely ignore the first value passed tonextentirely. The former behavior of repeaters was confusing insofar as the first call topushwould always resolve immediately, becausepushcould not be called untilnextwas called for the first time. In 3.0, the behavior has now been changed so that the n-th call topushresolves to the n+1-th call tonext. - 3.0.0
Calling
Repeater.prototype.throwwill now cause the previouspushcall 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 callingthen/catchon the returned promise and then call thethrowmethod, the repeater will rethrow the error, preserving the previous behavior. However, if you awaitpushor otherwise call thethenorcatchmethods, it becomes your responsibility to handle errors thrown in viathrowand stop the repeater. #43 - 3.0.0
The
stoppromise no longer resolves to the value passed toRepeater.prototype.return. Instead, it consistently fulfills toundefinedwhen the repeater is stopped. Additionally, callingRepeater.prototype.returnwill return a result whose value is always whatever was passed toreturn. 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,Pushand other related types now take the type parametersTReturnandTNextin line with typescript 3.6’s strict async generator typings. - 3.0.0
The
RepeaterBufferinterface and concrete classes no longer accept a type parameter. All places where the type parameter would have been used,unknownis used instead. You should never directly add or remove values from buffers. - 3.0.0
The typings of the
nextandreturnmethods have been changed to acceptPromiseLike<T>andPromiseLike<TReturn>respectively as parameters. - 2.0.0
Renamed all instances of
ChanneltoRepeater(e.g.ChanneltoRepeater,ChannelBuffertoRepeaterBuffer). See #18 for the rationale behind this name change.
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.