Releases: atomic-state/react-idbstore
v1.5.0
π¦ react-idbstore 1.5.0 Release Notes
The 1.5.0 release is a major reactive performance and developer-experience upgrade. This version introduces single-record reactive hooks, recursive field selection, and in-memory result caching for ultra-efficient rendering β all while remaining fully backward compatible.
π Major Additions
New Reactive Hooks
Three new hooks are now available for precise, single-record subscriptions:
useRecord(where, select?)
Reactive version of findFirst that returns one matching record or null.
const user = store.useRecord({
where: { id: 1 },
select: { name: true, profile: { avatar: true } }
});v1.4.2
π¦ react-idbstore 1.4.2 Release Notes
The 1.4.1 release is a focused API enhancement that introduces a new bulk deletion primitive while preserving full backward compatibility. This update improves developer ergonomics for cleanup-heavy workflows and sync pipelines.
New API Feature
deleteManyWhere(where)
A new high-level bulk deletion method has been added:
deleteManyWhere(where: WhereClause<StoreSchema>): Promise<number>v1.3.0
π¦ react-idbstore 1.3.0 Release Notes
The 1.3.0 release is a performance, scalability, and correctness-focused update. It delivers major runtime optimizations for live queries and bulk synchronization while remaining fully backward compatible at the API level.
This version is especially beneficial for sync-heavy apps, offline-first workflows, and large local datasets.
π Major Performance Improvements
Massively Faster updateByExternalKey
Removed the N+1 query pattern that caused one IndexedDB scan per update. The method now performs a single collection scan, in-memory matching, and one final bulkPut transaction. This results in orders-of-magnitude faster synchronization for large update batches.
Ultra-Fast useRecords Change Detection
Replaced repeated deep JSON serialization comparisons with a deterministic object hashing strategy using stable key ordering and constant-time hash comparisons. This dramatically reduces unnecessary React re-renders, CPU spikes during live updates, and memory pressure on large datasets.
Faster & Smarter WhereClause Evaluation
The internal condition evaluator now features early short-circuit exits for $and and $or, fully recursive nested object matching, and tighter boolean logic for complex filters. These changes result in 2β4Γ faster filtering on deeply nested documents.
Data Integrity & Reliability
All multi-record operations now execute inside IndexedDB transactions, including:
addManydeleteManyupdateAllWhereupdateByInternalIdupdateByExternalKey
This guarantees atomic writes, crash safety, and eliminates partial updates under concurrency.
Developer Experience Enhancements
Unsafe TypeScript escapes have been removed in favor of safer, strongly-typed internal helpers. Internal object comparison is now deterministic and more predictable. Optional support was added for richer comparison operators in WhereClause (e.g., numeric and array matching) without breaking existing queries.
Backward Compatibility
- No API changes
- No signature changes
- No return type changes
- No required migration
Existing applications built on v1.2.x will continue to work unmodified.
β οΈ Behavioral Notes (Non-Breaking)
While the public API is fully compatible, two internal behaviors were intentionally upgraded:
updateByExternalKeynow updates all matching records per key instead of only the first match.- Nested object matching is now strictly correct and fully recursive.
These changes fix subtle edge-case bugs and improve correctness, but may affect applications that relied on the previous loose matching behavior.
π‘ Breaking Changes
None. This is a backward-compatible performance and correctness release.
v1.2.0
π¦ react-idbstore 1.2.0 Release Notes
The 1.2.0 release introduces a suite of high-performance Bulk Update methods and a new, intuitive API for synchronizing data by arbitrary external keys.
β¨ Major Features
This release focuses entirely on optimizing write operations and simplifying synchronization:
- Optimized Bulk Update API: The store factory now includes three powerful, transactional update methods:
updateAllWhere(where, changes): Performs a bulk update by applying the same static change to all records matching the complexWhereClausecriteria (e.g., mark all 'low priority' items as 'completed').updateByInternalId(updates): The fastest way to merge changes, performing a bulk update on multiple records using their internal IndexedDB primary key (id). This is the recommended method for processing arrays of updates where the local ID is known.updateByExternalKey(updates): The flexible synchronization tool, allowing you to update multiple unique items by matching on any arbitrary property (e.g.,uuidorserverId), and applying unique changes to each one. This method performs sequential lookups but executes the final write as a single, high-performance transaction.
π Key Enhancements
- High-Performance Merging: The
updateByInternalIdmethod uses a singlebulkPuttransaction for the merge, guaranteeing the fastest possible performance when updating multiple records by their internal ID. - Robust Synchronization: The
updateByExternalKeymethod internally converts external lookup keys (e.g.,key: 'uuid') into the local internal ID, allowing for reliable, item-specific updates from server data feeds.
π‘ Breaking Changes
- None. This is a backward-compatible feature addition.
v1.1.0
π¦ react-idbstore 1.1.0 Release Notes
The 1.1.0 release introduces new imperative read functions
β¨ New Features
- Imperative Read API: Added three new async functions for fast, one-time data fetching outside of reactive components:
findFirst(where): Efficiently finds the oldest matching record.findLast(where): Efficiently finds the newest matching record.findMany(where): Finds all matching records matching the criteria.
- Tab Synchronization: Added information about tab sync
π Key Enhancements
- Updated Documentation: The README has been fully updated to include the new imperative read functions.
π‘ Breaking Changes
- None. This is a backward-compatible feature release.
v1.0.1
π¦ react-idbstore 1.0.1 Release Notes
This is a documentation-focused release for stability and clarity.
π Clarification
- Data Relationship Trade-Off: Added explicit documentation explaining that native, cross-store database joins are not supported due to the architectural choice of isolated IndexedDB stores. The documentation now guides users to handle relationships via client-side data mapping.
π‘ Breaking Changes
- None. This is a non-breaking documentation update.
v1.0.0
π¦ react-idbstore 1.0.0 Release Notes
The 1.0.0 release introduces the stable core API for managing isolated, highly performant IndexedDB stores within React applications.
β¨ Major Features
This release establishes the full feature set of react-idbstore:
-
Store Factory (
createIDBStore): Provides a reusable factory pattern to generate isolated data stores for any TypeScript schema. -
Complete CRUD API: Full support for single and bulk operations (
addItem,addMany,updateItem,deleteItem,deleteMany). -
Live Data Hook (
useRecords): A performance-optimized hook that subscribes components to real-time data changes. -
Robust Type System: Complete TypeScript integration using
StoreSchemaandWhereClause<T>to ensure type safety across all operations.
π Key Enhancements and Optimizations
- Smart Performance Optimization: Implemented a deep equality comparison within the
useRecordssubscription to prevent unnecessary React re-renders when the underlying data is content-identical. - Advanced Query Syntax: Introduced support for MongoDB-style logical operators (
$and,$or) within thewhereclause, enabling complex client-side filtering. - Enhanced Robustness: Ensured all asynchronous write operations (
addItem,updateItem, etc.) correctly propagate database errors usingthrow err, providing calling components with reliable failure handling. - Clean Data Structure: All retrieved records are returned in the consistent structure
{ id: number, object: StoreSchema }.
π‘ Breaking Changes
- None. This is the initial stable release.