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

@automerge/automerge-codemirror

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@automerge/automerge-codemirror - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

2

dist/codeMirrorToAm.js

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

import { unstable as am } from "@automerge/automerge";
import { next as am } from "@automerge/automerge";
export default function (field, update, transactions, state) {

@@ -3,0 +3,0 @@ const { lastHeads, path } = state.field(field);

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

import * as automerge from "@automerge/automerge";
import { next as automerge } from "@automerge/automerge";
import { EditorView } from "@codemirror/view";

@@ -3,0 +3,0 @@ import { Field } from "./plugin";

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

import * as automerge from "@automerge/automerge";
import { next as automerge } from "@automerge/automerge";
import codeMirrorToAm from "./codeMirrorToAm";

@@ -37,3 +37,7 @@ import amToCodemirror from "./amToCodemirror";

// now apply the unreconciled transactions to the document
const newHeads = codeMirrorToAm(this._field, change, transactions, view.state);
let newHeads = codeMirrorToAm(this._field, change, transactions, view.state);
// NOTE: null and undefined each come from automerge and repo respectively
if (newHeads === null || newHeads === undefined) {
newHeads = automerge.getHeads(doc);
}
// now get the diff between the updated state of the document and the heads

@@ -40,0 +44,0 @@ // and apply that to the codemirror doc

{
"name": "@automerge/automerge-codemirror",
"version": "0.0.4",
"version": "0.0.5",
"main": "dist/index.js",

@@ -17,8 +17,9 @@ "license": "MIT",

"dependencies": {
"@automerge/automerge": "^2.1.0-alpha.7",
"@automerge/automerge": "^2.1.3",
"@codemirror/state": "^6.2.1",
"@codemirror/view": "^6.13.2",
"@codemirror/view": "6.13.2",
"codemirror": "^6.0.1"
},
"devDependencies": {
"@automerge/automerge-repo": "^1.0.6",
"@cypress/react18": "^2.0.0",

@@ -25,0 +26,0 @@ "@typescript-eslint/eslint-plugin": "^5.60.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