3.1.0 modernizes Repeater without breaking it. If you only import { Repeater } from "@repeaterjs/repeater", it's a drop-in upgrade — nothing changes.
Highlights
- ~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 subpath entry points, so you import only what you need:
@repeaterjs/repeater/core— the class + buffers, no combinators (1.4 KB gzipped)@repeaterjs/repeater/combinators—race/merge/zip/lateststandalone@repeaterjs/repeater/timers—createDelay/createInterval/createTimeout@repeaterjs/repeater/limiters—createSemaphore/createThrottle
- Explicit Resource Management —
RepeaterimplementsSymbol.asyncDispose/Symbol.dispose, soawait using/usingclean it up on scope exit (a no-op on runtimes without the symbols). - The
@repeaterjs/timersand@repeaterjs/limitersutilities are now folded into the package; the standalone packages are deprecated.
Non-breaking
The 3.1 export surface is a strict superset of 3.0.6 — nothing removed, verified against the published package. Dependents pinned to ^3.0.x (graphql-yoga, graphql-mesh, hive, …) auto-upgrade cleanly.
Full migration notes are in the CHANGELOG.