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

manymerge

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

manymerge - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

2

dist/hub.d.ts

@@ -8,3 +8,3 @@ import { Doc } from "automerge";

*/
export default class Hub {
export declare class Hub {
_theirClocks: Map<string, Clock>;

@@ -11,0 +11,0 @@ _broadcast: (msg: Message) => void;

@@ -82,2 +82,2 @@ "use strict";

}
exports.default = Hub;
exports.Hub = Hub;

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

const peerSendMsg = jest.fn();
const peer = new peer_1.default(peerSendMsg);
const peer = new peer_1.Peer(peerSendMsg);
// send an update

@@ -22,3 +22,3 @@ peer.notify(automerge_1.change(automerge_1.init(), doc => {

const hubBroadcastMsg = jest.fn();
const hub = new hub_1.default(hubSendMsg, hubBroadcastMsg);
const hub = new hub_1.Hub(hubSendMsg, hubBroadcastMsg);
const newDoc = hub.applyMessage("my-peer", clientMsg, automerge_1.init());

@@ -36,3 +36,3 @@ // We received and applied changes to the doc

const hubBroadcastMsg = jest.fn();
const hub = new hub_1.default(hubSendMsg, hubBroadcastMsg);
const hub = new hub_1.Hub(hubSendMsg, hubBroadcastMsg);
/**

@@ -56,3 +56,3 @@ * Hub broadcasts doc to unknown peer

const peerSendMsg = jest.fn();
const peer = new peer_1.default(peerSendMsg);
const peer = new peer_1.Peer(peerSendMsg);
const peerDoc = automerge_1.init();

@@ -93,3 +93,3 @@ peer.applyMessage(broadcastMsg, peerDoc);

const hubBroadcastMsg = jest.fn();
const hub = new hub_1.default(hubSendMsg, hubBroadcastMsg);
const hub = new hub_1.Hub(hubSendMsg, hubBroadcastMsg);
// We do this to register a peer

@@ -108,3 +108,3 @@ hub.applyMessage("our-peer", { clock: immutable_1.Map() }, automerge_1.init());

const peerSendMsgFn = jest.fn();
const peer = new peer_1.default(peerSendMsgFn);
const peer = new peer_1.Peer(peerSendMsgFn);
// First, we send a doc to the hub from the peer

@@ -117,3 +117,3 @@ // and they agree

const hubBroadcastMsg = jest.fn();
const hub = new hub_1.default(hubSendMsg, hubBroadcastMsg);
const hub = new hub_1.Hub(hubSendMsg, hubBroadcastMsg);
let hubDoc = automerge_1.from({ body: "my body" });

@@ -120,0 +120,0 @@ // hub gets message from peer which applies title

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

import hub from "./hub";
import peer from "./peer";
export declare const Hub: typeof hub;
export declare const Peer: typeof peer;
export { Hub } from "./hub";
export { Peer } from "./peer";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const hub_1 = require("./hub");
const peer_1 = require("./peer");
exports.Hub = hub_1.default;
exports.Peer = peer_1.default;
var hub_1 = require("./hub");
exports.Hub = hub_1.Hub;
var peer_1 = require("./peer");
exports.Peer = peer_1.Peer;

@@ -8,3 +8,3 @@ import { Doc } from "automerge";

*/
export default class Peer {
export declare class Peer {
_theirClock: Map<string, number>;

@@ -11,0 +11,0 @@ _sendMsg: (msg: Message) => void;

@@ -65,2 +65,2 @@ "use strict";

}
exports.default = Peer;
exports.Peer = Peer;

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

const clientSendMsg = jest.fn();
const client = new peer_1.default(clientSendMsg);
const client = new peer_1.Peer(clientSendMsg);
// send an update

@@ -19,3 +19,3 @@ client.notify(automerge_1.change(automerge_1.init(), doc => {

const serverSendMsg = jest.fn();
const server = new peer_1.default(serverSendMsg);
const server = new peer_1.Peer(serverSendMsg);
server.applyMessage(clientMsg, automerge_1.init());

@@ -22,0 +22,0 @@ // We don't need to send anything back in this case.

{
"name": "manymerge",
"version": "2.0.2",
"version": "2.0.3",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "author": "Evan Conrad",

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