@firtoz/drizzle-indexeddb 2.0.1 → 3.0.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @firtoz/drizzle-indexeddb
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b714ebb`](https://github.com/firtoz/fullstack-toolkit/commit/b714ebbb62ec0e3c3aa56c4105e7499fac11d1e5) Thanks [@firtoz](https://github.com/firtoz)! - Extract shared SQLite TanStack sync backend (`createSqliteTableSyncBackend`, IR→Drizzle helpers, `SQLOperation` types) into `@firtoz/drizzle-utils`. Add `@firtoz/drizzle-durable-sqlite` for Durable Object SQLite collections (`durableSqliteCollectionOptions`). Refactor `@firtoz/drizzle-sqlite-wasm` to use the shared backend with `driverMode: "async"`. `durableSqliteCollectionOptions` accepts optional `readyPromise` (defaults to immediate readiness). README documents the class-field Hono pattern, `app.fetch(request, env)` for bindings, optional `on-demand` + `preload` vs eager + `onFirstReady`, and `honoDoFetcherWithName` without a separate exported app type. Restore JSDoc on `DrizzleSqliteCollectionConfig` (`debug`, `checkpoint`, `interceptor`) for editor tooltips. Align `createStandaloneCollection` generics with `InsertToSelectSchema` from `@firtoz/drizzle-utils`.
8
+
9
+ - Updated dependencies [[`b714ebb`](https://github.com/firtoz/fullstack-toolkit/commit/b714ebbb62ec0e3c3aa56c4105e7499fac11d1e5)]:
10
+ - @firtoz/drizzle-utils@1.1.0
11
+
3
12
  ## 2.0.1
4
13
 
5
14
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firtoz/drizzle-indexeddb",
3
- "version": "2.0.1",
3
+ "version": "3.0.0",
4
4
  "description": "IndexedDB migrations powered by Drizzle ORM",
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -68,7 +68,7 @@
68
68
  "access": "public"
69
69
  },
70
70
  "peerDependencies": {
71
- "@firtoz/drizzle-utils": ">=1.0.2",
71
+ "@firtoz/drizzle-utils": ">=1.1.0",
72
72
  "@tanstack/db": ">=0.5.33",
73
73
  "drizzle-orm": ">=0.45.1",
74
74
  "drizzle-valibot": ">=0.4.0",
@@ -76,7 +76,7 @@
76
76
  "valibot": ">=1.3.1"
77
77
  },
78
78
  "devDependencies": {
79
- "@firtoz/drizzle-utils": "^1.0.2",
79
+ "@firtoz/drizzle-utils": "^1.1.0",
80
80
  "@tanstack/db": "^0.5.33",
81
81
  "@types/react": "^19.2.14",
82
82
  "drizzle-orm": "^0.45.1",
@@ -9,7 +9,12 @@ import {
9
9
  } from "@tanstack/db";
10
10
  import type { Table } from "drizzle-orm";
11
11
  import type { CollectionUtils } from "@firtoz/db-helpers";
12
- import type { IdOf, InsertSchema, SelectSchema } from "@firtoz/drizzle-utils";
12
+ import type {
13
+ IdOf,
14
+ InsertSchema,
15
+ InsertToSelectSchema,
16
+ SelectSchema,
17
+ } from "@firtoz/drizzle-utils";
13
18
  import {
14
19
  drizzleIndexedDBCollectionOptions,
15
20
  type DrizzleIndexedDBCollectionConfig,
@@ -62,7 +67,7 @@ type InternalCollection<TTable extends Table> = Collection<
62
67
  InferSchemaOutput<SelectSchema<TTable>>,
63
68
  IdOf<TTable>,
64
69
  CollectionUtils<InferSchemaOutput<SelectSchema<TTable>>>,
65
- SelectSchema<TTable>,
70
+ InsertToSelectSchema<TTable>,
66
71
  InferSchemaInput<InsertSchema<TTable>>
67
72
  >;
68
73
 
@@ -271,9 +276,9 @@ export function createStandaloneCollection<TTable extends Table>(
271
276
  syncMode,
272
277
  } as DrizzleIndexedDBCollectionConfig<TTable>);
273
278
 
274
- // Create the collection
279
+ // biome-ignore lint/suspicious/noExplicitAny: createCollection overloads can't resolve InsertToSelectSchema for generic TTable; collection is re-typed below
275
280
  const collection = createCollection(
276
- collectionConfig,
281
+ collectionConfig as any,
277
282
  ) as unknown as InternalCollection<TTable>;
278
283
 
279
284
  // Wait for collection to be ready