Commit 9952921
Virtual props implementation (#1213)
* feat: add virtual properties core support
* test: update expectations for virtual props
* ci: apply automated fixes
* Fix virtual props semantics and types
* ci: apply automated fixes
* Deduplicate test helpers and emit synced flips
Co-authored-by: sam.willis <sam.willis@gmail.com>
* ci: apply automated fixes
* Fix tests for virtual props helpers
* Fix type constraints in tests
* Update local-only and test typings
* ci: apply automated fixes
* Fix type expectations for virtual props
* Align query key types in tests
* Adjust key types in type tests
* Update query type tests for virtual props
* Align query types with expectations
* Use string in query type tests
* Expect numeric in query types
* Use union in query type tests
* Relax query type assertions for
* Loosen join query key expectations
* ci: apply automated fixes
* Default OutputWithVirtual key to union
* Update query tests for virtual props
* test: strip virtual props in query expectations
* test: normalize virtual props in truncate/group/indexes
* ci: apply automated fixes
* test: strip virtual props in collection/local-only
* ci: apply automated fixes
* test: fix remaining virtual props expectations
* fix: preserve local origin across sync confirmation
* ci: apply automated fixes
* fix: account for virtual sync confirmations
* ci: apply automated fixes
* fix: keep optimistic state until sync
* fix: track pending local origins
* fix: persist direct optimistic state
* fix: handle virtual prop filters and origins
* fix: carry virtual props through query output
* feat: cache virtual props with WeakMap
* ci: apply automated fixes
* fix: restore virtual props helper import
* chore: reuse db test utils in query-db
* test: align electric type tests with virtual props
* ci: apply automated fixes
* test: normalize electric tag state for virtual props
* ci: apply automated fixes
* test: strip virtual props in electric integration assertions
* test: normalize electric collection state comparisons
* test: strip virtual props in rxdb assertions
* test: align react useLiveQuery types with virtual props
* test: strip virtual props in query-db-collection tests
* test: strip virtual props in query-db cache comparisons
* test: strip virtual props in trailbase state assertions
* test: align vue useLiveQuery types with virtual props
* fix query select types include virtual props
* ci: apply automated fixes
* update subquery type tests for virtual props
* loosen select result key type for virtual props
* relax join and group-by type assertions
* align subscribeChanges options with virtual props
* document virtual props in live query docs
* document virtual props in live queries guide
* add changeset for virtual props updates
* ci: apply automated fixes
* update changeset summary for virtual props
* fix tests for virtual props and queryOnce typing
Align local-only and group-by expectations with virtual props on returned rows, and make queryOnce's array return cast explicit for the updated type constraints.
Made-with: Cursor
* refactor group-by aggregate setup
Reuse the per-query virtual aggregate map directly instead of copying it before adding select aggregates.
Made-with: Cursor
* ci: apply automated fixes
* fix angular live query type assertions
Align Angular injectLiveQuery type tests with current live query result shapes, including virtual props and single-result inference.
Made-with: Cursor
* ci: apply automated fixes
* fix package test suites across frameworks
Update stale React assertions for virtual props, switch PowerSync tests to the supported sqlite backend with its test dependency, and add DOM libs for TrailBase package typechecking.
Made-with: Cursor
* ci: apply automated fixes
* make powersync test backend selection robust
Use a supported sqlite backend when available and skip the PowerSync integration suites on runtimes that do not support either backend path.
Made-with: Cursor
* ci: apply automated fixes
* fix powersync sqlite backend probe
Verify that better-sqlite3 can actually open a database before selecting it for PowerSync tests so CI can fall back cleanly when native bindings are unavailable.
Made-with: Cursor
* fix db virtual prop edge cases
Address truncate and failed-transaction virtual prop cleanup, preserve previousValue snapshots for optimistic changes, and tighten the virtual prop typing/tests.
Made-with: Cursor
* fix lockfile for powersync sqlite peer
Regenerate pnpm-lock.yaml so the powersync package manifest and frozen-lockfile installs agree in CI.
Made-with: Cursor
* ci: apply automated fixes
* ci: apply automated fixes
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>1 parent 055fd94 commit 9952921
File tree
76 files changed
+4346
-1420
lines changed- .changeset
- docs/guides
- packages
- angular-db/tests
- db
- src
- collection
- indexes
- query
- builder
- compiler
- live
- utils
- tests
- query
- builder
- electric-db-collection/tests
- powersync-db-collection
- tests
- query-db-collection/tests
- react-db/tests
- rxdb-db-collection/tests
- trailbase-db-collection
- tests
- vue-db/tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
76 files changed
+4346
-1420
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
32 | 44 | | |
33 | 45 | | |
34 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
| 60 | + | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
| |||
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
87 | | - | |
88 | | - | |
| 86 | + | |
89 | 87 | | |
90 | 88 | | |
91 | 89 | | |
| |||
109 | 107 | | |
110 | 108 | | |
111 | 109 | | |
112 | | - | |
113 | | - | |
| 110 | + | |
114 | 111 | | |
115 | 112 | | |
116 | 113 | | |
| |||
132 | 129 | | |
133 | 130 | | |
134 | 131 | | |
135 | | - | |
136 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
137 | 135 | | |
138 | 136 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | | - | |
| 62 | + | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | | - | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| |||
241 | 242 | | |
242 | 243 | | |
243 | 244 | | |
244 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
245 | 249 | | |
246 | | - | |
| 250 | + | |
247 | 251 | | |
248 | 252 | | |
249 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
58 | 73 | | |
59 | 74 | | |
60 | 75 | | |
| |||
70 | 85 | | |
71 | 86 | | |
72 | 87 | | |
73 | | - | |
| 88 | + | |
74 | 89 | | |
75 | 90 | | |
76 | 91 | | |
77 | 92 | | |
78 | 93 | | |
79 | 94 | | |
80 | | - | |
| 95 | + | |
81 | 96 | | |
82 | 97 | | |
83 | 98 | | |
84 | 99 | | |
85 | 100 | | |
86 | | - | |
| 101 | + | |
87 | 102 | | |
88 | 103 | | |
89 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
90 | 111 | | |
91 | 112 | | |
92 | | - | |
| 113 | + | |
93 | 114 | | |
94 | 115 | | |
95 | 116 | | |
96 | 117 | | |
97 | 118 | | |
98 | 119 | | |
99 | 120 | | |
100 | | - | |
101 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
102 | 125 | | |
103 | 126 | | |
104 | 127 | | |
| |||
113 | 136 | | |
114 | 137 | | |
115 | 138 | | |
116 | | - | |
| 139 | + | |
117 | 140 | | |
118 | 141 | | |
119 | 142 | | |
| |||
0 commit comments