mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-06 11:35:54 +08:00
Bump Monaco Editor (#1700)
This commit is contained in:
parent
b8c2cc16aa
commit
45af59d084
3 changed files with 26 additions and 12 deletions
|
@ -3,7 +3,7 @@ import { CommandsRegistry } from "monaco-editor/esm/vs/platform/commands/common/
|
||||||
import ElixirOnTypeFormattingEditProvider from "./elixir/on_type_formatting_edit_provider";
|
import ElixirOnTypeFormattingEditProvider from "./elixir/on_type_formatting_edit_provider";
|
||||||
import { theme, highContrast } from "./theme";
|
import { theme, highContrast } from "./theme";
|
||||||
|
|
||||||
import { PieceTreeTextBufferFactory } from "monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder";
|
import { PieceTreeTextBufferBuilder } from "monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder";
|
||||||
|
|
||||||
// Force LF for line ending.
|
// Force LF for line ending.
|
||||||
//
|
//
|
||||||
|
@ -25,9 +25,23 @@ import { PieceTreeTextBufferFactory } from "monaco-editor/esm/vs/editor/common/m
|
||||||
//
|
//
|
||||||
// [1]: https://github.com/microsoft/vscode/blob/34f184263de048a6283af1d9eb9faab84da4547d/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.ts#L27-L40
|
// [1]: https://github.com/microsoft/vscode/blob/34f184263de048a6283af1d9eb9faab84da4547d/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.ts#L27-L40
|
||||||
// [2]: https://github.com/microsoft/vscode/issues/127
|
// [2]: https://github.com/microsoft/vscode/issues/127
|
||||||
if (PieceTreeTextBufferFactory.prototype._getEOL) {
|
if (PieceTreeTextBufferBuilder.prototype.finish) {
|
||||||
PieceTreeTextBufferFactory.prototype._getEOL = function (defaultEOL) {
|
const original = PieceTreeTextBufferBuilder.prototype.finish;
|
||||||
return "\n";
|
|
||||||
|
// We don't have access to the factory class directly, so we override
|
||||||
|
// the builder, such that we modify the factory object once created
|
||||||
|
PieceTreeTextBufferBuilder.prototype.finish = function (...args) {
|
||||||
|
const factory = original.apply(this, args);
|
||||||
|
|
||||||
|
if (factory._getEOL) {
|
||||||
|
factory._getEOL = function (defaultEOL) {
|
||||||
|
return "\n";
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
throw new Error("failed to override line endings to LF");
|
||||||
|
}
|
||||||
|
|
||||||
|
return factory;
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
throw new Error("failed to override line endings to LF");
|
throw new Error("failed to override line endings to LF");
|
||||||
|
|
14
assets/package-lock.json
generated
14
assets/package-lock.json
generated
|
@ -16,7 +16,7 @@
|
||||||
"hyperlist": "^1.0.0",
|
"hyperlist": "^1.0.0",
|
||||||
"jest": "^29.1.2",
|
"jest": "^29.1.2",
|
||||||
"mermaid": "^9.1.3",
|
"mermaid": "^9.1.3",
|
||||||
"monaco-editor": "0.33.0",
|
"monaco-editor": "^0.35.0",
|
||||||
"morphdom": "^2.6.1",
|
"morphdom": "^2.6.1",
|
||||||
"phoenix": "file:../deps/phoenix",
|
"phoenix": "file:../deps/phoenix",
|
||||||
"phoenix_html": "file:../deps/phoenix_html",
|
"phoenix_html": "file:../deps/phoenix_html",
|
||||||
|
@ -8261,9 +8261,9 @@
|
||||||
"integrity": "sha512-9ARkWHBs+6YJIvrIp0Ik5tyTTtP9PoV0Ssu2Ocq5y9v8+NOOpWiRshAp8c4rZVWTOe+157on/5G+zj5pwIQFEQ=="
|
"integrity": "sha512-9ARkWHBs+6YJIvrIp0Ik5tyTTtP9PoV0Ssu2Ocq5y9v8+NOOpWiRshAp8c4rZVWTOe+157on/5G+zj5pwIQFEQ=="
|
||||||
},
|
},
|
||||||
"node_modules/monaco-editor": {
|
"node_modules/monaco-editor": {
|
||||||
"version": "0.33.0",
|
"version": "0.35.0",
|
||||||
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.33.0.tgz",
|
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.35.0.tgz",
|
||||||
"integrity": "sha512-VcRWPSLIUEgQJQIE0pVT8FcGBIgFoxz7jtqctE+IiCxWugD0DwgyQBcZBhdSrdMC84eumoqMZsGl2GTreOzwqw=="
|
"integrity": "sha512-BJfkAZ0EJ7JgrgWzqjfBNP9hPSS8NlfECEDMEIIiozV2UaPq22yeuOjgbd3TwMh3anH0krWZirXZfn8KUSxiOA=="
|
||||||
},
|
},
|
||||||
"node_modules/monaco-editor-webpack-plugin": {
|
"node_modules/monaco-editor-webpack-plugin": {
|
||||||
"version": "7.0.1",
|
"version": "7.0.1",
|
||||||
|
@ -16706,9 +16706,9 @@
|
||||||
"integrity": "sha512-9ARkWHBs+6YJIvrIp0Ik5tyTTtP9PoV0Ssu2Ocq5y9v8+NOOpWiRshAp8c4rZVWTOe+157on/5G+zj5pwIQFEQ=="
|
"integrity": "sha512-9ARkWHBs+6YJIvrIp0Ik5tyTTtP9PoV0Ssu2Ocq5y9v8+NOOpWiRshAp8c4rZVWTOe+157on/5G+zj5pwIQFEQ=="
|
||||||
},
|
},
|
||||||
"monaco-editor": {
|
"monaco-editor": {
|
||||||
"version": "0.33.0",
|
"version": "0.35.0",
|
||||||
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.33.0.tgz",
|
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.35.0.tgz",
|
||||||
"integrity": "sha512-VcRWPSLIUEgQJQIE0pVT8FcGBIgFoxz7jtqctE+IiCxWugD0DwgyQBcZBhdSrdMC84eumoqMZsGl2GTreOzwqw=="
|
"integrity": "sha512-BJfkAZ0EJ7JgrgWzqjfBNP9hPSS8NlfECEDMEIIiozV2UaPq22yeuOjgbd3TwMh3anH0krWZirXZfn8KUSxiOA=="
|
||||||
},
|
},
|
||||||
"monaco-editor-webpack-plugin": {
|
"monaco-editor-webpack-plugin": {
|
||||||
"version": "7.0.1",
|
"version": "7.0.1",
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
"hyperlist": "^1.0.0",
|
"hyperlist": "^1.0.0",
|
||||||
"jest": "^29.1.2",
|
"jest": "^29.1.2",
|
||||||
"mermaid": "^9.1.3",
|
"mermaid": "^9.1.3",
|
||||||
"monaco-editor": "0.33.0",
|
"monaco-editor": "^0.35.0",
|
||||||
"morphdom": "^2.6.1",
|
"morphdom": "^2.6.1",
|
||||||
"phoenix": "file:../deps/phoenix",
|
"phoenix": "file:../deps/phoenix",
|
||||||
"phoenix_html": "file:../deps/phoenix_html",
|
"phoenix_html": "file:../deps/phoenix_html",
|
||||||
|
|
Loading…
Add table
Reference in a new issue