Changelog
All notable changes to Syncraft Labs across core libraries and framework adapters (@syncraft-labs/core, @syncraft-labs/react, @syncraft-labs/vue).
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.7.1] - 2026-10-15
Section titled “[0.7.1] - 2026-10-15”Focus: Security hardening against prototype pollution, modular decomposition of React and Vue adapters (< 150 LOC per file), Astro v7 and Starlight v0.42 docs upgrade with Mermaid diagram support. Zero breaking changes.
Security
Section titled “Security”- Core: Hardened
applyPatchesand proxy object/array handlers against prototype pollution vulnerabilities by strictly validating and rejecting__proto__,constructor, andprototypekeys during state mutation.
Refactored
Section titled “Refactored”- React: Decomposed
use-sync.tsinto modular, single-responsibility modules:controller.ts,use-network.ts,use-sync-suspense.ts, and streamlineduse-sync.ts(all source files < 150 LOC). - Vue: Decomposed
use-sync.tsinto modular subcomponents:controller.ts,use-network.ts, and streamlineduse-sync.ts(all source files < 150 LOC). - Docs: Modularized
PlaygroundInner.tsxinto isolated subcomponents (TaskHeader.tsx,TaskInput.tsx,TaskItem.tsx,TaskList.tsx) with scoped CSS modules.
Documentation & Infrastructure
Section titled “Documentation & Infrastructure”- Docs: Upgraded documentation framework to Astro v7 and Starlight v0.42.
- Docs: Integrated client-side Mermaid diagram rendering via
astro-mermaidand inline SVG rendering. - Chore: Sanitized typography across documentation, build configs, and test suites (standardized to hyphens and aligned draft updater JSDoc references).
Upgrade
Section titled “Upgrade”npm install @syncraft-labs/core@0.7.1 @syncraft-labs/react@0.7.1 @syncraft-labs/vue@0.7.1[0.7.0] — 2026-10-12
Section titled “[0.7.0] — 2026-10-12”Focus: Observability lifecycle hooks, DevTools inspection hook, selector-based reactivity, atomic IndexedDB persistence, and structured logging. Zero breaking changes.
- Core: Added
onSyncStart,onSyncSuccess, andonSyncErrorlifecycle hooks toBaseControllerOptionsto track background synchronization events. (#20, #60) - Core: Added
onRollbackcallback toSyncStoreConfigandUseSyncOptionsto track local persistence failures that trigger state rollbacks. (#60) - Core: Exposed
window.__SYNCRAFT_DEVTOOLS__globally for active store inspection in developer extensions with automatic cleanup on store destroy. (#21, #60) - Core: Structured redirectable logging via
loggerinSyncStoreConfigandBaseControllerOptions, replacing hardcoded console logs. (#22) - React & Vue: Added
selectorparameter touseSyncconfiguration for fine-grained reactivity and memoization, resolving over-rendering issues on large state trees. (#59)
- Core: Refactored IndexedDB persistence layer (
persistState) to executestateandoutboxupdates within a single atomic transaction, preventing storage race conditions. (#58) - Core: Background sync polling loops now cleanly halt without infinite exponential backoff when receiving non-retryable 4xx Client Errors. (#58)
- Vue: Replaced
onUnmountedwithonScopeDisposefor safer listener cleanup, preventing memory leaks in SSR and suspense boundaries. (#59)
Upgrade
Section titled “Upgrade”npm install @syncraft-labs/core@0.7.0 @syncraft-labs/react@0.7.0 @syncraft-labs/vue@0.7.0[0.6.0] — 2026-09-15
Section titled “[0.6.0] — 2026-09-15”Focus: Pluggable conflict resolution strategies, cross-browser storage quota recovery, and long-term CRDT architectural roadmap. Zero breaking changes.
- Core: Added pluggable conflict resolution engine (
resolveConflict) supporting"lastWriteWins"(default) and"custom"three-way merge algorithms (base,local,remote). (#17) - Core: Added
applyRemoteState(remote)method onBaseStoreControllerfor applying server push, WebSocket, or polling updates with automatic local patch reconciliation. (#17) - Core: Added conflict resolution types:
ConflictStrategy,ConflictInfo<T>,ConflictResolver<T>, andConflictResolvedInfo. - Core: Added
conflictStrategy,resolver, andonConflictResolvedconfiguration options toBaseSyncStoreConfig. - React: Exposed
conflictStrategy,resolver, andonConflictResolvedoptions inUseSyncOptions<T>, and exposedapplyRemoteState(remote)action inUseSyncReturn<T>. - Vue: Exposed
conflictStrategy,resolver, andonConflictResolvedoptions inUseSyncOptions<T>, and exposedapplyRemoteState(remote)action inUseSyncReturn<T>. - Docs: Added dedicated Conflict Resolution Guide with comprehensive three-way merge, WebSocket, and real-time synchronization patterns.
- Docs: Published RFC-001: CRDT Evaluation evaluating CRDTs vs JSON Patches and specifying the post-v1.0 optional plugin architecture. (#18)
- Core: Added
onQuotaExceededconfiguration callback option toBaseSyncStoreConfigfor receiving storage quota exhaustion telemetry. (#19) - Core: Added
isQuotaExceededError()cross-browser utility andwithQuotaGuardstorage wrapper to automatically detect IndexedDB quota limits and rollback optimistic state. (#19) - Core: Added
QuotaExceededInfoandQuotaExceededHandlertype definitions. (#19) - React: Exposed
onQuotaExceededoption inUseSyncOptions<T>, and exportedisQuotaExceededErrorutility. (#19) - Vue: Exposed
onQuotaExceededoption inUseSyncOptions<T>, and exportedisQuotaExceededErrorutility. (#19) - Docs: Added dedicated Storage Quota Handling Guide covering browser disk thresholds, error handling, telemetry, and mitigation strategies. (#19)
- Core: Raw
QuotaExceededErrorDOMExceptions during IndexedDB writes or outbox pushes are now gracefully intercepted, optimistic in-memory state is automatically rolled back, and errors are normalized into typedSyncraftError(source: "store",retryable: false). (#19)
Removed
Section titled “Removed”- Core: Removed misleading
"crdt"keyword frompackages/core/package.jsonpackage metadata. (#18)
Upgrade
Section titled “Upgrade”npm install @syncraft-labs/core@0.6.0 @syncraft-labs/react@0.6.0 @syncraft-labs/vue@0.6.0[0.5.0] — 2026-09-08
Section titled “[0.5.0] — 2026-09-08”Focus: Native Map and Set support in draft state, explicit unsupported-type detection, adapter reliability overhaul, and patch-correctness proofs.
- Core: Added Map and Set support in draft state with dedicated proxy handlers. Map operations (
set,delete,clear) and Set operations (add,delete,clear) generate granular patches reusingreplace/add/removewith$entriesand$valuespath conventions (keys/values restricted tostring | number). HybridstructuredClone+ fallback preservesDate/Map/SetforapplyPatches. (#13) - Core: Added
fast-checkfor property-based testing of Map and Set patch reversibility. - Core: Added
SyncraftErrorclass extendingErrorwith structured metadata (source: "sync" | "fetch" | "hydration" | "store",retryable: boolean, andcause), plustoSyncraftError()normalization helper. Exported from@syncraft-labs/core,@syncraft-labs/react, and@syncraft-labs/vue. - React & Vue: Refactored
useSynclifecycle with singletonStoreControllerper store key. Deduplicates hydration, initial fetch, and background sync loops across multiple components sharing a storage key. (#38) - React & Vue: Added in-flight sync loop mutex and single-snapshot compaction (
compactOutbox(rawOutbox)) to prevent outbox re-read windows and overlapping reconnect push race conditions. (#39) - React & Vue: Added reactive options support and fixed cross-clearing bug where background sync success previously cleared unrelated fetch or hydration errors. (#40)
- React & Vue: Clarified and documented error contracts:
update()operates as fire-and-forget (swallowing errors intoerrorstate), whilerefetch()throws on failure for imperative error handling while settingerrorstate. (#40) - React: Fixed
useSyncSuspenseinfinite throw loop upon hydration rejection by caching errors, throwing directly to Error Boundaries, and guarding againstundefineddata. (#41) - Core: Added
validateStateShape()utility for explicit detection of unsupported types (Date, Map, Set, custom class instances, RegExp) in state trees. - Core: Added and exported
isUnsupportedType()utility for querying whether a value is unsupported for state persistence and proxy drafting. - Core: Added general property-based test suite asserting
applyPatches(base, patches)equalsnextStateand inverse-patch reversibility over 1,000 randomized iterations. (#15) - Core: Optimized array
shallowCopyto usetarget.slice()with benchmark coverage andADR-001decision record; addedMap/Setparent-copy guards inmarkChanged. (#16)
[0.4.2] — 2026-08-22
Section titled “[0.4.2] — 2026-08-22”Security
Section titled “Security”- Core: Evicted PolinRider malware artifacts from all build configurations, core assets, and package entry points.
- Project: Conducted a full build integrity audit from an isolated, verified clean environment.
- Infrastructure: Hardened account security by rotating all internal NPM publishing tokens and enforcing mandatory Two-Factor Authentication (2FA) for all subsequent package releases.
[0.4.1] — 2026-08-22 (Withdrawn)
Section titled “[0.4.1] — 2026-08-22 (Withdrawn)”[!CAUTION] This version was compromised by a supply-chain attack associated with the PolinRider malware campaign and was immediately deprecated and pulled from active distribution on npm. Do not install or depend on this version.
[0.4.0] — 2026-08-21
Section titled “[0.4.0] — 2026-08-21”Changed
Section titled “Changed”- BREAKING (Core):
OutboxEntry<T>no longer includes asnapshotfield. Outbox entries now store onlypatchesandinversePatches, reducing storage size by >80% for large state. If yourpusherfunction relied onentry.snapshot, usestore.getSnapshot()instead or reconstruct state viaapplyPatches().
- Core: Added circular reference detection during state proxy traversal, draft mutations, and store hydration in development mode.
- Core: Added deep-freeze protection for in-memory state in development mode (
NODE_ENV !== "production"). - Core: Added
overflowStrategy: "reject" | "dropOldest" | "forceFlush"configuration option tocreateSyncStore(default"reject"). - Core: Added
onOverflowcallback option tocreateSyncStoreto receive outbox overflow event details (OutboxOverflowInfo). - Core: Added
compactOutbox()method toSyncStoreand standalonecompactOutbox()utility function. - Core: Added
applyPatches<T>(base, patches)utility function for applying Immer-style JSON patches to a state object. - Core: Added
storageMode: "document" | "collection"configuration option tocreateSyncStore. - React & Vue: Exposed
overflowStrategy,onOverflow,maxOutboxSize,storageMode, andidFieldinUseSyncOptions.
[0.3.0] — 2026-08-02
Section titled “[0.3.0] — 2026-08-02”Changed
Section titled “Changed”- Core: Replaced
immerdependency with a custom, lightweight proxy-based implementation to reduce bundle size and improve enterprise integration. - Types: Changed the generic state constraint in
createSyncStoreand hooks fromT extends objecttoT extends Record<string, unknown> | any[]for stricter plain-object adherence. - Docs: Migrated documentation site from Docusaurus to Astro Starlight to resolve indexing issues with zero-JS static output.
[0.2.1] — 2026-07-20
Section titled “[0.2.1] — 2026-07-20”Changed
Section titled “Changed”- Docs: Restructured the documentation site with dedicated Core Concepts and Getting Started pages.
- Docs: Added 7 comprehensive Production Guides (SSR, Architecture, Error Handling, Sync Strategies, Cross-Tab Sync, and Testing).
- Docs: Revamped READMEs for all packages with professional layouts, badges, and SEO metadata.
[0.2.0] — 2026-07-13
Section titled “[0.2.0] — 2026-07-13”- React: Added
<SyncraftProvider>anduseStoreRegistry()hooks to enforce a Context-based Store Registry, guaranteeing isolated state across requests in SSR (Next.js, Remix). - Vue: Added
createSyncraft()plugin to provide a reactive store registry at the application level viaapp.provideandinject(compatible with Nuxt).
Changed
Section titled “Changed”- BREAKING (React):
useSyncanduseSyncSuspensenow throw an error if used outside a<SyncraftProvider>. - BREAKING (Vue):
useSyncnow throws an error if the Vue app has not installed the Syncraft plugin (app.use(createSyncraft())). - Internal: Refactored core singleton registry away from a global module-level
Mapinto context-bound registries.
[0.1.1] — 2026-07-11
Section titled “[0.1.1] — 2026-07-11”Changed
Section titled “Changed”- Refactored documentation structure and merged interactive playground into documentation site.
[0.1.0] — 2026-06-29
Section titled “[0.1.0] — 2026-06-29”- @syncraft-labs/core: Initial release featuring
createSyncStore<T>(), IndexedDB persistence withidb, proxy mutation engine, optimistic updates with rollback, outbox queue, cold-start hydration, synchronous snapshots, and subscriptions. - @syncraft-labs/react:
useSync<T>()hook withuseSyncExternalStore, background sync loop with exponential backoff,fetcher/pushercontracts, and offline tracking. - @syncraft-labs/vue:
useSync<T>()composable withshallowRef, background sync loop, and clean unmount lifecycle. - Infrastructure: Turborepo monorepo with tsup (dual ESM/CJS build), Vitest test suite, and strict TypeScript configurations.
