Skip to content

Commit 31d6312

Browse files
committed
Update vue, yarn.
Add range fix. (#27)
1 parent e96b8d3 commit 31d6312

File tree

5 files changed

+544
-541
lines changed

5 files changed

+544
-541
lines changed

.yarn/releases/yarn-4.1.1.cjs renamed to .yarn/releases/yarn-4.2.2.cjs

Lines changed: 297 additions & 296 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ enableGlobalCache: false
44

55
nodeLinker: node-modules
66

7-
yarnPath: .yarn/releases/yarn-4.1.1.cjs
7+
yarnPath: .yarn/releases/yarn-4.2.2.cjs

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"engines": {
5656
"yarn": ">=1.22.19"
5757
},
58-
"packageManager": "yarn@4.1.1",
58+
"packageManager": "yarn@4.2.2",
5959
"sideEffects": false,
6060
"scripts": {
6161
"dev": "vite",
@@ -83,42 +83,42 @@
8383
"@codemirror/lang-json": "^6.0.1",
8484
"@codemirror/lang-markdown": "^6.2.5",
8585
"@codemirror/lang-vue": "0.1.2",
86-
"@eslint/js": "^9.1.1",
86+
"@eslint/js": "^9.3.0",
8787
"@tsconfig/node-lts": "^20.1.3",
88-
"@types/node": "^20.12.7",
89-
"@typescript-eslint/eslint-plugin": "^7.8.0",
88+
"@types/node": "^20.12.12",
89+
"@typescript-eslint/eslint-plugin": "^7.9.0",
9090
"@vitejs/plugin-vue": "^5.0.4",
91-
"@vue/compiler-sfc": "^3.4.26",
91+
"@vue/compiler-sfc": "^3.4.27",
9292
"@vue/eslint-config-prettier": "^9.0.0",
9393
"@vue/tsconfig": "^0.5.1",
9494
"@vueuse/core": "^10.9.0",
9595
"bootstrap": "^5.3.3",
96-
"eslint": "^9.1.1",
96+
"eslint": "^9.3.0",
9797
"eslint-import-resolver-alias": "^1.1.2",
9898
"eslint-import-resolver-typescript": "^3.6.1",
99-
"eslint-linter-browserify": "^9.1.1",
99+
"eslint-linter-browserify": "^9.3.0",
100100
"eslint-plugin-import": "^2.29.1",
101101
"eslint-plugin-tsdoc": "^0.2.17",
102-
"eslint-plugin-vue": "^9.25.0",
102+
"eslint-plugin-vue": "^9.26.0",
103103
"eslint-plugin-vuejs-accessibility": "^2.3.0",
104104
"eslint-plugin-yaml": "^0.5.0",
105105
"husky": "^9.0.11",
106106
"lint-staged": "^15.2.2",
107107
"npm-run-all": "^4.1.5",
108108
"prettier": "^3.2.5",
109-
"rimraf": "^5.0.5",
109+
"rimraf": "^5.0.7",
110110
"rollup-plugin-visualizer": "^5.12.0",
111-
"sass": "^1.75.0",
111+
"sass": "^1.77.2",
112112
"typescript": "^5.4.5",
113-
"typescript-eslint": "^7.8.0",
114-
"vite": "^5.2.10",
113+
"typescript-eslint": "^7.9.0",
114+
"vite": "^5.2.11",
115115
"vite-plugin-banner": "^0.7.1",
116116
"vite-plugin-checker": "^0.6.4",
117-
"vite-plugin-dts": "^3.9.0",
118-
"vue": "^3.4.26",
117+
"vite-plugin-dts": "^3.9.1",
118+
"vue": "^3.4.27",
119119
"vue-eslint-parser": "^9.4.2",
120120
"vue-markdown-wasm": "^0.4.0",
121-
"vue-tsc": "^2.0.14"
121+
"vue-tsc": "^2.0.19"
122122
},
123123
"husky": {
124124
"hooks": {

src/components/CodeMirror.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,16 @@ export default defineComponent({
458458
return;
459459
}
460460

461+
// Range Fix ?
462+
// https://github.com/logue/vue-codemirror6/issues/27
463+
if (
464+
!selection.value.ranges.every(
465+
range => range.anchor < value.length && range.head < value.length
466+
)
467+
) {
468+
return;
469+
}
470+
461471
// Update
462472
view.value.dispatch({
463473
changes: { from: 0, to: view.value.state.doc.length, insert: value },

0 commit comments

Comments
 (0)