Commit graph

150 commits

Author SHA1 Message Date
Orion Henry
5a777189b5 move automerge-js onto the applyPatches model 2022-09-29 16:23:11 -05:00
Orion Henry
932e93261c cleanup for PR, remove comments, document, clean up patch merge 2022-09-29 15:59:10 -05:00
Orion Henry
4860adfa52 fmt & clippy 2022-09-29 15:59:10 -05:00
Orion Henry
323923c386 implement increment 2022-09-29 15:59:10 -05:00
Orion Henry
47fa3ae218 map and array insert, delete for apply() 2022-09-29 15:59:10 -05:00
Orion Henry
b5742315ef move op observer into transaction 2022-09-29 15:59:08 -05:00
Alex Good
e57548f6e2
Fix broken encode/decode change
Previous ceremonies to appease clippy resulted in the
encodeChange/decodeChange wasm functions being slightly broken. Here we
fix them.
2022-09-29 15:49:31 -05:00
Alex Good
c7e370a1df
Appease clippy 2022-09-28 17:18:37 -05:00
Alex Good
9ac8827219
Remove storage-v2 feature flag
Signed-off-by: Alex Good <alex@memoryandthought.me>
2022-08-22 21:21:21 +01:00
Alex Good
fc94d43e53
Expose storage-v2 in automerge-wasm
Signed-off-by: Alex Good <alex@memoryandthought.me>
2022-08-22 21:16:47 +01:00
Alex Good
d785c319b8
Add ScalarValue::Unknown
The colunar storage format allows for values which we do not know the
type of. In order that we can handle these types in a forward compatible
way we add ScalarValue::Unknown.

Signed-off-by: Alex Good <alex@memoryandthought.me>
2022-08-22 21:04:19 +01:00
Orion Henry
9a0dd24714 fmt / tests 2022-06-01 08:08:01 -04:00
Orion Henry
8ce10dab69 some api changes/tweaks - basic js package 2022-05-31 13:49:18 -04:00
Orion Henry
c353abfe4e
Merge pull request #375 from jeffa5/get-changes-opt
Get changes opt
2022-05-22 10:30:24 -07:00
Andrew Jeffery
8b1c3c73cd Use BTreeSet for sync::State to allow deriving Hash 2022-05-20 16:13:10 +01:00
Andrew Jeffery
933bf5ee07 Return an error when getting clock for missing hash 2022-05-20 10:05:08 +01:00
Andrew Jeffery
ec446f4839 Add favicon 2022-04-23 11:31:58 +01:00
Andrew Jeffery
48e397e82f Add lints 2022-04-23 11:05:43 +01:00
Andrew Jeffery
5b0ce54229 Add logo to docs 2022-04-23 10:46:03 +01:00
Andrew Jeffery
d667552a98 Add increment observation for observer 2022-04-20 14:44:04 +01:00
Andrew Jeffery
aa3c32cea3 Add ApplyOptions 2022-04-19 18:15:22 +01:00
Andrew Jeffery
76a19185b7 Add separate functions for with op_observer 2022-04-19 17:48:11 +01:00
Andrew Jeffery
702a0ec172 Add lifetimes to transact_with and fixup watch example 2022-04-19 17:30:06 +01:00
Andrew Jeffery
b6fd7ac26e Add op_observer to documents and transactions
This replaces the built-in patches with a more generic mechanism, and
includes a convenience observer which uses the old patches.
2022-04-19 17:30:05 +01:00
Orion Henry
965240d8f6 Merge remote-tracking branch 'origin/experiment' into wasm_readme 2022-04-08 18:07:44 -04:00
Andrew Jeffery
07553195fa Update wasm and js with new names 2022-04-08 18:23:56 +01:00
Andrew Jeffery
1ca49cfa9b Add range to transactable and rename value to get
Also changes values to get_conflicts for more clarity on what it does
and opening up the name for iterating over values.
2022-04-08 18:18:22 +01:00
Andrew Jeffery
842797f3aa Use Unicode Scalars instead of graphemes in text 2022-04-08 09:35:59 +01:00
Orion Henry
f5d858df82 Merge remote-tracking branch 'origin/experiment' into wasm_readme 2022-04-07 14:23:52 -04:00
Orion Henry
9fe8447d21 loadDoc -> load() and forkAt() 2022-04-07 01:19:27 -04:00
Andrew Jeffery
330aebb44a Make wasm ScalarValue take a cow 2022-04-04 21:04:23 +01:00
Orion Henry
4edb034a64 adding readme tests 2022-04-04 12:50:08 -04:00
Orion Henry
83c08344e7 wip2 2022-04-04 12:37:57 -04:00
Andrew Jeffery
fa2971a29a Have value be a reference for scalars 2022-04-04 12:47:08 +01:00
Andrew Jeffery
d331ceb6d4 Rename set to put and set_object to put_object 2022-04-01 13:40:58 +01:00
Andrew Jeffery
632857a4e6 Rename del and inc in wasm and js 2022-04-01 13:36:26 +01:00
Andrew Jeffery
1a66dc7ab1 Use full names for delete and increment 2022-04-01 13:36:00 +01:00
Andrew Jeffery
0c16dfe2aa Change js function names to camelCase 2022-04-01 11:46:43 +01:00
Orion Henry
ab580df947 Merge remote-tracking branch 'origin/experiment' into getnerate-patches 2022-03-30 13:04:51 -06:00
Martin Kleppmann
ab4dc331ac cargo fmt 2022-03-30 13:12:07 -04:00
Martin Kleppmann
7025bb6541 Tests and fixes for list patches 2022-03-30 13:12:07 -04:00
Martin Kleppmann
94ff10f690 Rename and reformat a bit 2022-03-30 13:12:07 -04:00
Martin Kleppmann
26efee509d First patch implementation from pairing session with Orion 2022-03-30 13:12:01 -04:00
Orion Henry
f5e8b998ca expose getChangeByHash in wasm 2022-03-23 09:34:44 -04:00
Andrew Jeffery
2e49561ab2 Make splice take iterator instead of vec 2022-03-11 12:13:11 +00:00
Orion Henry
ee116bb5d7 object_type returns an option 2022-03-09 19:42:58 -05:00
Orion Henry
c51073c150 add paths/materialize to api 2022-03-09 17:53:30 -05:00
Orion Henry
f230be8aec change the wasm commit back to an array 2022-03-09 10:41:14 -05:00
Andrew Jeffery
e26837b09d Move sync structs to module 2022-03-09 12:43:52 +00:00
Andrew Jeffery
d00cee1637 Misc API updates
- Commit now returns just a single hash rather than a vec. Since the
  change we create from committing has all of the heads as deps there
  can only be one hash/head after committing.
- Apply changes now takes a Vec rather than a slice. This avoids having
  to clone them inside.
- transact_with now passes the result of the closure to the commit
  options function
- Remove patch struct
- Change receive_sync_message to return a () instead of the
  `Option<Patch>`
- Change `Transaction*` structs to just `*` and use the transaction
  module
- Make CommitOptions fields public
2022-03-09 12:33:20 +00:00