Skip to content

Commit

Permalink
Update vue, yarn.
Browse files Browse the repository at this point in the history
Add range fix. (#27)
  • Loading branch information
logue committed May 20, 2024
1 parent e96b8d3 commit 31d6312
Show file tree
Hide file tree
Showing 5 changed files with 544 additions and 541 deletions.
593 changes: 297 additions & 296 deletions .yarn/releases/yarn-4.1.1.cjs → .yarn/releases/yarn-4.2.2.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.1.1.cjs
yarnPath: .yarn/releases/yarn-4.2.2.cjs
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"engines": {
"yarn": ">=1.22.19"
},
"packageManager": "yarn@4.1.1",
"packageManager": "yarn@4.2.2",
"sideEffects": false,
"scripts": {
"dev": "vite",
Expand Down Expand Up @@ -83,42 +83,42 @@
"@codemirror/lang-json": "^6.0.1",
"@codemirror/lang-markdown": "^6.2.5",
"@codemirror/lang-vue": "0.1.2",
"@eslint/js": "^9.1.1",
"@eslint/js": "^9.3.0",
"@tsconfig/node-lts": "^20.1.3",
"@types/node": "^20.12.7",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@types/node": "^20.12.12",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/compiler-sfc": "^3.4.26",
"@vue/compiler-sfc": "^3.4.27",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/tsconfig": "^0.5.1",
"@vueuse/core": "^10.9.0",
"bootstrap": "^5.3.3",
"eslint": "^9.1.1",
"eslint": "^9.3.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-linter-browserify": "^9.1.1",
"eslint-linter-browserify": "^9.3.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-vue": "^9.25.0",
"eslint-plugin-vue": "^9.26.0",
"eslint-plugin-vuejs-accessibility": "^2.3.0",
"eslint-plugin-yaml": "^0.5.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"npm-run-all": "^4.1.5",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"rimraf": "^5.0.7",
"rollup-plugin-visualizer": "^5.12.0",
"sass": "^1.75.0",
"sass": "^1.77.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.8.0",
"vite": "^5.2.10",
"typescript-eslint": "^7.9.0",
"vite": "^5.2.11",
"vite-plugin-banner": "^0.7.1",
"vite-plugin-checker": "^0.6.4",
"vite-plugin-dts": "^3.9.0",
"vue": "^3.4.26",
"vite-plugin-dts": "^3.9.1",
"vue": "^3.4.27",
"vue-eslint-parser": "^9.4.2",
"vue-markdown-wasm": "^0.4.0",
"vue-tsc": "^2.0.14"
"vue-tsc": "^2.0.19"
},
"husky": {
"hooks": {
Expand Down
10 changes: 10 additions & 0 deletions src/components/CodeMirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,16 @@ export default defineComponent({
return;
}

// Range Fix ?
// https://github.com/logue/vue-codemirror6/issues/27
if (
!selection.value.ranges.every(
range => range.anchor < value.length && range.head < value.length
)
) {
return;
}

// Update
view.value.dispatch({
changes: { from: 0, to: view.value.state.doc.length, insert: value },
Expand Down
Loading

0 comments on commit 31d6312

Please sign in to comment.