@automerge/automerge-codemirror
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -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", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
10695
251
15
1
+ Added@codemirror/view@6.13.2(transitive)
- Removed@codemirror/view@6.35.3(transitive)
Updated@automerge/automerge@^2.1.3
Updated@codemirror/view@6.13.2