Update dependency versions

Explicitly add "@codemirror/*" packages instead of relying on the "codemirror" sample package.
Update to newer versions for implicit dependencies in in package-lock.json.

This should fix errors in development mode on Windows.
This commit is contained in:
Jonatan Heyman 2023-12-10 12:18:43 +01:00
parent 6886fe9dbe
commit a88f9cc49b
4 changed files with 1428 additions and 668 deletions

2079
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -27,6 +27,7 @@
"build_grammar": "lezer-generator src/editor/lang-heynote/heynote.grammar -o src/editor/lang-heynote/parser.js"
},
"devDependencies": {
"@codemirror/autocomplete": "^6.11.1",
"@codemirror/commands": "^6.3.2",
"@codemirror/lang-cpp": "^6.0.2",
"@codemirror/lang-html": "^6.4.7",
@ -41,18 +42,20 @@
"@codemirror/lang-sql": "^6.5.4",
"@codemirror/lang-xml": "^6.0.2",
"@codemirror/language": "^6.9.3",
"@codemirror/rangeset": "^0.19.9",
"@codemirror/lint": "^6.4.2",
"@codemirror/search": "^6.5.5",
"@codemirror/state": "^6.3.3",
"@codemirror/view": "^6.22.2",
"@electron/asar": "^3.2.2",
"@lezer/generator": "^1.5.1",
"@lezer/markdown": "^1.1.2",
"@rollup/plugin-node-resolve": "^15.0.1",
"@vitejs/plugin-vue": "^4.0.0",
"codemirror": "^6.0.1",
"debounce": "^1.2.1",
"electron": "^22.3.25",
"electron-builder": "^23.6.0",
"electron-builder-notarize": "^1.5.1",
"electron-log": "^5.0.1",
"electron-store": "^8.1.0",
"electron-updater": "^6.1.7",
"fs-jetpack": "^5.1.0",
@ -65,8 +68,5 @@
"vite-plugin-electron-renderer": "^0.11.4",
"vue": "^3.2.45",
"vue-tsc": "^1.0.16"
},
"dependencies": {
"electron-log": "^4.4.8"
}
}

View File

@ -1,7 +1,6 @@
import { ViewPlugin, EditorView, Decoration, WidgetType, lineNumbers } from "@codemirror/view"
import { layer, RectangleMarker } from "@codemirror/view"
import { EditorState, RangeSetBuilder, StateField, Facet , StateEffect} from "@codemirror/state";
import { RangeSet } from "@codemirror/rangeset";
import { EditorState, RangeSetBuilder, StateField, Facet , StateEffect, RangeSet} from "@codemirror/state";
import { syntaxTree, ensureSyntaxTree } from "@codemirror/language"
import { Note, Document, NoteDelimiter } from "../lang-heynote/parser.terms.js"
import { IterMode } from "@lezer/common";
@ -317,7 +316,7 @@ const emitCursorChange = (editor) => ViewPlugin.fromClass(
const langChange = update.transactions.some(tr => tr.annotations.some(a => a.value == LANGUAGE_CHANGE))
if (update.selectionSet || langChange) {
const cursorLine = getBlockLineFromPos(update.state, update.state.selection.main.head)
const selectionSize = update.state.selection.ranges.map(
(sel) => getSelectionSize(update.state, sel)
).reduce((a, b) => a + b, 0)

View File

@ -1,5 +1,5 @@
import { EditorState } from "@codemirror/state";
import { EditorView } from "codemirror";
import { EditorView } from "@codemirror/view";
import { redoDepth } from "@codemirror/commands";
import { getActiveNoteBlock, blockState } from "../block/block";
import { levenshtein_distance } from "./levenshtein";