mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Upgrade @codemirror
dependencies (#20103)
* Upgrade `@codemirror` dependencies * Set EditorView.EDIT_CONTEXT=false GitOrigin-RevId: 8024715748102a56f1b22e72be8a2019e80b5a07
This commit is contained in:
parent
27e558b484
commit
de8acd2ed8
5 changed files with 55 additions and 47 deletions
84
package-lock.json
generated
84
package-lock.json
generated
|
@ -3375,14 +3375,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@codemirror/commands": {
|
"node_modules/@codemirror/commands": {
|
||||||
"version": "6.4.0",
|
"version": "6.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.6.0.tgz",
|
||||||
"integrity": "sha512-HB3utD5GxCvEhSyj5EuG9KpuQQhFpxalh3lwrspyL/GeSNDe4c6JDxVzL12SJ+7gUknHjZzmq7OPCb9QPgiRmQ==",
|
"integrity": "sha512-qnY+b7j1UNcTS31Eenuc/5YJB6gQOzkUoNmJQc0rznwqSRpeaWWpjkWy2C/MPTcePpsKJEM26hXrOXl1+nceXg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/language": "^6.0.0",
|
"@codemirror/language": "^6.0.0",
|
||||||
"@codemirror/state": "^6.4.0",
|
"@codemirror/state": "^6.4.0",
|
||||||
"@codemirror/view": "^6.0.0",
|
"@codemirror/view": "^6.27.0",
|
||||||
"@lezer/common": "^1.1.0"
|
"@lezer/common": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -3429,9 +3429,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@codemirror/lang-markdown": {
|
"node_modules/@codemirror/lang-markdown": {
|
||||||
"version": "6.2.4",
|
"version": "6.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.2.5.tgz",
|
||||||
"integrity": "sha512-UghkA1vSMs8bT7RSZM6vsIocigyah2bV00eRQuZy76401UmFZdsTsbQNBGdyxRQDOLeEvF5iFwap0BM8LKyd+g==",
|
"integrity": "sha512-Hgke565YcO4fd9pe2uLYxnMufHO5rQwRr+AAhFq8ABuhkrjyX8R5p5s+hZUTdV60O0dMRjxKhBLxz8pu/MkUVA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/autocomplete": "^6.7.1",
|
"@codemirror/autocomplete": "^6.7.1",
|
||||||
|
@ -3444,9 +3444,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@codemirror/language": {
|
"node_modules/@codemirror/language": {
|
||||||
"version": "6.10.0",
|
"version": "6.10.2",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.10.2.tgz",
|
||||||
"integrity": "sha512-2vaNn9aPGCRFKWcHPFksctzJ8yS5p7YoaT+jHpc0UGKzNuAIx4qy6R5wiqbP+heEEdyaABA582mNqSHzSoYdmg==",
|
"integrity": "sha512-kgbTYTo0Au6dCSc/TFy7fK3fpJmgHDv1sG1KNQKJXVi+xBTEeBPY/M30YXiU6mMXeH+YIDLsbrT4ZwNRdtF+SA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/state": "^6.0.0",
|
"@codemirror/state": "^6.0.0",
|
||||||
|
@ -3458,9 +3458,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@codemirror/lint": {
|
"node_modules/@codemirror/lint": {
|
||||||
"version": "6.5.0",
|
"version": "6.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.8.1.tgz",
|
||||||
"integrity": "sha512-+5YyicIaaAZKU8K43IQi8TBy6mF6giGeWAH7N96Z5LC30Wm5JMjqxOYIE9mxwMG1NbhT2mA3l9hA4uuKUM3E5g==",
|
"integrity": "sha512-IZ0Y7S4/bpaunwggW2jYqwLuHj0QtESf5xcROewY6+lDNwZ/NzvR4t+vpYgg9m7V8UXLPYqG+lu3DF470E5Oxg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/state": "^6.0.0",
|
"@codemirror/state": "^6.0.0",
|
||||||
|
@ -3487,9 +3487,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@codemirror/view": {
|
"node_modules/@codemirror/view": {
|
||||||
"version": "6.26.3",
|
"version": "6.32.0",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.26.3.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.32.0.tgz",
|
||||||
"integrity": "sha512-gmqxkPALZjkgSxIeeweY/wGQXBfwTUaLs8h7OKtSwfbj9Ct3L11lD+u1sS7XHppxFQoMDiMDp07P9f3I2jWOHw==",
|
"integrity": "sha512-AgVNvED2QTsZp5e3syoHLsrWtwJFYWdx1Vr/m3f4h1ATQz0ax60CfXF3Htdmk69k2MlYZw8gXesnQdHtzyVmAw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/state": "^6.4.0",
|
"@codemirror/state": "^6.4.0",
|
||||||
|
@ -44690,13 +44690,13 @@
|
||||||
"@babel/preset-typescript": "^7.24.7",
|
"@babel/preset-typescript": "^7.24.7",
|
||||||
"@babel/register": "^7.24.6",
|
"@babel/register": "^7.24.6",
|
||||||
"@codemirror/autocomplete": "github:overleaf/codemirror-autocomplete#v6.18.0-overleaf-1",
|
"@codemirror/autocomplete": "github:overleaf/codemirror-autocomplete#v6.18.0-overleaf-1",
|
||||||
"@codemirror/commands": "^6.4.0",
|
"@codemirror/commands": "^6.6.0",
|
||||||
"@codemirror/lang-markdown": "^6.2.4",
|
"@codemirror/lang-markdown": "^6.2.5",
|
||||||
"@codemirror/language": "^6.10.0",
|
"@codemirror/language": "^6.10.2",
|
||||||
"@codemirror/lint": "^6.5.0",
|
"@codemirror/lint": "^6.8.1",
|
||||||
"@codemirror/search": "github:overleaf/codemirror-search#29f7a871969ad64b89341bacbe5d46dda02eee12",
|
"@codemirror/search": "github:overleaf/codemirror-search#29f7a871969ad64b89341bacbe5d46dda02eee12",
|
||||||
"@codemirror/state": "^6.4.1",
|
"@codemirror/state": "^6.4.1",
|
||||||
"@codemirror/view": "^6.26.3",
|
"@codemirror/view": "^6.32.0",
|
||||||
"@juggle/resize-observer": "^3.3.1",
|
"@juggle/resize-observer": "^3.3.1",
|
||||||
"@lezer/common": "^1.2.1",
|
"@lezer/common": "^1.2.1",
|
||||||
"@lezer/generator": "^1.7.0",
|
"@lezer/generator": "^1.7.0",
|
||||||
|
@ -48468,14 +48468,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@codemirror/commands": {
|
"@codemirror/commands": {
|
||||||
"version": "6.4.0",
|
"version": "6.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.6.0.tgz",
|
||||||
"integrity": "sha512-HB3utD5GxCvEhSyj5EuG9KpuQQhFpxalh3lwrspyL/GeSNDe4c6JDxVzL12SJ+7gUknHjZzmq7OPCb9QPgiRmQ==",
|
"integrity": "sha512-qnY+b7j1UNcTS31Eenuc/5YJB6gQOzkUoNmJQc0rznwqSRpeaWWpjkWy2C/MPTcePpsKJEM26hXrOXl1+nceXg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@codemirror/language": "^6.0.0",
|
"@codemirror/language": "^6.0.0",
|
||||||
"@codemirror/state": "^6.4.0",
|
"@codemirror/state": "^6.4.0",
|
||||||
"@codemirror/view": "^6.0.0",
|
"@codemirror/view": "^6.27.0",
|
||||||
"@lezer/common": "^1.1.0"
|
"@lezer/common": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -48522,9 +48522,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@codemirror/lang-markdown": {
|
"@codemirror/lang-markdown": {
|
||||||
"version": "6.2.4",
|
"version": "6.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.2.5.tgz",
|
||||||
"integrity": "sha512-UghkA1vSMs8bT7RSZM6vsIocigyah2bV00eRQuZy76401UmFZdsTsbQNBGdyxRQDOLeEvF5iFwap0BM8LKyd+g==",
|
"integrity": "sha512-Hgke565YcO4fd9pe2uLYxnMufHO5rQwRr+AAhFq8ABuhkrjyX8R5p5s+hZUTdV60O0dMRjxKhBLxz8pu/MkUVA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@codemirror/autocomplete": "^6.7.1",
|
"@codemirror/autocomplete": "^6.7.1",
|
||||||
|
@ -48537,9 +48537,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@codemirror/language": {
|
"@codemirror/language": {
|
||||||
"version": "6.10.0",
|
"version": "6.10.2",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.10.2.tgz",
|
||||||
"integrity": "sha512-2vaNn9aPGCRFKWcHPFksctzJ8yS5p7YoaT+jHpc0UGKzNuAIx4qy6R5wiqbP+heEEdyaABA582mNqSHzSoYdmg==",
|
"integrity": "sha512-kgbTYTo0Au6dCSc/TFy7fK3fpJmgHDv1sG1KNQKJXVi+xBTEeBPY/M30YXiU6mMXeH+YIDLsbrT4ZwNRdtF+SA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@codemirror/state": "^6.0.0",
|
"@codemirror/state": "^6.0.0",
|
||||||
|
@ -48551,9 +48551,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@codemirror/lint": {
|
"@codemirror/lint": {
|
||||||
"version": "6.5.0",
|
"version": "6.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.8.1.tgz",
|
||||||
"integrity": "sha512-+5YyicIaaAZKU8K43IQi8TBy6mF6giGeWAH7N96Z5LC30Wm5JMjqxOYIE9mxwMG1NbhT2mA3l9hA4uuKUM3E5g==",
|
"integrity": "sha512-IZ0Y7S4/bpaunwggW2jYqwLuHj0QtESf5xcROewY6+lDNwZ/NzvR4t+vpYgg9m7V8UXLPYqG+lu3DF470E5Oxg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@codemirror/state": "^6.0.0",
|
"@codemirror/state": "^6.0.0",
|
||||||
|
@ -48579,9 +48579,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@codemirror/view": {
|
"@codemirror/view": {
|
||||||
"version": "6.26.3",
|
"version": "6.32.0",
|
||||||
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.26.3.tgz",
|
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.32.0.tgz",
|
||||||
"integrity": "sha512-gmqxkPALZjkgSxIeeweY/wGQXBfwTUaLs8h7OKtSwfbj9Ct3L11lD+u1sS7XHppxFQoMDiMDp07P9f3I2jWOHw==",
|
"integrity": "sha512-AgVNvED2QTsZp5e3syoHLsrWtwJFYWdx1Vr/m3f4h1ATQz0ax60CfXF3Htdmk69k2MlYZw8gXesnQdHtzyVmAw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@codemirror/state": "^6.4.0",
|
"@codemirror/state": "^6.4.0",
|
||||||
|
@ -53223,13 +53223,13 @@
|
||||||
"@babel/preset-typescript": "^7.24.7",
|
"@babel/preset-typescript": "^7.24.7",
|
||||||
"@babel/register": "^7.24.6",
|
"@babel/register": "^7.24.6",
|
||||||
"@codemirror/autocomplete": "github:overleaf/codemirror-autocomplete#v6.18.0-overleaf-1",
|
"@codemirror/autocomplete": "github:overleaf/codemirror-autocomplete#v6.18.0-overleaf-1",
|
||||||
"@codemirror/commands": "^6.4.0",
|
"@codemirror/commands": "^6.6.0",
|
||||||
"@codemirror/lang-markdown": "^6.2.4",
|
"@codemirror/lang-markdown": "^6.2.5",
|
||||||
"@codemirror/language": "^6.10.0",
|
"@codemirror/language": "^6.10.2",
|
||||||
"@codemirror/lint": "^6.5.0",
|
"@codemirror/lint": "^6.8.1",
|
||||||
"@codemirror/search": "github:overleaf/codemirror-search#29f7a871969ad64b89341bacbe5d46dda02eee12",
|
"@codemirror/search": "github:overleaf/codemirror-search#29f7a871969ad64b89341bacbe5d46dda02eee12",
|
||||||
"@codemirror/state": "^6.4.1",
|
"@codemirror/state": "^6.4.1",
|
||||||
"@codemirror/view": "^6.26.3",
|
"@codemirror/view": "^6.32.0",
|
||||||
"@contentful/rich-text-html-renderer": "^16.0.2",
|
"@contentful/rich-text-html-renderer": "^16.0.2",
|
||||||
"@contentful/rich-text-types": "^16.0.2",
|
"@contentful/rich-text-types": "^16.0.2",
|
||||||
"@google-cloud/bigquery": "^6.0.1",
|
"@google-cloud/bigquery": "^6.0.1",
|
||||||
|
|
|
@ -4,6 +4,7 @@ import '../../frontend/js/i18n'
|
||||||
import './shared/commands'
|
import './shared/commands'
|
||||||
import './shared/exceptions'
|
import './shared/exceptions'
|
||||||
import './ct/commands'
|
import './ct/commands'
|
||||||
|
import './ct/codemirror'
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
resetMeta()
|
resetMeta()
|
||||||
|
|
4
services/web/cypress/support/ct/codemirror.ts
Normal file
4
services/web/cypress/support/ct/codemirror.ts
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
import { EditorView } from '@codemirror/view'
|
||||||
|
|
||||||
|
// @ts-ignore (disable EditContext-based editing until stable)
|
||||||
|
EditorView.EDIT_CONTEXT = false
|
|
@ -42,6 +42,9 @@ function CodeMirrorEditor() {
|
||||||
if (viewRef.current === null) {
|
if (viewRef.current === null) {
|
||||||
const timer = dispatchTimer()
|
const timer = dispatchTimer()
|
||||||
|
|
||||||
|
// @ts-ignore (disable EditContext-based editing until stable)
|
||||||
|
EditorView.EDIT_CONTEXT = false
|
||||||
|
|
||||||
const view = new EditorView({
|
const view = new EditorView({
|
||||||
state,
|
state,
|
||||||
dispatchTransactions: trs => {
|
dispatchTransactions: trs => {
|
||||||
|
|
|
@ -185,13 +185,13 @@
|
||||||
"@babel/preset-typescript": "^7.24.7",
|
"@babel/preset-typescript": "^7.24.7",
|
||||||
"@babel/register": "^7.24.6",
|
"@babel/register": "^7.24.6",
|
||||||
"@codemirror/autocomplete": "github:overleaf/codemirror-autocomplete#v6.18.0-overleaf-1",
|
"@codemirror/autocomplete": "github:overleaf/codemirror-autocomplete#v6.18.0-overleaf-1",
|
||||||
"@codemirror/commands": "^6.4.0",
|
"@codemirror/commands": "^6.6.0",
|
||||||
"@codemirror/lang-markdown": "^6.2.4",
|
"@codemirror/lang-markdown": "^6.2.5",
|
||||||
"@codemirror/language": "^6.10.0",
|
"@codemirror/language": "^6.10.2",
|
||||||
"@codemirror/lint": "^6.5.0",
|
"@codemirror/lint": "^6.8.1",
|
||||||
"@codemirror/search": "github:overleaf/codemirror-search#29f7a871969ad64b89341bacbe5d46dda02eee12",
|
"@codemirror/search": "github:overleaf/codemirror-search#29f7a871969ad64b89341bacbe5d46dda02eee12",
|
||||||
"@codemirror/state": "^6.4.1",
|
"@codemirror/state": "^6.4.1",
|
||||||
"@codemirror/view": "^6.26.3",
|
"@codemirror/view": "^6.32.0",
|
||||||
"@juggle/resize-observer": "^3.3.1",
|
"@juggle/resize-observer": "^3.3.1",
|
||||||
"@lezer/common": "^1.2.1",
|
"@lezer/common": "^1.2.1",
|
||||||
"@lezer/generator": "^1.7.0",
|
"@lezer/generator": "^1.7.0",
|
||||||
|
|
Loading…
Reference in a new issue