@automerge/automerge-wasm
Advanced tools
Comparing version 0.12.0 to 0.13.0
@@ -8,5 +8,11 @@ export type Actor = string; | ||
export type Heads = Hash[]; | ||
export type Value = string | number | boolean | null | Date | Uint8Array | ||
export type ScalarValue = string | number | boolean | null | Date | Uint8Array | ||
export type Value = ScalarValue | object | ||
export type MaterializeValue = { [key:string]: MaterializeValue } | Array<MaterializeValue> | Value | ||
export type ObjType = string | Array<ObjType | Value> | { [key: string]: ObjType | Value } | ||
export type MapObjType = { [key: string]: ObjType | Value } | ||
export type ObjInfo = { id: ObjID, type: ObjTypeName, path?: Prop[] }; | ||
export type Span = { type: "text", value: string, "marks"?: MarkSet } | ||
| { type: "block", value: {[key: string]: MaterializeValue} } | ||
export type ListObjType = Array<ObjType | Value> | ||
export type ObjType = string | ListObjType | MapObjType | ||
export type FullValue = | ||
@@ -111,3 +117,3 @@ ["str", string] | | ||
export interface MarkSet { | ||
[name : string]: Value; | ||
[name : string]: ScalarValue; | ||
} | ||
@@ -169,3 +175,3 @@ | ||
name: string, | ||
value: Value, | ||
value: ScalarValue, | ||
start: number, | ||
@@ -213,2 +219,3 @@ end: number, | ||
updateText(obj: ObjID, newText: string): void; | ||
updateSpans(obj: ObjID, newSpans: Span[]): void; | ||
@@ -221,2 +228,8 @@ // marks | ||
// blocks | ||
splitBlock(obj: ObjID, index: number, block: {[key: string]: MaterializeValue}): void; | ||
joinBlock(obj: ObjID, index: number) : void; | ||
updateBlock(obj: ObjID, index: number, block: {[key: string]: MaterializeValue}): void; | ||
getBlock(obj: ObjID, index: number): {[key: string]: MaterializeValue} | null; | ||
diff(before: Heads, after: Heads): Patch[]; | ||
@@ -237,4 +250,6 @@ | ||
getAll(obj: ObjID, arg: Prop, heads?: Heads): FullValueWithId[]; | ||
objInfo(obj: ObjID, heads?: Heads): ObjInfo; | ||
keys(obj: ObjID, heads?: Heads): string[]; | ||
text(obj: ObjID, heads?: Heads): string; | ||
spans(obj: ObjID, heads?: Heads): Span[]; | ||
length(obj: ObjID, heads?: Heads): number; | ||
@@ -254,3 +269,3 @@ materialize(obj?: ObjID, heads?: Heads, metadata?: unknown): MaterializeValue; | ||
enableFreeze(enable: boolean): boolean; | ||
registerDatatype(datatype: string, callback: Function): void; | ||
registerDatatype(datatype: string, construct: Function, deconstruct: (arg: any) => any | undefined): void; | ||
diffIncremental(): Patch[]; | ||
@@ -257,0 +272,0 @@ updateDiffCursor(): void; |
@@ -11,3 +11,3 @@ { | ||
"repository": "github:automerge/automerge", | ||
"version": "0.12.0", | ||
"version": "0.13.0", | ||
"license": "MIT", | ||
@@ -37,3 +37,3 @@ "files": [ | ||
"debug": "cross-env PROFILE=dev TARGET_DIR=debug yarn buildall", | ||
"dev": "cross-env PROFILE=dev TARGET_DIR=debug FEATURES='' TARGET=nodejs yarn target", | ||
"dev": "cross-env PROFILE=dev TARGET_DIR=debug FEATURES='' TARGET=nodejs yarn target && node ./fixup-node-cjs.mjs", | ||
"build": "cross-env PROFILE=dev TARGET_DIR=debug FEATURES='' yarn buildall", | ||
@@ -49,2 +49,3 @@ "release": "cross-env PROFILE=release TARGET_DIR=release yarn buildall", | ||
"devDependencies": { | ||
"@types/assert": "^1.5.10", | ||
"@types/mocha": "^10.0.1", | ||
@@ -51,0 +52,0 @@ "@types/node": "^18.11.13", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 3 instances in 1 package
7500333
8322
3
16