Andrew Jeffery
63415e3e20
Try fix unused unit lint
2022-03-03 17:51:36 +00:00
Orion Henry
fa13c58cc7
new yarn.lock
2022-01-28 19:51:41 -05:00
Orion Henry
52412ee75a
update mocha
2021-12-15 12:26:21 -05:00
Alex Good
9a421f1f79
Update interop tests to automerge 1.0.1-preview.5
...
This resulted in one failing test which was due to the pending_changes
we report for a patch being incorrectly calculated from missing
dependencies. I've added a test for this failure and fixed it, interop
tests now pass.
2021-10-14 13:40:16 +01:00
Andrew Jeffery
3c786b26a8
Make apply_local_change return ref to change ( #231 )
...
* Make apply_local_change return ref to change
* Remove mut for change
* Document apply_local_changes
2021-07-29 17:41:56 +01:00
Andrew Jeffery
990d2bb4f3
Reduce deflate compression on the hot path ( #186 )
2021-07-13 11:04:39 +01:00
Andrew Jeffery
01159056ef
Add dev command for building wasm backend ( #199 )
...
* Add dev command for building wasm backend
This aims to reduce the time spent building when testing with the wasm
backend. On my machine `yarn release` takes 20s while `yarn dev` takes
just 2s.
* Separate out building wasm
2021-06-29 17:12:24 +01:00
Vedant Roy
892d356001
Fix interop script
2021-06-25 11:06:25 -07:00
Vedant Roy
b307781c8a
Try different commit hash
2021-06-25 11:06:25 -07:00
Vedant Roy
e606937fa0
Update interop tests + review comment
2021-06-25 11:06:25 -07:00
Vedant Roy
aecfcf2c87
Rebase + clippy
2021-06-25 11:06:25 -07:00
Orion Henry
bf3d2447aa
throw a proper error on change decode
2021-06-25 11:06:25 -07:00
Orion Henry
f267064ed5
test the correct repo/commit
2021-06-25 11:06:25 -07:00
Andrew Jeffery
8b3938c2e7
Rename UncompressedChange to Change ( #173 )
...
It wasn't really uncompressed as we have compressed and uncompressed
changes in the backend. It is just not encoded into the binary format.
The module separation (protocol vs backend) should help with the
distinction.
2021-06-16 11:50:26 +01:00
dependabot[bot]
599c619a4d
Bump glob-parent from 5.1.1 to 5.1.2 in /automerge-backend-wasm ( #166 )
...
Bumps [glob-parent](https://github.com/gulpjs/glob-parent ) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases )
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md )
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2 )
---
updated-dependencies:
- dependency-name: glob-parent
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-16 09:59:04 +01:00
Orion Henry
ad3c75ff09
Remove unneeded wasm-opt
2021-06-12 15:01:38 -07:00
Orion Henry
647b8d2af2
fix deflate column decode order
2021-06-12 15:01:38 -07:00
Orion Henry
72d15bfe99
a few things broke in the merge
2021-05-24 16:27:05 -04:00
Andrew Jeffery
8876667a55
Set console_error_panic_hook when initing a backend
2021-05-24 13:19:39 -07:00
Vedant Roy
e694370733
Fix inverted bool + return correct data + remove serde
2021-05-24 13:15:20 -07:00
Vedant Roy
2c51761d01
Implement getAddedChanges
2021-05-24 13:15:20 -07:00
Alex Good
9bbaf7cbd5
Merge branch 'main' into implement-new-sequence-patch-format
2021-05-17 13:03:57 +01:00
Andrew Jeffery
5637956895
Add custom RootDiff type
...
This ensures that the patch starts with the right diff type statically
and will give an error to js during deserialization.
2021-05-16 14:02:57 +01:00
Andrew Jeffery
641fd11703
Change init to new and add defaults ( #130 )
...
Structs should use `new` for the constructor name and implement
`Default` where they can.
2021-05-14 21:35:09 +01:00
Andrew Jeffery
d36149e3ce
Update js hash
2021-05-12 16:16:05 +01:00
dependabot[bot]
560a1c3381
Bump lodash from 4.17.20 to 4.17.21 in /automerge-backend-wasm ( #119 )
...
Bumps [lodash](https://github.com/lodash/lodash ) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases )
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 10:21:33 +01:00
Andrew Jeffery
765c5287d7
Add event handler logic ( #116 )
...
* Add event handlers
Remove partialeq from Backend since I'm not sure of its relevance or
correctness anyway and complicates things with the event handlers.
* Add docs and use id
* Remove partialeq
* Add docs for enum variants
* Check index on remove_handler
* Pass functions through rather than making field pub
2021-05-11 10:15:37 +01:00
Andrew Jeffery
38b285e26e
Update commit hash for interop testing
2021-05-05 21:53:40 +01:00
Andrew Jeffery
3a8447c068
Remove automerge bench harness ( #106 )
...
This removes the default wrapper which throws errors with some cli
arguments, e.g. --save-baseline which is nice for being able to compare
versions!
2021-04-27 10:30:07 +01:00
Andrew Jeffery
d1934f2286
Add formatting config
2021-04-26 09:42:36 -07:00
Andrew Jeffery
6cd2a5f6e4
Cleanup wasm lib and make SyncState somewhat opaque to js
...
This introduces a JsSyncState struct to give js as a handle to a real
syncstate which we want to keep in the wasm memory region to avoid lots
of serde stuff.
Some methods (getters and setters) are needed on this struct as the js
tests look inside but these are not technically specified for end users.
Also, now we can keep it mostly opaque we don't need the custom
serializer, yay!
2021-04-24 14:25:31 -07:00
Andrew Jeffery
de06c92ab7
Bump interop hash and swap sent_hashes set for map in js
...
In Js we don't have nice hashsets so we use an object, in Rust we can
actually use a hashset so we now need to do a conversion.
2021-04-24 14:25:31 -07:00
Andrew Jeffery
b3a7eff559
Use hashset for sent_hashes in js types
2021-04-24 14:25:31 -07:00
Andrew Jeffery
0e9ee417b9
Bump js_tests commit hash
2021-04-24 14:25:31 -07:00
Andrew Jeffery
e3de7d970a
Only store hashes in sync_state rather than the actual changes
2021-04-24 14:25:31 -07:00
Andrew Jeffery
4c7e0c9167
Mutate the SyncState rather than consuming and returning
2021-04-24 14:25:31 -07:00
Andrew Jeffery
90cbbc7cab
Fix ordering of receive_sync_message arguments
2021-04-24 14:25:31 -07:00
Andrew Jeffery
d1df9202c7
js_tests: Update commit hash to use sync-protocol-3 branch
2021-04-24 14:25:31 -07:00
Andrew Jeffery
ffea77f985
Add actual binary types
2021-04-24 14:25:31 -07:00
Andrew Jeffery
d61f1e1c6e
Remove our_need and fix default SyncState
2021-04-24 14:25:31 -07:00
Andrew Jeffery
6c93315d74
Make a new types module and add BinaryChange to get uint8array
2021-04-24 14:25:31 -07:00
Andrew Jeffery
0a377a858b
Catch up with js changes
2021-04-24 14:25:31 -07:00
Andrew Jeffery
f30a14d8f0
Add custom serializer just to get None to map to null
2021-04-24 14:25:31 -07:00
Andrew Jeffery
85f53685e2
Move to binary representation of changes in api
2021-04-24 14:25:31 -07:00
Andrew Jeffery
fd9e01fd9e
Remove unwraps from wasm backend
2021-04-24 14:25:31 -07:00
Andrew Jeffery
68ddb2504e
Improve js interop
2021-04-24 14:25:31 -07:00
Andrew Jeffery
646f88c2d2
Reorder receive_sync_message returns in js
2021-04-24 14:25:31 -07:00
Andrew Jeffery
e1bdf34471
More borrowing
2021-04-24 14:25:31 -07:00
Andrew Jeffery
c5d3572670
Remove unwraps in sync
2021-04-24 14:25:31 -07:00
Andrew Jeffery
84bfb342c8
Swap some arguments in js interface
...
Still need to solve returning backend state from receive_sync_message in
correct order.
2021-04-24 14:25:31 -07:00