Przeglądaj źródła

Upgrade @codemirror/view (#12574)

* Upgrade @codemirror/view
* Disable emptyLineFiller extension

GitOrigin-RevId: 57ce4194ece0ea448e24184f0b3a3e13352cb014
Alf Eaton 3 lat temu
rodzic
commit
161decd67d

+ 8 - 8
package-lock.json

@@ -3263,9 +3263,9 @@
       "integrity": "sha512-69QXtcrsc3RYtOtd+GsvczJ319udtBf1PTrr2KbLWM/e2CXUPnh0Nz9AUo8WfhSQ7GeL8dPVNUmhQVgpmuaNGA=="
     },
     "node_modules/@codemirror/view": {
-      "version": "6.9.3",
-      "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.9.3.tgz",
-      "integrity": "sha512-BJ5mvEIhFM+SrNwc5X8pLIvMM9ffjkviVbxpg84Xk2OE8ZyKaEbId8kX+nAYEEso7+qnbwsXe1bkAHsasebMow==",
+      "version": "6.9.4",
+      "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.9.4.tgz",
+      "integrity": "sha512-Ov2H9gwlGUxiH94zWxlLtTlyogSFaQDIYjtSEcfzgh7MkKmKVchkmr4JbtR5zBev3jY5DVtKvUC8yjd1bKW55A==",
       "dependencies": {
         "@codemirror/state": "^6.1.4",
         "style-mod": "^4.0.0",
@@ -35098,7 +35098,7 @@
         "@codemirror/lint": "^6.2.0",
         "@codemirror/search": "^6.3.0",
         "@codemirror/state": "^6.2.0",
-        "@codemirror/view": "^6.9.3",
+        "@codemirror/view": "^6.9.4",
         "@contentful/rich-text-html-renderer": "^16.0.2",
         "@contentful/rich-text-types": "^16.0.2",
         "@google-cloud/bigquery": "^6.0.1",
@@ -39962,9 +39962,9 @@
       "integrity": "sha512-69QXtcrsc3RYtOtd+GsvczJ319udtBf1PTrr2KbLWM/e2CXUPnh0Nz9AUo8WfhSQ7GeL8dPVNUmhQVgpmuaNGA=="
     },
     "@codemirror/view": {
-      "version": "6.9.3",
-      "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.9.3.tgz",
-      "integrity": "sha512-BJ5mvEIhFM+SrNwc5X8pLIvMM9ffjkviVbxpg84Xk2OE8ZyKaEbId8kX+nAYEEso7+qnbwsXe1bkAHsasebMow==",
+      "version": "6.9.4",
+      "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.9.4.tgz",
+      "integrity": "sha512-Ov2H9gwlGUxiH94zWxlLtTlyogSFaQDIYjtSEcfzgh7MkKmKVchkmr4JbtR5zBev3jY5DVtKvUC8yjd1bKW55A==",
       "requires": {
         "@codemirror/state": "^6.1.4",
         "style-mod": "^4.0.0",
@@ -44775,7 +44775,7 @@
         "@codemirror/lint": "^6.2.0",
         "@codemirror/search": "^6.3.0",
         "@codemirror/state": "^6.2.0",
-        "@codemirror/view": "^6.9.3",
+        "@codemirror/view": "^6.9.4",
         "@contentful/rich-text-html-renderer": "^16.0.2",
         "@contentful/rich-text-types": "^16.0.2",
         "@google-cloud/bigquery": "^6.0.1",

+ 3 - 2
services/web/frontend/js/features/source-editor/extensions/index.ts

@@ -38,7 +38,7 @@ import { thirdPartyExtensions } from './third-party-extensions'
 import { lineNumbers } from './line-numbers'
 import { highlightActiveLine } from './highlight-active-line'
 import importOverleafModules from '../../../../macros/import-overleaf-module.macro'
-import { emptyLineFiller } from './empty-line-filler'
+// import { emptyLineFiller } from './empty-line-filler'
 import { goToLinePanel } from './go-to-line'
 import { parserWatcher } from './wait-for-parser'
 import { drawSelection } from './draw-selection'
@@ -123,7 +123,8 @@ export const createExtensions = (options: Record<string, any>): Extension[] => [
   spelling(options.spelling),
   shortcuts(),
   symbolPalette(),
-  emptyLineFiller(), // NOTE: must be before `trackChanges`
+  // TODO: re-enable this once incompatibility with @codemirror/view is fixed
+  // emptyLineFiller(), // NOTE: must be before `trackChanges`
   trackChanges(options.currentDoc, options.changeManager),
   visual(options.currentDoc, options.visual),
   verticalOverflow(),

+ 1 - 1
services/web/package.json

@@ -78,7 +78,7 @@
     "@codemirror/lint": "^6.2.0",
     "@codemirror/search": "^6.3.0",
     "@codemirror/state": "^6.2.0",
-    "@codemirror/view": "^6.9.3",
+    "@codemirror/view": "^6.9.4",
     "@contentful/rich-text-html-renderer": "^16.0.2",
     "@contentful/rich-text-types": "^16.0.2",
     "@google-cloud/bigquery": "^6.0.1",