Commit graph

21 commits

Author SHA1 Message Date
Alex Good
becc301877
automerge-wasm@0.1.19 & automerge-js@2.0.1-alpha.2 2022-12-02 15:10:24 +00:00
Alex Good
de16adbcc5 Explicity create empty changes
Transactions with no ops in them are generally undesirable. They take up
space in the change log but do nothing else. They are not useless
though, it may occasionally be necessary to create an empty change in
order to list all the current heads of the document as dependents of the
empty change.

The current API makes no distinction between empty changes and non-empty
changes. If the user calls `Transaction::commit` a change is created
regardless of whether there are ops to commit. To provide a more useful
API modify `commit` so that if there is a no-op transaction then no
changes are created, but provide explicit methods to create an empty
change via `Transaction::empty_change`, `Automerge::empty_change` and
`Autocommit::empty_change`. Also make these APIs available in Javascript
and C.
2022-12-02 12:12:54 +00:00
Alex Good
01350c2b3f
automerge-wasm@0.1.18 and automerge@2.0.1-alpha.1 2022-11-22 19:37:01 +00:00
Alex Good
bbf729e1d6
@automerge/automerge 2.0.0 2022-11-22 12:13:42 +00:00
Orion Henry
ca25ed0ca0
automerge-wasm: Use a SequenceTree in the OpObserver
Generating patches to text objects (a la the edit-trace benchmark) was
very slow due to appending to the back of a Vec. Use the SequenceTree
(effectively a B-tree) instead so as to speed up sequence patch
generation.
2022-11-22 12:13:42 +00:00
Alex Good
03b3da203d
@automerge/automerge-wasm 0.1.16 2022-11-22 00:02:28 +00:00
Alex Good
e713c35d21
Fix some typescript errors 2022-11-21 18:26:28 +00:00
Alex Good
bba4fe2c36
@automerge/automerge@2.0.0-beta.4 2022-10-28 11:31:51 +01:00
Alex Good
61aaa52718 Allow changing a cloned document
The logic for `clone` which was updated to support cloning a viewed
document inadverantly left the heads of the cloned document state in
place, which meant that cloned documents could not be `change`d. Set
state.heads to undefined when cloning to allow changing them.
2022-10-27 19:20:41 +01:00
Alex Good
20d543d28d
@automerge/automerge@2.0.0-beta.3 2022-10-26 14:14:01 +01:00
Alex Good
5adb6952e9
@automerge/automerge@2.0.0-beta.2 and @automerge/automerge-wasm@0.1.15 2022-10-26 14:03:12 +01:00
Orion Henry
3705212747
js: Add Automerge.clone(_, heads) and Automerge.view
Sometimes you need a cheap copy of a document at a given set of heads
just so you can see what has changed. Cloning the document to do this is
quite expensive when you don't need a writable copy. Add automerge.view
to allow a cheap read only copy of a document at a given set of heads
and add an additional heads argument to clone for when you do want a
writable copy.
2022-10-26 14:01:11 +01:00
Orion Henry
d7d2916acb tiny change that might remove a bloom filter false positive error 2022-10-21 15:15:30 -05:00
Alex Good
3482e06b15
javascript 2.0.0-beta1 2022-10-18 19:43:46 +01:00
Orion Henry
59289f67b1 consolidate inserts and deletes more aggressivly into a single splice 2022-10-18 13:29:56 +01:00
Orion Henry
38205fbcc2 enableFreeze() instead of implicit freeze 2022-10-17 17:35:34 -05:00
Orion Henry
ac90f8f028 Merge remote-tracking branch 'origin/freeze' into f2 2022-10-17 16:21:35 -05:00
Alex Good
1c6da6f9a3
Add JS worker config to Vite app example
Vite apps which use SharedWorker of WebWorker require additional
configuration to get WebAssembly imports to work effectively, add these
to the example.
2022-10-17 01:09:13 +01:00
Alex Good
24dcf8270a
Add typedoc comments to the entire public JS API 2022-10-17 00:41:06 +01:00
Alex Good
e189ec9ca8
Add some READMEs to the javascript directory 2022-10-16 20:01:49 +01:00
Alex Good
8e131922e7
Move wrappers/javascript -> javascript
Continuing our theme of treating all languages equally, move
wrappers/javascript to javascrpit. Automerge libraries for new languages
should be built at this top level if possible.
2022-10-16 19:55:54 +01:00