Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

loro-crdt

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loro-crdt - npm Package Compare versions

Comparing version 0.11.1 to 0.12.0

11

CHANGELOG.md
# Changelog
## 0.12.0
### Minor Changes
- Add getParent and getOrCreate
### Patch Changes
- Updated dependencies
- loro-wasm@0.12.0
## 0.11.1

@@ -4,0 +15,0 @@

@@ -141,2 +141,7 @@ import { Value, Container, TreeID, OpId, ContainerID, Delta, LoroText, LoroMap, LoroTree, LoroList } from 'loro-wasm';

interface LoroMap<T extends Record<string, any> = Record<string, any>> {
getOrCreateContainer(key: string, container_type: "Map"): LoroMap;
getOrCreateContainer(key: string, container_type: "List"): LoroList;
getOrCreateContainer(key: string, container_type: "Text"): LoroText;
getOrCreateContainer(key: string, container_type: "Tree"): LoroTree;
getOrCreateContainer(key: string, container_type: string): never;
setContainer(key: string, container_type: "Map"): LoroMap;

@@ -143,0 +148,0 @@ setContainer(key: string, container_type: "List"): LoroList;

4

package.json
{
"name": "loro-crdt",
"version": "0.11.1",
"version": "0.12.0",
"description": "Loro CRDTs is a high-performance CRDT framework that makes your app state synchronized, collaborative and maintainable effortlessly.",

@@ -20,3 +20,3 @@ "keywords": [

"dependencies": {
"loro-wasm": "0.11.1"
"loro-wasm": "0.12.0"
},

@@ -23,0 +23,0 @@ "devDependencies": {

export * from "loro-wasm";
import { Container, Delta, LoroText, LoroTree,LoroTreeNode, OpId, Value, ContainerID, Loro, LoroList, LoroMap, TreeID } from "loro-wasm";
import {
Container,
Delta,
LoroText,
LoroTree,
LoroTreeNode,
OpId,
Value,
ContainerID,
Loro,
LoroList,
LoroMap,
TreeID,
} from "loro-wasm";
Loro.prototype.getTypedMap = function (...args) {

@@ -39,6 +51,6 @@ return this.getMap(...args);

* The path is composed of numbers (e.g., indices of a list container) strings
* (e.g., keys of a map container) and TreeID (the node of a tree container),
* (e.g., keys of a map container) and TreeID (the node of a tree container),
* indicating the absolute position of the event's source within a loro document.
*/
export type Path = (number | string | TreeID )[];
export type Path = (number | string | TreeID)[];

@@ -99,5 +111,6 @@ /**

export type TreeDiffItem = { target: TreeID; action: "create"; parent: TreeID | undefined }
| { target: TreeID; action: "delete" }
| { target: TreeID; action: "move"; parent: TreeID | undefined };
export type TreeDiffItem =
| { target: TreeID; action: "create"; parent: TreeID | undefined }
| { target: TreeID; action: "delete" }
| { target: TreeID; action: "move"; parent: TreeID | undefined };

@@ -217,2 +230,8 @@ export type TreeDiff = {

interface LoroMap<T extends Record<string, any> = Record<string, any>> {
getOrCreateContainer(key: string, container_type: "Map"): LoroMap;
getOrCreateContainer(key: string, container_type: "List"): LoroList;
getOrCreateContainer(key: string, container_type: "Text"): LoroText;
getOrCreateContainer(key: string, container_type: "Tree"): LoroTree;
getOrCreateContainer(key: string, container_type: string): never;
setContainer(key: string, container_type: "Map"): LoroMap;

@@ -247,3 +266,3 @@ setContainer(key: string, container_type: "List"): LoroList;

interface LoroTreeNode{
interface LoroTreeNode {
readonly data: LoroMap;

@@ -250,0 +269,0 @@ createNode(): LoroTreeNode;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc