Commit graph

8 commits

Author SHA1 Message Date
Orion Henry
df59eea28a the patch callback is called once with all patches 2022-11-28 15:48:56 -06:00
Orion Henry
81a461f374 add an error message for splicing non-text objects 2022-11-28 15:44:07 -06:00
Orion Henry
d212b60e01 Text v2. JS Api now uses text by default - patch api heavily updated to allow - several concurrency/patch bugs fixed 2022-11-28 15:44:07 -06: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
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
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
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