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

@automerge/automerge

Package Overview
Dependencies
Maintainers
4
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@automerge/automerge - npm Package Compare versions

Comparing version 2.0.1-alpha.3 to 2.0.1-alpha.4

2

dist/cjs/constants.js

@@ -7,3 +7,3 @@ "use strict";

exports.TRACE = Symbol.for("_am_trace"); // used for debugging
exports.OBJECT_ID = Symbol.for("_am_objectId"); // synbol used to hide the object id on automerge objects
exports.OBJECT_ID = Symbol.for("_am_objectId"); // symbol used to hide the object id on automerge objects
exports.IS_PROXY = Symbol.for("_am_isProxy"); // symbol used to test if the document is a proxy object

@@ -10,0 +10,0 @@ exports.UINT = Symbol.for("_am_uint");

@@ -6,2 +6,3 @@ "use strict";

for (const k in api) {
;
exports.ApiHandler[k] = api[k];

@@ -8,0 +9,0 @@ }

"use strict";
// Convience classes to allow users to stricly specify the number type they want
// Convenience classes to allow users to strictly specify the number type they want
Object.defineProperty(exports, "__esModule", { value: true });

@@ -4,0 +4,0 @@ exports.Float64 = exports.Uint = exports.Int = void 0;

@@ -1,2 +0,2 @@

