tsdf 17.0.0 → 17.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import { t as opfsPersistentStorage } from "./opfsPersistentStorage-B_lVflof.js";
1
+ import { t as opfsPersistentStorage } from "./opfsPersistentStorage-D_k77Srq.js";
2
2
  export { opfsPersistentStorage };
@@ -1,4 +1,4 @@
1
- import { H as encodePersistedAsyncNamespaceKind, J as parsePersistedAsyncNamespaceKind, U as getNamespaceId, W as getPayloadRecordKey, _ as getTSDFDebugTimingMs, g as emitTSDFDebugLog, i as createAsyncStorageAdapter, q as parseAsyncStorageRecordKey } from "./asyncStorageAdapter-BBKVK1S_.js";
1
+ import { G as getPayloadRecordKey, J as parseAsyncStorageRecordKey, U as encodePersistedAsyncNamespaceKind, W as getNamespaceId, Y as parsePersistedAsyncNamespaceKind, _ as getTSDFDebugTimingMs, g as emitTSDFDebugLog, i as createAsyncStorageAdapter } from "./asyncStorageAdapter-BuGjbXYA.js";
2
2
  import { getCompositeKey } from "@ls-stack/utils/getCompositeKey";
3
3
  import { __LEGIT_CAST__ } from "@ls-stack/utils/saferTyping";
4
4
  import { isObject } from "@ls-stack/utils/typeGuards";
@@ -137,6 +137,7 @@ TSDF does not choose a persistence adapter automatically. Pass one of the built-
137
137
  - Can hydrate synchronously during initial state creation for `DocumentStore`.
138
138
  - `CollectionStore` and `ListQueryStore` use lazy hydration for unknown entries from initial keys scan.
139
139
  - Writes are debounced and may be dropped if serialization errors occur.
140
+ - Scheduled expiration and byte-budget maintenance is split across browser idle deadlines. Timeout-fired callbacks and browsers without `requestIdleCallback` use short timer-backed slices, so large scans and eviction batches yield between slices while keeping payload entries and manifests consistent.
140
141
  - When a write hits the browser `QuotaExceededError` (the shared origin quota is full, e.g. because other parts of the app filled `localStorage`), TSDF automatically evicts its own least recently used entries — across all TSDF stores and sessions — and retries, escalating to all non-offline-protected entries if needed. Offline data and non-TSDF keys are never touched. If even that cannot free enough space, a single descriptive error is reported through `onPersistentStorageError` and persistence writes are silently skipped until the next page load. Removals of persisted entries (e.g. after deleting an item) still go through while writes are disabled, so deleted data never resurrects on the next load.
141
142
 
142
143
  Use it with:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdf",
3
- "version": "17.0.0",
3
+ "version": "17.0.1",
4
4
  "description": "A data fetching solution based on t-state",
5
5
  "license": "PolyForm-Noncommercial-1.0.0",
6
6
  "author": "Lucas Santos",