Skip to content

Commit 01b917f

Browse files
ci: apply automated fixes
1 parent 16a1bb8 commit 01b917f

71 files changed

Lines changed: 62621 additions & 11919 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/auto-register-operators.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ import { defineOperator, isUnknown } from '@tanstack/db'
2020
// Define a custom "between" operator
2121
const between = defineOperator<boolean>({
2222
name: 'between',
23-
evaluate: ([valueArg, minArg, maxArg]) => (data) => {
24-
const value = valueArg!(data)
25-
if (isUnknown(value)) return null
26-
return value >= minArg!(data) && value <= maxArg!(data)
27-
}
23+
evaluate:
24+
([valueArg, minArg, maxArg]) =>
25+
(data) => {
26+
const value = valueArg!(data)
27+
if (isUnknown(value)) return null
28+
return value >= minArg!(data) && value <= maxArg!(data)
29+
},
2830
})
2931

3032
// Use in a query
@@ -39,19 +41,19 @@ import { defineOperator, comparison, transform, numeric } from '@tanstack/db'
3941
// Binary comparison with automatic null handling
4042
const notEquals = defineOperator<boolean>({
4143
name: 'notEquals',
42-
evaluate: comparison((a, b) => a !== b)
44+
evaluate: comparison((a, b) => a !== b),
4345
})
4446

4547
// Unary transformation
4648
const double = defineOperator<number>({
4749
name: 'double',
48-
evaluate: transform((v) => typeof v === 'number' ? v * 2 : v)
50+
evaluate: transform((v) => (typeof v === 'number' ? v * 2 : v)),
4951
})
5052

5153
// Binary numeric operation
5254
const modulo = defineOperator<number>({
5355
name: 'modulo',
54-
evaluate: numeric((a, b) => b !== 0 ? a % b : null)
56+
evaluate: numeric((a, b) => (b !== 0 ? a % b : null)),
5557
})
5658
```
5759

@@ -70,8 +72,8 @@ const product = defineAggregate<number>({
7072
for (let i = 0; i < multiplicity; i++) result *= value
7173
}
7274
return result
73-
}
75+
},
7476
}),
75-
valueTransform: 'numeric'
77+
valueTransform: 'numeric',
7678
})
7779
```

DATE_PRECISION_FIX_PR.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ For `Date` values, we now query for the **1ms range** that the Date represents:
3333
```typescript
3434
and(
3535
gte(expression, new Value(minValue)), // >= 123.000000μs
36-
lt(expression, new Value(minValuePlus1ms)) // < 124.000000μs
36+
lt(expression, new Value(minValuePlus1ms)), // < 124.000000μs
3737
)
3838
```
3939

@@ -50,4 +50,3 @@ This correctly matches all rows within the millisecond range `[123.000000μs, 12
5050
- [x] Test fails without the fix (generates `eq` instead)
5151
- [x] Test passes with the fix
5252
- [x] All existing tests pass
53-

OPTIMISTIC_STATE_BUG_FIX.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,3 @@ This test:
7171
All 151 tests pass ✅
7272

7373
The fix ensures that manual write operations (`writeInsert`, `writeUpdate`, `writeDelete`, `writeUpsert`) correctly maintain the separation between server-confirmed state and client optimistic state.
74-

0 commit comments

Comments
 (0)