@firtoz/db-helpers 2.1.0 → 2.1.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.
- package/package.json +3 -3
- package/src/generic-sync.ts +9 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firtoz/db-helpers",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "TanStack DB helpers and utilities",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"module": "./src/index.ts",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@standard-schema/spec": ">=1.1.0",
|
|
52
|
-
"@tanstack/db": ">=0.6.
|
|
52
|
+
"@tanstack/db": ">=0.6.3"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@standard-schema/spec": "^1.1.0",
|
|
56
|
-
"@tanstack/db": "^0.6.
|
|
56
|
+
"@tanstack/db": "^0.6.4",
|
|
57
57
|
"bun-types": "^1.3.11",
|
|
58
58
|
"zod": "^4.3.6"
|
|
59
59
|
},
|
package/src/generic-sync.ts
CHANGED
|
@@ -14,13 +14,12 @@ import type {
|
|
|
14
14
|
SyncMode,
|
|
15
15
|
LoadSubsetOptions,
|
|
16
16
|
} from "@tanstack/db";
|
|
17
|
-
import { DeduplicatedLoadSubset } from "@tanstack/db";
|
|
17
|
+
import { BasicIndex, DeduplicatedLoadSubset } from "@tanstack/db";
|
|
18
18
|
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
export const USE_DEDUPE = false as boolean;
|
|
19
|
+
// DeduplicatedLoadSubset dedupes overlapping loadSubset calls. Previously disabled for TanStack/db#828
|
|
20
|
+
// (invalid OR expressions when toggling isNull/isNotNull). Re-enabled with @tanstack/db 0.6.4; if
|
|
21
|
+
// regressions appear, set back to false and add a regression test.
|
|
22
|
+
export const USE_DEDUPE = true as boolean;
|
|
24
23
|
|
|
25
24
|
/**
|
|
26
25
|
* Base configuration for sync lifecycle management (generic, no Drizzle dependency).
|
|
@@ -646,6 +645,10 @@ export function createGenericCollectionConfig<
|
|
|
646
645
|
onUpdate: config.onUpdate ?? config.syncResult.onUpdate,
|
|
647
646
|
onDelete: config.onDelete ?? config.syncResult.onDelete,
|
|
648
647
|
syncMode: config.syncMode,
|
|
648
|
+
// TanStack DB 0.6+: indexing is opt-in; eager BasicIndex restores pre-0.6 behavior for
|
|
649
|
+
// orderBy/limit live queries (playground pagination, usePredicateFilteredRows, etc.).
|
|
650
|
+
defaultIndexType: BasicIndex,
|
|
651
|
+
autoIndex: "eager",
|
|
649
652
|
utils: config.syncResult.utils as CollectionUtils<
|
|
650
653
|
InferSchemaOutput<TSchema>
|
|
651
654
|
>,
|