Skip to content

v1.3.0

Latest

Choose a tag to compare

@Moon-DaeSeung Moon-DaeSeung released this 28 May 15:15

First stable release of the 1.3.x line (supersedes 1.2.0 on the latest tag).

Highlights

  • Model history (undo/redo). Built-in undo/redo for models, with a configurable history limit (default 100) and safe handling of concurrent async transactions.
  • Observer-based gcTime (TanStack Query v5 semantics). Garbage collection now starts when a model loses its last useModel observer instead of from lastFetchedAt. Cache entries are never evicted while a model has active subscribers, which fixes isLoading flicker on same-key refetches. gcTime now defaults to 5 minutes, applied only after a model reaches zero observers.
  • Improved flush / cancel helpers for @Debounce / @Throttle. flushDebounce / cancelDebounce / flushThrottle / cancelThrottle are now keyed per instance (two instances of the same class no longer share a window) and return a deferred result, so the surrounding interceptor stack (@OnError, @Retry, …) observes the flushed call's return value or rejection.

Fixes

  • refetch() always returns a Promise, even when the query has no active entry yet — previously it returned undefined and broke .then / .catch callers (#76).

Breaking / migration

  • Removed the cacheTime option (it was an alias for gcTime). Use gcTime instead.
  • FieldPlugin.bindState gains an optional modelKey argument and a new optional onSubscriberChange(modelKey, bag, registryState, hasObservers) hook. External plugins implementing the FieldPlugin interface must accept (or ignore) the extra argument.

Docs

  • New History and Utilities API documentation, plus a refreshed llms.txt.