cypher-codemirror
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -8,3 +8,3 @@ { | ||
], | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"author": "Neo Technology Inc.", | ||
@@ -50,3 +50,3 @@ "license": "GPL-3.0", | ||
"dependencies": { | ||
"cypher-editor-support": "1.0.8" | ||
"cypher-editor-support": "1.0.9" | ||
}, | ||
@@ -53,0 +53,0 @@ "peerDependencies": { |
@@ -58,3 +58,4 @@ /* | ||
if (!editorSupport) return []; | ||
editorSupport.update(text); | ||
const version = editor.newContentVersion(); | ||
editorSupport.update(text, version); | ||
@@ -106,2 +107,8 @@ fixColors(editor, editorSupport); | ||
editor.editorSupport = editorSupport; | ||
editor.version = 1; | ||
editor.newContentVersion = function newContentVersion() { | ||
this.version += 1; | ||
return this.version; | ||
}; | ||
editor.newContentVersion.bind(editor); | ||
editor.setValue(settings.value || ''); | ||
@@ -108,0 +115,0 @@ |
@@ -64,4 +64,23 @@ /* | ||
this.editor = editor; | ||
this.editor.on('change', triggerAutocompletion); | ||
this.editorSupport = editorSupport; | ||
this.editor.on('change', triggerAutocompletion); | ||
this.editorSupport.on('updated', () => { | ||
console.log('UPDATED - this.editorSupport.version: ', this.editorSupport.version); | ||
console.table(this.editorSupport.queriesAndCommands.map(stmt => stmt.getText())); | ||
}); | ||
this.editorSupport.on('update', () => { | ||
console.log('UPDATE - this.editor.version: ', this.editor.version); | ||
console.log('UPDATE - this.editorSupport.version: ', this.editorSupport.version); | ||
this.editorSupport | ||
.ensureVersion(this.editor.version) | ||
.then(() => { | ||
console.log('ENSURE OK - this.editor.version: ', this.editor.version); | ||
console.log('ENSURE OK - this.editorSupport.version: ', this.editorSupport.version); | ||
}) | ||
.catch(() => { | ||
console.error('Version not found'); | ||
console.log('ENSURE ERROR - this.editor.version: ', this.editor.version); | ||
console.log('ENSURE ERROR - this.editorSupport.version: ', this.editorSupport.version); | ||
}); | ||
}); | ||
this.editorSupport.setSchema(this.schema); | ||
@@ -68,0 +87,0 @@ } |
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 too big to display
Sorry, the diff of this file is not supported yet
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
5721265
35563
+ Addedcypher-editor-support@1.0.9(transitive)
- Removedcypher-editor-support@1.0.8(transitive)
Updatedcypher-editor-support@1.0.9