Commit graph

264 commits

Author SHA1 Message Date
Blaine Cook
e00797c512 test for attribution correctly not surfacing temporary text (inserted and deleted after baseline) 2022-03-10 15:42:57 -08:00
Orion Henry
57a0f62b75 v0.0.19 wasm 2022-03-10 09:23:23 -05:00
Orion Henry
ee116bb5d7 object_type returns an option 2022-03-09 19:42:58 -05:00
Orion Henry
a0f78561c4 Merge branch 'paths' into marks 2022-03-09 19:28:10 -05:00
Orion Henry
c51073c150 add paths/materialize to api 2022-03-09 17:53:30 -05:00
Andrew Jeffery
b14d874dfc Move sync structs to module 2022-03-09 15:15:36 -05:00
Andrew Jeffery
aad4852e30 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 15:14:22 -05:00
Orion Henry
b81e0fd619 update wasm test for set_object 2022-03-09 15:14:20 -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
Orion Henry
cbf1ac03b2 added attribute2() - janky version 2022-03-08 12:00:02 -05:00
Orion Henry
4094e82f04 rename tests to attribute 2022-03-07 13:50:05 -05:00
Orion Henry
42446fa5c2 blame -> attribute 2022-03-07 13:45:56 -05:00
Orion Henry
beae33402a update wasm test for set_object 2022-03-07 11:46:25 -05:00
Orion Henry
6d5f16c9cd Merge branch 'experiment' into marks 2022-03-04 17:26:14 -05:00
Orion Henry
95f27f362c
Merge pull request #283 from jeffa5/experiment-make
Separate scalars and objects in transaction API
2022-03-04 16:53:17 -05:00
Orion Henry
dbbdd616fd clippy/fmt 2022-03-04 14:16:06 -05:00
Orion Henry
523af57a26 Merge branch 'experiment' into marks 2022-03-04 14:09:00 -05:00
Orion Henry
b9acf611fa
Merge pull request #293 from jeffa5/experiment-sync-api
Clean up sync api
2022-03-04 12:39:03 -05:00
Orion Henry
390ae49be0
Merge pull request #294 from jeffa5/experiment-infallible-save
Make save infallible
2022-03-04 12:37:51 -05:00
Andrew Jeffery
cd5e734735 Make decode_change an associated function 2022-03-04 13:09:29 +00:00
Andrew Jeffery
000576191e Clean up sync api 2022-03-04 12:32:07 +00:00
Andrew Jeffery
d71e87882e Make save infallible 2022-03-04 12:28:05 +00:00
Andrew Jeffery
4fe7df3d0e Fix clippy lint 2022-03-04 09:51:50 +00:00
Andrew Jeffery
93a20f302d Fixup wasm lib 2022-03-04 09:51:50 +00:00
Andrew Jeffery
682b8007b9 Borrow exid to avoid &ROOT everywhere 2022-03-03 09:05:08 +00:00
Orion Henry
d195a81d49 v17 --release 2022-03-02 18:35:58 -05:00
Orion Henry
0f71b48857
Merge pull request #282 from automerge/move_wasm_to_feature
move wasm to feature flag
2022-03-02 14:07:34 -05:00
Andrew Jeffery
8f2877a67c Fix wasm 2022-03-02 17:24:15 +00:00
Orion Henry
2747d5bf2b move wasm to feature flag 2022-03-02 11:05:48 -05:00
Orion Henry
4c11c86532 v0.0.16 - properly blame items deleted by both 2022-03-02 10:27:54 -05:00
Orion Henry
42b6ffe9d8 v0.0.15 2022-03-02 09:33:04 -05:00
Orion Henry
b21b59e6a1 blame v0.1 2022-03-01 22:09:21 -05:00
Andrew Jeffery
f51e44c211 Update keys iterator to iterate at the tree level
No more big vec allocation now!
2022-02-25 17:31:33 +00:00
Andrew Jeffery
a726cf33c7 Add keys struct for iteration
This at least helps to not convert all of the keys to their strings
automatically but still allocates a vec.
2022-02-25 17:31:14 +00:00
Orion Henry
e07211278f v0.0.14 2022-02-24 18:46:20 -05:00
Orion Henry
3c3f411329 update to new autotransaction api 2022-02-24 18:43:44 -05:00
Orion Henry
5aad691e31 Merge branch 'experiment' into marks 2022-02-24 18:10:19 -05:00
Orion Henry
337fabe5a9
Merge pull request #271 from jeffa5/experiment-txn
Transaction API
2022-02-24 18:07:05 -05:00
Orion Henry
872efc5756 v10 2022-02-24 17:41:55 -05:00
Orion Henry
e37395f975 make() defaults to text 2022-02-24 17:41:35 -05:00
Orion Henry
a84fa64554 change MAP,LIST,TEXT to be {},[],'' - allow recursion 2022-02-24 17:41:33 -05:00
Orion Henry
a37d4a6870 spans will now respect non-graphmem values 2022-02-24 16:41:01 -05:00
Blaine Cook
5eb5714c13 add failing test for marks handling in 3-way merge scenario 2022-02-24 16:24:17 -05:00
Blaine Cook
4f9b95b5b8 add test for merge behaviour of marks 2022-02-24 16:24:17 -05:00
Orion Henry
06302e4a17 make() defaults to text 2022-02-24 00:22:56 -05:00
Orion Henry
2fc0705907 change MAP,LIST,TEXT to be {},[],'' - allow recursion 2022-02-23 19:43:13 -05:00
Orion Henry
36b4f08d20 wasm to 0.0.7 2022-02-22 12:13:01 -05:00
Orion Henry
015e8ce465 choking on bad value function 2022-02-22 12:12:59 -05:00
Orion Henry
ea2f29d681 wasm to 0.0.6 2022-02-22 12:11:49 -05:00
Orion Henry
c8cd069e51 tweak files 2022-02-22 12:11:49 -05:00
Orion Henry
2ba2da95a8 attempt at new packaging 2022-02-22 12:11:49 -05:00
Orion Henry
561cad44e3 Revert "remove marks"
This reverts commit c8c695618b.
2022-02-22 12:11:49 -05:00
Orion Henry
b96aa168b4 choking on bad value function 2022-02-22 12:10:11 -05:00
Andrew Jeffery
3493dbd74a Rename autotxn to autocommit 2022-02-21 10:49:14 +00:00
Andrew Jeffery
50a1b4f99c Add transactable trait 2022-02-21 10:32:57 +00:00
Andrew Jeffery
59e36cebe4 Improve transactions with drop, transact and better commit
Also remove modification operations directly on Automerge and switch
tests to using AutoTxn.
2022-02-17 11:29:36 +00:00
Andrew Jeffery
7cbd6effb7 Add autotxn document for wasm and cross-language use
These don't have the ability to preserve the semantics of the reference
based transaction model and so can make use of the nicer auto
transaction model.
2022-02-16 14:06:22 +00:00
Andrew Jeffery
d7da7267d9 Initial wasm fix 2022-02-16 11:39:14 +00:00
Orion Henry
ef938fdf0a manually handle js types - make sure we have good errors 2022-02-15 14:02:19 -05:00
Orion Henry
b6e0da28d8 fmt 2022-02-10 11:48:09 -05:00
Orion Henry
c8c695618b remove marks 2022-02-10 11:42:15 -05:00
Orion Henry
d1b0d41239 move marks into its own test 2022-02-10 11:17:15 -05:00
Orion Henry
9136f00e43 bugfix: duplicate seq not blocked on apply_changes, clone did not close a transaction, added fork and merge to wasm 2022-02-10 11:14:44 -05:00
Orion Henry
b53305cf7f Merge branch 'marks' into tmp 2022-02-10 09:42:38 -05:00
Karissa McKelvey
98a65f98f7 Add failing test for decoding a conflicted merge 2022-02-09 13:17:07 -08:00
rae
c655427f9a
Add support for web 2022-02-07 16:33:10 -08:00
Orion Henry
1aab66d160 fix version number 2022-02-06 19:57:25 -05:00
Orion Henry
a9ddb9398c cleanup typescript defs 2022-02-06 19:01:37 -05:00
Orion Henry
3f82850e44 fix bug in set scalar 2022-02-04 20:15:57 -05:00
Orion Henry
c54aab66c4 better error on invalid value 2022-02-04 14:43:22 -05:00
Orion Henry
bf184fe980 remove some un needed imports 2022-02-03 14:43:02 -05:00
Orion Henry
2019943849 bump edition from 2018 to 2021 2022-02-03 14:38:21 -05:00
Orion Henry
0f49608dde spans have types not names 2022-02-02 16:29:23 -05:00
Orion Henry
1d0c54ca9a raw_spans with ids 2022-02-02 16:21:33 -05:00
Orion Henry
ee80837feb raw_spans experiment 2022-02-02 15:55:41 -05:00
Orion Henry
da73607c98 adding make 2022-01-31 17:45:07 -05:00
Orion Henry
e88f673d63 Revert "Remove make"
This reverts commit 5b9360155c.
2022-01-31 17:43:56 -05:00
Orion Henry
5b9360155c Remove make 2022-01-31 17:28:24 -05:00
Orion Henry
17e6a9a955 fixed fixed 2022-01-31 17:24:46 -05:00
Orion Henry
1269a8951e use types in pkg 2022-01-31 17:24:17 -05:00
Orion Henry
836e6ba510 fix return types 2022-01-31 17:21:16 -05:00
Orion Henry
a9dec7aa0b remove dead code 2022-01-31 17:11:22 -05:00
Orion Henry
7b32faa238 all ts tests passing 2022-01-31 17:07:20 -05:00
Orion Henry
c49bf55ea4 almost working ts 2022-01-31 16:48:03 -05:00
Karissa McKelvey
d3f4be0654 Fix typescript errors in test 2022-01-31 13:03:27 -08:00
Karissa McKelvey
831faa2589 uint datatypes & fix some more typescript errors 2022-01-31 12:48:49 -08:00
Orion Henry
4c84ccba06 half done - not working typescript 2022-01-31 15:23:46 -05:00
Orion Henry
bfc051f4fb cleanup / rename 2022-01-31 14:02:24 -05:00
Orion Henry
a2e433348a mark encode/decode/serde 2022-01-31 14:02:24 -05:00
Orion Henry
b794f4803d rework marks as inserts between values 2022-01-31 14:02:24 -05:00
Orion Henry
e679c4f6a0 v0 wip 2022-01-31 14:02:23 -05:00
Orion Henry
9ff0c60ccb add cra example code 2022-01-28 18:05:33 -05:00
Orion Henry
cfa1067c19 rework wasm function to use js types more directly 2022-01-28 17:07:59 -05:00
Orion Henry
3393a60e59 clippy lint 2022-01-20 14:17:11 -08:00
Orion Henry
54fec3e438 lamport compare was backward on actorids and so was value resolution 2022-01-20 14:17:11 -08:00
Andrew Jeffery
5867c8d131 Fixup CI 2022-01-19 15:11:04 -08:00
Orion Henry
b30a2b9cc1 give Counter its own type 2022-01-14 06:27:42 -08:00
Orion Henry
d50062b769 move values into the counter type - remove need for vis_window 2022-01-14 06:27:42 -08:00
Orion Henry
067df1f894 break sync, interop, and value code into their own files 2022-01-09 08:05:00 -08:00
Orion Henry
a2e6778730 fmt 2022-01-09 08:05:00 -08:00
Orion Henry
04c7e9184d port over all the sync tests to the wasm api 2022-01-09 08:05:00 -08:00
Orion Henry
b67098d5e1 convert automerge-js to use import/export 2022-01-09 08:05:00 -08:00
Orion Henry
45ee5ddbd9 add import/export 2022-01-09 08:05:00 -08:00
Orion Henry
d2a7cc5f75 get sync tests working 2022-01-09 08:05:00 -08:00
Orion Henry
ef89520d7c more tests for wasm 2022-01-03 14:59:46 -05:00
Orion Henry
4c4484b897 fix bug in wasm 2022-01-03 12:58:08 -05:00
Orion Henry
3046cbab35
Replace the OpID API with an object ID
Rather than returning an OpID for every mutation, we now return an
`Option<ObjId>`. This is `Some` only when a `make*` operation was
applied. This `ObjID` is an opaque type which can be used with any
document.
2022-01-01 20:15:02 +00:00
Orion Henry
6932bdff08 package.json can run on windows now 2021-12-29 14:16:15 -05:00
Alex Good
216b4eed82 Add deny.toml and a script for calling cargo deny
In order to get cargo deny to pass we also update a few dependencies and
add licenses
2021-12-24 10:18:16 -08:00
Orion Henry
4c90b5f822 get js text tests working 2021-12-22 15:08:31 -05:00
Orion Henry
780298b72c docs, tests, code cleanup 2021-12-21 09:23:34 -08:00
Orion Henry
265ce823da implement all the query_at(), add tests, was, cut dead code 2021-12-21 09:23:34 -08:00
Alex Good
962340805c
automerge::set - don't generate ops for noops
Repeatedly setting the same value for a particular (obj, key)
combination now no longer generates an operation. To allow this we
modify the return value of `automerge::set` so that it may return an
`Option<OpId>` instead of an `OpId`.

