idb-refined 0.0.3 → 0.0.4

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.
Files changed (2) hide show
  1. package/README.md +7 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # idb-refined
2
2
 
3
- Minimal IndexedDB client on top of [idb](https://www.npmjs.com/package/idb). Exposes **add**, **update**, **delete**, and **removeDb**. Init, schema, cleanup and eviction run automatically.
3
+ Minimal IndexedDB client on top of [idb](https://www.npmjs.com/package/idb). Exposes **set**, **get**, **update**, **delete**, and **deleteDb**. Init, schema, cleanup and eviction run automatically.
4
4
 
5
5
  ## Install
6
6
 
@@ -52,6 +52,12 @@ await deleteDb();
52
52
 
53
53
  **Required:** Add an `NPM_TOKEN` secret in the repo (Settings → Secrets and variables → Actions).
54
54
 
55
+ ## Under the hood
56
+
57
+ - **Schema & versioning** — A single store (and indexes on `expiresAt`, `createdAt`) is created or upgraded automatically; version bumps are derived from a schema fingerprint so you don’t manage versions by hand.
58
+ - **Cleanup** — After each `set`, entries with `expiresAt` in the past are removed (so TTL/expiry “just works”).
59
+ - **Eviction** — If the store grows beyond `maxCount` (default 1000), the oldest entries by `createdAt` are deleted until the cap is met.
60
+
55
61
  ## License
56
62
 
57
63
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idb-refined",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Thin TypeScript IndexedDB helper: initDb (auto-version), clean by date/size, add with eviction, delete helpers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",