import { Automerge, ObjID, Prop } from "@automerge/automerge-wasm";
import { Automerge, type ObjID, type Prop } from "@automerge/automerge-wasm";
/**

@@ -3,0 +3,0 @@ * The most basic CRDT: an integer value that can be changed only by

@@ -1,3 +0,3 @@

import { ObjID, Heads, Automerge } from "@automerge/automerge-wasm";
import { type Doc, PatchCallback } from "./types";
import { type ObjID, type Heads, Automerge } from "@automerge/automerge-wasm";
import type { Doc, PatchCallback } from "./types";
export interface InternalState<T> {

@@ -4,0 +4,0 @@ handle: Automerge;

@@ -1,4 +0,4 @@

export { ChangeToEncode } from "@automerge/automerge-wasm";
import { API } from "@automerge/automerge-wasm";
import { type API } from "@automerge/automerge-wasm";
export type { ChangeToEncode } from "@automerge/automerge-wasm";
export declare function UseApi(api: API): void;
export declare const ApiHandler: API;
// Properties of the document root object
export const STATE = Symbol.for("_am_meta"); // symbol used to hide application metadata on automerge objects
export const TRACE = Symbol.for("_am_trace"); // used for debugging
export const OBJECT_ID = Symbol.for("_am_objectId"); // synbol used to hide the object id on automerge objects
export const OBJECT_ID = Symbol.for("_am_objectId"); // symbol used to hide the object id on automerge objects
export const IS_PROXY = Symbol.for("_am_isProxy"); // symbol used to test if the document is a proxy object

@@ -6,0 +6,0 @@ export const UINT = Symbol.for("_am_uint");

export function UseApi(api) {
for (const k in api) {
;
ApiHandler[k] = api[k];

@@ -4,0 +5,0 @@ }

@@ -1,2 +0,2 @@

// Convience classes to allow users to stricly specify the number type they want
// Convenience classes to allow users to strictly specify the number type they want
import { INT, UINT, F64 } from "./constants";

@@ -3,0 +3,0 @@ export class Int {

@@ -16,3 +16,3 @@ var __rest = (this && this.__rest) || function (s, e) {

import { STATE } from "./constants";
import { Counter } from "./types";
import { Counter, } from "./types";
export { Counter, Int, Uint, Float64, Text, } from "./types";

@@ -19,0 +19,0 @@ import { Text } from "./text";

@@ -1,2 +0,2 @@

export { Counter, Int, Uint, Float64 } from "./types";
export { Counter, Int, Uint, Float64, } from "./types";
export { view, free, getHeads, change, emptyChange, loadIncremental, save, merge, getActorId, getLastLocalChange, getChanges, getAllChanges, applyChanges, getHistory, equals, encodeSyncState, decodeSyncState, generateSyncMessage, receiveSyncMessage, initSyncState, encodeChange, decodeChange, encodeSyncMessage, decodeSyncMessage, getMissingDeps, dump, toJS, isAutomerge, getObjectId, } from "./stable";

@@ -3,0 +3,0 @@ import * as stable from "./stable";

@@ -1,4 +0,3 @@

import { Automerge, Heads, ObjID } from "@automerge/automerge-wasm";
import { Prop } from "@automerge/automerge-wasm";
import { MapValue, ListValue, TextValue } from "./types";
import { Automerge, type Heads, type ObjID, type Prop } from "@automerge/automerge-wasm";
import type { MapValue, ListValue, TextValue } from "./types";
export declare function mapProxy(context: Automerge, objectId: ObjID, textV2: boolean, path?: Prop[], readonly?: boolean, heads?: Heads): MapValue;

@@ -5,0 +4,0 @@ export declare function listProxy(context: Automerge, objectId: ObjID, textV2: boolean, path?: Prop[], readonly?: boolean, heads?: Heads): ListValue;

/** @hidden **/
export { /** @hidden */ uuid } from "./uuid";
import { AutomergeValue, Doc, PatchCallback } from "./types";
export { AutomergeValue, Counter, Doc, Int, Uint, Float64, Patch, PatchCallback, ScalarValue, Text, } from "./types";
import { type API } from "@automerge/automerge-wasm";
export { PutPatch, DelPatch, SplicePatch, IncPatch, SyncMessage, } from "@automerge/automerge-wasm";
import { ChangeToEncode } from "./low_level";
import { Actor as ActorId, Prop, ObjID, Change, DecodedChange, Heads, Automerge, MaterializeValue } from "@automerge/automerge-wasm";
import { JsSyncState as SyncState, SyncMessage, DecodedSyncMessage } from "@automerge/automerge-wasm";
import { type AutomergeValue, type Doc, type PatchCallback } from "./types";
export { type AutomergeValue, Counter, type Doc, Int, Uint, Float64, type Patch, type PatchCallback, type ScalarValue, Text, } from "./types";
import type { API, Actor as ActorId, Prop, ObjID, Change, DecodedChange, Heads, MaterializeValue, JsSyncState as SyncState, SyncMessage, DecodedSyncMessage } from "@automerge/automerge-wasm";
export type { PutPatch, DelPatch, SplicePatch, IncPatch, SyncMessage, } from "@automerge/automerge-wasm";
import { type ChangeToEncode } from "./low_level";
import { Automerge } from "@automerge/automerge-wasm";
/** Options passed to {@link change}, and {@link emptyChange}

@@ -11,0 +10,0 @@ * @typeParam T - The type of value contained in the document

@@ -1,2 +0,4 @@

import { Value } from "@automerge/automerge-wasm";
import type { Value } from "@automerge/automerge-wasm";
import { STATE } from "./constants";
import type { InternalState } from "./internal_state";
export declare class Text {

@@ -6,2 +8,3 @@ elems: Array<any>;

spans: Array<any> | undefined;
[STATE]?: InternalState<any>;
constructor(text?: string | string[] | Value[]);

@@ -68,4 +71,4 @@ get length(): number;

slice(start?: number, end?: number): void;
some(test: (Value: any) => boolean): boolean;
some(test: (arg: Value) => boolean): boolean;
toLocaleString(): void;
}

@@ -39,3 +39,3 @@ /**

import { Counter } from "./types";
export { Counter, Doc, Int, Uint, Float64, Patch, PatchCallback } from "./types";
export { Counter, type Doc, Int, Uint, Float64, type Patch, type PatchCallback, } from "./types";
import type { PatchCallback } from "./stable";

@@ -53,3 +53,3 @@ export type AutomergeValue = ScalarValue | {

};
export { PutPatch, DelPatch, SplicePatch, IncPatch, SyncMessage, } from "@automerge/automerge-wasm";
export type { PutPatch, DelPatch, SplicePatch, IncPatch, SyncMessage, } from "@automerge/automerge-wasm";
export type { ChangeOptions, ApplyOptions, ChangeFn } from "./stable";

@@ -56,0 +56,0 @@ export { view, free, getHeads, change, emptyChange, loadIncremental, save, merge, getActorId, getLastLocalChange, getChanges, getAllChanges, applyChanges, getHistory, equals, encodeSyncState, decodeSyncState, generateSyncMessage, receiveSyncMessage, initSyncState, encodeChange, decodeChange, encodeSyncMessage, decodeSyncMessage, getMissingDeps, dump, toJS, isAutomerge, getObjectId, } from "./stable";

@@ -7,3 +7,3 @@ {

],
"version": "2.0.1-alpha.3",
"version": "2.0.1-alpha.4",
"description": "Javascript implementation of automerge, backed by @automerge/automerge-wasm",

@@ -29,2 +29,4 @@ "homepage": "https://github.com/automerge/automerge-rs/tree/main/wrappers/javascript",

"test": "ts-mocha test/*.ts",
"deno:build": "denoify && node ./scripts/deno-prefixer.mjs",
"deno:test": "deno test ./deno-tests/deno.ts --allow-read --allow-net",
"watch-docs": "typedoc src/index.ts --watch --readme none"

@@ -38,2 +40,3 @@ },

"@typescript-eslint/parser": "^5.46.0",
"denoify": "^1.4.5",
"eslint": "^8.29.0",

@@ -40,0 +43,0 @@ "fast-sha256": "^1.3.0",

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