Skip to content

Release notes

Eugene Lazutkin edited this page Jul 19, 2026 · 11 revisions

The current version: 2.x

2.4.1 (2026-07-18)

A focused follow-up to 2.4.0, all internal to the meta-utils module — the data-structure API is unchanged:

  • Descriptor factories fixedfromGetter(), fromSetter(), and fromAccessors() crashed with a ReferenceError when called without an explicit base descriptor: the parameter shadowed the defaultDescriptor constant, so the default initializer read its own binding inside the temporal dead zone. They now default to defaultDescriptor as intended, match meta-toolkit's canonical parameter shape, and are covered by tests.
  • Iterator helpers modernized (synced with meta-toolkit) — mapIterator() and filterIterator() accept bare iterators as well as iterables and return a lazy, single-use iterable iterator that forwards return() to the source, so an early exit (e.g. break in for...of) closes the source iterator. They delegate to native Iterator.prototype.map()/filter() when available. Behavior change: previously they returned a re-iterable wrapper — to iterate a mapped/filtered result more than once, materialize it with Array.from() first.

2.4.0 (2026-07-18)

The largest release since 2.0 — ten new data structures, all zero-dependency .js + .d.ts pairs:

  • SkipList — probabilistic ordered container: expected O(log n) search/insert/remove, floor/ceil, bounded range iteration, popFront for priority-queue duty; injectable random for deterministic tests.
  • IndexedHeap — binary min-heap with intrusive element indices: O(1) has/findIndex, O(log n) update/remove by element (decrease-key with no scans).
  • PairingHeap — the merge heap with O(1) meld and decrease-key by node handle.
  • Deque — double-ended queue adapter with Array-parity aliases and Python-style rotate(n).
  • RingBuffer — array-backed deque on a circular buffer: ~5× faster than Array/list-deque on steady-state churn, O(1) at(index), bounded keep-last-N mode.
  • UnrolledList — chunked value list for bulk pipelines: ~2.6× faster than ValueList on fill+iterate+drain.
  • TimerWheel — hashed timing wheel: O(1) schedule/cancel/reschedule, logical tick-driven time.
  • FreeList — intrusive object pool for recycling list nodes (honestly documented: a GC-pressure tool, not a throughput tool).
  • CacheSLRU and CacheClock — scan-resistant segmented LRU and CLOCK (second chance) policies joining the cache family, which also gained peek, evict, and setCapacity across all policies.

Existing structures got substantial upgrades: CacheLFU was rewritten to the exact O(1) frequency-bucket algorithm (fixing an inverted-eviction bug); SplayTree gained subtree-size augmentation — order statistics at/indexOf, has/floor/ceil, bounded range iteration, and an amortized O(log n) splitMaxTree (was O(n)) — plus a documented splay contract; lists gained stable sorting (natural merge sort, O(n) on nearly-sorted input, 5.6–35× faster than the old sort) with insertSorted/mergeSorted ordered operations; the node-based heaps went iterative (no call-stack overflow on deep spines; the skew merge is ~1.4× faster, making SkewHeap the fastest node-based heap on the raw cycle); heaps expose size, adapters accept list instances or classes and gained from() builders; caches accept options objects.

New documentation: the Choosing a data structure guide, the API conventions page (naming rules and their documented exceptions), the Backgrounder, and wiki search. Tests grew to 345 files / 6,786 assertions across Node, Bun, and Deno. Updated dev dependencies.

Earlier 2.x releases

  • 2.3.2 Updated dev dependencies.
  • 2.3.1 Bugfixes. Improved TS typing tests. Updated docs. Updated dev dependencies.
  • 2.3.0 Added TypeScript declarations for all modules. Added JSDoc. Removed CJS build. Bugfixes. Added missing methods.
  • 2.2.6 Updated dev dependencies.
  • 2.2.5 Updated dev dependencies.
  • 2.2.4 Updated dev dependencies.
  • 2.2.3 Updated dev dependencies.
  • 2.2.2 Updated dev dependencies.
  • 2.2.1 Technical release: updated deps, added more tests.
  • 2.2.0 Added leftist and skew heaps.
  • 2.1.1 Allowed functions to be used as nodes. Updated deps.
  • 2.1.0 Added splay tree. Updated deps.
  • 2.0.0 New major release.

The previous releases

  • 1.0.1 Fixed exports. Added more methods to MinHeap.
  • 1.0.0 Initial release.

Clone this wiki locally