Signed-off-by: Alex Good <alex@memoryandthought.me>
2021-12-18 15:57:03 +00:00
Orion Henry
fc89a26302 first pass for sync in js/wasm 2021-12-18 00:22:20 -05:00
Orion Henry
503ee1ca19 Merge branch 'experiment' of github.com:automerge/automerge-rs into experiment 2021-12-17 21:15:05 -05:00
Orion Henry
1739a7e7b1 encode/decode sync in wasm 2021-12-17 21:14:16 -05:00
Andrew Jeffery
c5f6ffc4cd Fix wasm build 2021-12-17 23:36:38 +00:00
Orion Henry
90244236c3 move important items out of legacy 2021-12-17 11:33:05 -05:00
Orion Henry
6b517b9894 move things we need out of legacy 2021-12-17 11:04:35 -05:00
Orion Henry
db3a43c5b6 import protocol into legacy 2021-12-16 20:39:08 -05:00
Orion Henry
26ccaf63cc readme and new tests 2021-12-15 19:07:39 -05:00
Orion Henry
89a2e4a0fa remove old seq_scan code 2021-12-13 07:45:38 -05:00
Orion Henry
a1a7e42dfa remove begin - make tx implicit 2021-12-12 12:51:27 -08:00
Orion Henry
406a20707f seek_op, inc test, logging 2021-12-12 09:27:51 -08:00
Orion Henry
e2b63ca102 adding text() and splice_text() 2021-12-10 15:20:19 -08:00
Orion Henry
670de06bdf rework op_set query system 2021-12-10 15:35:51 -05:00
Orion Henry
3ba7e2fb7f make length fast - fix bug in index 2021-12-07 15:00:21 -05:00
Orion Henry
bbfb2337d5 save_incremental() 2021-12-06 15:23:18 -05:00
Orion Henry
0cc815ef74 move query logic into trait, format 2021-12-06 11:09:08 -05:00
Orion Henry
70b482b827 go faster 2021-12-03 21:56:59 -08:00
Orion Henry
8ffccd96bc cleanup and op_tree 2021-11-29 19:08:32 -08:00
Orion Henry
a87fc3c1d3 profiling and seq_tree 2021-11-29 17:27:47 -07:00
Orion Henry
7a159e293c wasm-opt isnt supported on this platform 2021-11-28 10:09:26 -07:00
Orion Henry
c3328997a6 inc() 2021-11-26 21:26:35 -05:00
Orion Henry
a4c04247eb simple cleanup 2021-11-26 12:01:41 -05:00
Orion Henry
6a5aa75c78 move set is insert behavior out of backend 2021-11-19 21:52:54 -05:00
Orion Henry
288f214964 start on encode/decode 2021-11-19 14:44:20 -05:00
Orion Henry
c1d33386bf out of order changes handled 2021-11-19 11:43:37 -05:00
Orion Henry
a0b8a6cfe3 load() 2021-11-17 15:59:23 -05:00
Orion Henry
efce75558e rework the api to be set(), insert(), inc(), del() 2021-11-17 13:27:52 -05:00
Orion Henry
e4bffe9ddc 108/123 tests passing 2021-11-16 18:35:21 -05:00
Orion Henry
8a980d5340 list tests passing 2021-11-16 16:12:50 -05:00
Orion Henry
d396cd17eb more tests passing 2021-11-13 00:04:43 -05:00
Orion Henry
94f6855390 make in lists 2021-11-12 23:48:31 -05:00
Orion Henry
112a5bc8f1 getConflicts, getHistory 2021-11-12 16:03:57 -05:00
Orion Henry
cde3ac95f1 more tests 2021-11-12 12:39:18 -05:00
Orion Henry
ab5565481e applyChanges 2021-11-11 18:40:19 -05:00
Orion Henry
db4456497f cleanup 2021-11-08 12:56:32 -05:00