fasq 0.3.5
fasq: ^0.3.5 copied to clipboard
FASQ (Flutter Async State Query) delivers caching-first async data management for Flutter with smart refetching, error recovery, and unified APIs.
0.3.5 #
- FEAT: harden persistence across cache layers (#36).
- DOCS: sync readme versions (#35).
0.3.4 #
- FEAT: allow typed meta messages (#34).
- FEAT: refine global query effects (#33).
- FEAT: add context-aware query observers (#32).
- FEAT: allow injecting manual query client (#31).
- FEAT: update SEO and metadata handling.
0.3.3 #
- FIX: align docs, entrypoints, and tests around typed QueryKey usage (#30).
- FIX: add Flutter example apps for fasq, bloc, hooks, and riverpod packages (#30).
0.3.2 #
- FEAT: add type-safe query keys support (#28).
0.3.1+1 #
- FIX: resolve cache type safety issue by reconstructing CacheEntry instead of casting (#27).
- FIX: enhance infinite query options and state management (#25).
0.3.1 #
- REFACTOR(performance): simplify isolate pool initialization (#24).
- FIX: improve cache staleness handling and query state management (#22).
- FIX: comprehensive fixes for reference counting and loading state (#21).
- FIX: prevent negative reference count in Query and InfiniteQuery (#18).
- FEAT: clear cache when query is disposed to ensure fresh data on revisit (#20).
0.3.0 #
Note: This release has breaking changes.
- FIX: resolve all analysis issues and prepare packages for publishing (#16).
- FIX: resolve critical issues and improve code quality (#15).
- FIX: security (#9).
- FEAT: implement comprehensive performance optimization system (#13).
- FEAT: integrate SecurityPlugin with QueryCache (#12).
- FEAT: complete updateEncryptionKey implementation with real persistence (#10).
- FEAT: prefetching (#8).
- FEAT: implement parallel queries across all adapters (#6).
- FEAT: offline mutation queue (#5).
- FEAT: dependent queries (#4).
- FEAT: infinite queries (#3).
- DOCS: Clean up README by removing phase references and PRD mentions (#14).
- BREAKING FEAT: Extract security features to separate fasq_security package (#11).
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.2.0 - 2025-01-14 #
Added - Security Package Extraction #
Security Plugin Architecture:
- Abstract security interfaces for modular security implementation
SecurityPlugininterface for pluggable security providersSecurityProviderinterface for secure key storageEncryptionProviderinterface for encryption/decryption operationsPersistenceProviderinterface for encrypted data persistence
New Security Package:
fasq_securitypackage with complete security implementationDefaultSecurityPluginwith production-ready security featuresCryptoEncryptionProviderwith AES-GCM encryption and isolate supportSecureStorageProviderwith platform-specific secure storageDriftPersistenceProviderwith efficient batch operations
Changed #
Breaking Changes:
- Removed built-in security dependencies (
encrypt,flutter_secure_storage,shared_preferences) - Security functionality moved to separate
fasq_securitypackage PersistenceOptions.encryptandPersistenceOptions.encryptionKeymarked as deprecated
Migration Required:
- Install
fasq_securitypackage for security features - Update QueryClient to use
SecurityPlugininstead ofPersistenceOptions - See migration guide in
fasq_securitypackage documentation
Removed #
EncryptionServiceclass (moved tofasq_security)SecureStorageclass (moved tofasq_security)EncryptedCachePersisterclass (moved tofasq_security)- Security-related dependencies from core package
Performance #
- Bundle Size: 75% reduction in core package size
- Dependencies: Core package now has zero security dependencies
- Modularity: Security features are now optional and pluggable
0.1.0 - 2025-01-14 #
Added - Phase 2: Production-Ready Caching Layer #
Intelligent Caching:
CacheEntryclass for storing data with metadataQueryCachefor cache storage and management- Staleness detection with configurable
staleTime - Automatic garbage collection with configurable
cacheTime - Fresh vs stale vs missing data states
- Background refetching for stale data
Memory Management:
- Configurable cache size limits (default: 50MB)
- Three eviction policies: LRU (default), LFU, FIFO
- Automatic eviction when cache exceeds limits
- Active query preservation during eviction
- Memory pressure handling (ready for Phase 5 platform integration)
Request Deduplication:
- Concurrent requests for same key return same Future
- Eliminates duplicate network calls
- Automatic cleanup of completed requests
Cache Invalidation:
invalidateQuery(key)- invalidate single queryinvalidateQueries(keys)- invalidate multiple queriesinvalidateQueriesWithPrefix(prefix)- pattern matchinginvalidateQueriesWhere(predicate)- custom logic
Cache Inspection & Metrics:
CacheMetricstracking hits, misses, hit rateCacheInfofor cache state snapshotsgetCacheInfo()- inspect cache stategetCacheKeys()- list all cached keysinspectEntry(key)- examine specific entry
Thread Safety:
AsyncLockfor preventing race conditions- Lock-per-key for concurrent access safety
- Timeout protection (30s) for deadlock prevention
Configuration:
CacheConfigfor global cache settingsQueryOptionsextended withstaleTime,cacheTime,refetchOnMount- Sensible production defaults
QueryState Enhancements:
- Added
isFetchingfield for background refetch indication - Added
dataUpdatedAttimestamp - Added
isStalecomputed property
Developer Experience:
- Zero breaking changes from Phase 1
- Caching works automatically with zero configuration
- Advanced users can tune all parameters
- Comprehensive documentation
Changed #
QueryClientnow manages aQueryCacheinstanceQuery.fetch()now checks cache before fetchingQueryStateincludes cache-related metadataQueryOptionsextended with caching fields (all optional)
Performance #
- Cache get operations: <5ms
- Cache set operations: <10ms
- Request deduplication: 100 widgets = 1 request
- Memory overhead: <100 bytes per cache entry
- Handles 10,000+ cache entries efficiently
Testing #
- 34 new cache-specific tests
- Staleness detection tests
- Eviction policy tests
- Request deduplication tests
- Cache metrics tests
- Thread safety tests
Backward Compatibility #
✅ Zero Breaking Changes
- All Phase 1 code works without modification
- All new QueryOptions fields are optional
- Cache is transparent to Phase 1 users
- Default configuration provides good behavior
0.0.1 - 2025-01-13 #
Added - Phase 1 MVP #
Core Components:
Queryclass for managing async operations and stateQueryStateimmutable state class with comprehensive state trackingQueryStatusenum for lifecycle states (idle, loading, success, error)QueryClientsingleton for global query registryQueryBuilderwidget for declarative UI based on query stateQueryOptionsfor configuring query behavior
Features:
- Automatic state management for any async operation
- Support for API calls, database queries, file operations, and any Future-based task
- Query sharing across multiple widgets with the same key
- Automatic cleanup with reference counting
- Manual refetch capability
- Lifecycle callbacks (onSuccess, onError)
- Conditional query execution with
enabledoption
Developer Experience:
- Comprehensive dartdoc documentation
- Type-safe generic APIs
- Clean, minimal boilerplate
- Example app with multiple async operation types
Testing:
- 60 unit, widget, and integration tests
-
85% test coverage
- Memory leak detection tests
- Lifecycle and state transition tests
Known Limitations #
This is the Phase 1 MVP release. The following features are planned for future phases:
- Phase 2: Intelligent caching with staleness detection
- Phase 2: Request deduplication for concurrent queries
- Phase 2: Automatic background refetching
- Phase 3: State management adapters (Hooks, Bloc, Riverpod)
- Phase 4: Infinite queries for pagination
- Phase 4: Mutations with optimistic updates
- Phase 4: Offline mutation queue
- Phase 5: Production hardening (security, performance optimization)
- Phase 5: DevTools extension
- Phase 5: Testing utilities package
[Unreleased] #
Future releases will add caching, request deduplication, state management adapters, and production-ready features according to the phased development plan.
For the complete development roadmap, see the PRD documentation.