Releases: meursyphus/comwit
v1.3.0
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 lastuseModelobserver instead of fromlastFetchedAt. Cache entries are never evicted while a model has active subscribers, which fixesisLoadingflicker on same-key refetches.gcTimenow defaults to 5 minutes, applied only after a model reaches zero observers. - Improved
flush/cancelhelpers for@Debounce/@Throttle.flushDebounce/cancelDebounce/flushThrottle/cancelThrottleare 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 returnedundefinedand broke.then/.catchcallers (#76).
Breaking / migration
- Removed the
cacheTimeoption (it was an alias forgcTime). UsegcTimeinstead. FieldPlugin.bindStategains an optionalmodelKeyargument and a new optionalonSubscriberChange(modelKey, bag, registryState, hasObservers)hook. External plugins implementing theFieldPlugininterface must accept (or ignore) the extra argument.
Docs
- New History and Utilities API documentation, plus a refreshed
llms.txt.
v1.0.0 — stable
First stable release of comwit.
Highlights since 0.x
Features
computed()primitive for derived state (#44)- Model lifecycle hooks:
onObserve/ cleanup (#43) - Streaming query support via AsyncIterable (#45)
- DevTools integration layer (
__COMWIT_DEVTOOLS__) (#42) toPlain()utility for proxy-to-POJO conversion (#55)- Removed
valtiodependency — inline proxy reactivity engine (#52)
Fixes
- Reset query state when arg changes without
keepPreviousData(#60) - Synchronous
subscribe()to fix IME composition (#56) - Expose
.snapshot()type on nested proxy objects (#64)
Docs
- Full docs site moved to https://library.comwit.io
computed(), lifecycle hooks, dependent queries, suspense docs (#54)- SWC decorator setup step in
llms.txt(#57, #59) - Class-level lazy decorator example (#65)
Install
npm i comwitLLM setup: pass https://library.comwit.io/llms.txt to Claude Code.
v0.2.5
Fix
- fix(proxy): synchronous notification for IME composition support (#48, #49)
- Replaced microtask-based (
Promise.resolve().then()) listener notification with synchronous notification - Fixes Korean/Japanese/Chinese IME composition breaking in controlled inputs
- Fixes cursor jumping to end of input on every keystroke
- React 18's automatic batching handles grouping multiple synchronous updates, so no performance regression
- Matches the approach used by Zustand (synchronous by default) and Valtio (
{ sync: true }option)
- Replaced microtask-based (
Migration
No breaking changes. This is a drop-in upgrade — controlled inputs with CJK IME will now work correctly without needing onCompositionStart/onCompositionEnd workarounds.
v0.2.1
Bug Fix
query().query() no longer throws on second call (#35)
Calling .query() on a resource field threw TypeError: Cannot assign to read only property '0' on subsequent calls. The proxy engine now shallow-clones frozen snapshot objects before wrapping, preventing in-place mutation of cached state.
Fix: #36
Upgrade
yarn add comwit@0.2.1Drop-in replacement. No API changes.
v0.2.0
What's New in v0.2.0
Features
-
Suspense Support —
query()andquery.infinite()에suspense: true옵션 추가. React<Suspense>와 자연스럽게 통합되며, 별도 hook 없이 기존useModel()/create()로 동작. TypeScript에서data가NonNullable<T>로 자동 추론됨 (#32) -
Real-time Subscriptions —
query.realtime()디스크립터 추가. WebSocket, SSE 등 실시간 데이터 소스를query()패턴으로 통합.connectionStatus,isConnected상태 제공,subscribe콜백으로update(),set(),onStatus(),onError()지원 (#30) -
Persist Plugin —
persist()필드 디스크립터 추가.localStorage,sessionStorage기본 어댑터 제공, 커스텀PersistAdapter인터페이스 지원. 크로스탭 동기화, 디바운스 write-back, SSR 안전, 커스텀 직렬화/역직렬화 (#31) -
Decorators —
@Retry,@Queue,@Log,@Validate데코레이터 추가. 글로벌 인터셉터, derived state, model validation 지원
Architecture
-
Plugin System — 모놀리식 구조에서 플러그인 아키텍처로 리팩토링.
FieldPlugin인터페이스를 통해 query, persist, realtime 등 기능이 코어 수정 없이 동적으로 등록됨.registerPlugin()으로 확장 가능 (#33) -
Custom Proxy Layer — valtio 의존성 제거, 자체 프록시 기반 반응성 엔진 구현
Bug Fixes
- query
isLoading계산 순서 수정 — error-retry 시 로딩 상태 정상 표시 (#17) - stale response race condition 수정 — 빠른 query arg 변경 시 최신 응답만 반영 (#17)
set()호출 시 캐시 동기화 — staleTime 내 읽기 시 set 데이터 유지 (#17)nextFetchcursor history 개선 — 다단계 뒤로가기 네비게이션 지원 (#17)- infinite query
withCursor제거,hasMore가드 추가 (#15)
Docs
llm.txt모듈형 레퍼런스 분리 — query, decorator 상세 레퍼런스 추가 (#34)
Full Changelog: v0.0.2...v0.2.0
v0.0.2 — Initial Release
comwit v0.0.2
React state management for vibe coding. Pass llm.txt to Claude Code.
Highlights
model()/action()/create()— core state management APIquery()/query.infinite()— built-in data fetching with cachingsilent()— SSR hydration without re-renders- Decorators:
@OnError,@OnSuccess,@Debounce,@Throttle,@Authorized createInterceptor— reusable decorator factoriesMuchaProvider— React context with default query options- Full
llm.txtsupport — just pass the URL to Claude Code
Links
- npm: https://www.npmjs.com/package/comwit
- Docs: https://comwit.io
- llm.txt: https://comwit.io/llm.txt