Skip to content

Releases: hntrl/eventkit

v0.3.1

22 Apr 18:53
3efcc69

Choose a tag to compare

What's Changed

This release gives some TLC to the bundling process for each package:

  • All bundle outputs (for both cjs and esm) contain sourcemaps now
  • All packages now produce a browser-friendly output that can be delivered using a CDN:
<!-- Development -->
<script src="https://unpkg.com/@eventkit/base/dist/index.global.js"></script>
<!-- Minified -->
<script src="https://unpkg.com/@eventkit/base/dist/index.global.min.js"></script>
// adding either of those scripts will add the `eventkit` global var
const { Stream, map, filter } = eventkit;
const stream = new Stream()

Patch Changes

Fixed some issues where types would be missing and hard to debug when installing packages from pnpm.

Changes by Package

v0.3.0

14 Apr 23:18
617b2b6

Choose a tag to compare

What's Changed

Introduces 10 new operators into eventkit: find, findIndex, first, isEmpty, last, max, min, pairwise, skip, and every. See the docs for a complete reference.

Patch Changes

Fixed some invariant behavior with the reduce operator where the chain of accumulator calls depending on the seed value wasn't consistent with the native array method

Changes by Package

v0.2.0

14 Apr 03:22
3c957b1

Choose a tag to compare

What's Changed

Singleton Observables

This version introduces singleton observables, which is basically just a fancy way to describe an observable that only emits one value in its execution.

The observables that a lot of operators return fit the bill in this respect (reduce(), count(), etc.). These operators now return singleton observables, which are observables in every way (meaning you can still use methods like pipe(), subscribe(), cancel()), but are distinct because they are custom thennables. What this means is that you can await a singleton observable to subscribe to the observable and wait for the one and only value to be emitted without having to add extra boilerplate:

import { AsyncObservable, first } from "@eventkit/base";

const obs = AsyncObservable.from([1, 2, 3]);
const singleton = obs.pipe(first());

// instead of this:
let firstValue: number | undefined;
await obs.subscribe((value) => {
  firstValue = value;
});
console.log(firstValue); // 1

// you can just do this:
console.log(await singleton); // 1

More on this in the docs

Patch Changes

  • @eventkit/async-observable - Fixes an issue where subscribers wouldn't be tracked by the observable when using constructor syntax

Changes by Package

v0.1.1

14 Apr 03:13
e130e0d

Choose a tag to compare

Patch Changes

  • @eventkit/async-observable - Fixed an issue where an error would be thrown if multiple eventkit packages were used in the same file
  • @eventkit/base - Fixed an issue where some operators can become permanently blocked in some runtimes
  • @eventkit/base - Fixed some invariant behavior where the merge operator would wait for the scheduler promise instead of completion
  • @eventkit/http - Make the init arg in EventSourceResponse optional
  • @eventkit/http - Fixed an issue where the bundled version of @eventkit/http used its own imports of eventkit primitives

Changes by Package

v0.1.0

14 Apr 03:07

Choose a tag to compare

v0.1.0 is the first official release of eventkit 🎉! Refer to the docs to get started.