From fa374301d18abbc3a62411b086059542a67ebd69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Wed, 10 Nov 2021 17:16:25 +0100 Subject: [PATCH 1/2] Update to monaco 0.30 --- package.json | 2 +- yarn.lock | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8b09d5dee..c6e8e9608 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "@types/vscode": "1.52.0", "css-loader": "^0.28.11", "lerna": "^3.16.4", - "monaco-editor-core": "^0.29.0", + "monaco-editor-core": "^0.30.1", "rimraf": "^2.6.2", "source-map-loader": "^0.2.3", "style-loader": "^0.20.3", diff --git a/yarn.lock b/yarn.lock index 1ad76a0ac..e4b932127 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4792,6 +4792,11 @@ monaco-editor-core@^0.29.0: resolved "https://registry.yarnpkg.com/monaco-editor-core/-/monaco-editor-core-0.29.1.tgz#187bd48b4c0eef7dd4c60e012ad5df4823cfdc74" integrity sha512-A2+iNWf2Jhy/yAJ8HaDIszEhAlS1xjLvQfbk41yAyGwC4wDwbcTymUud1g0I9nV31S1x7QlXNC0BABc2uZN1Qg== +monaco-editor-core@^0.30.1: + version "0.30.1" + resolved "https://registry.yarnpkg.com/monaco-editor-core/-/monaco-editor-core-0.30.1.tgz#f42f6245e6fb75eb922ed421933eedeb27ca7f9b" + integrity sha512-WNxfchYafMZXVfysqg/ESW4MtOpYLPaIKrzudNlgwYvfYID+O/nwSZI5X+KxW84roVzHsNgFGyOOesfHFZwYUA== + move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" From 698bd2dbf22166069e83edb7fd0130e07b3150a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Wed, 10 Nov 2021 17:16:38 +0100 Subject: [PATCH 2/2] Adapt code to new monaco API --- client/src/monaco-languages.ts | 2 +- client/src/monaco-workspace.ts | 2 +- examples/browser/src/client.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/monaco-languages.ts b/client/src/monaco-languages.ts index e63f25971..c75f6a3d9 100644 --- a/client/src/monaco-languages.ts +++ b/client/src/monaco-languages.ts @@ -33,7 +33,7 @@ export namespace MonacoModelIdentifier { export function fromModel(model: monaco.editor.IReadOnlyModel): MonacoModelIdentifier { return { uri: model.uri, - languageId: model.getModeId() + languageId: model.getLanguageId() } } } diff --git a/client/src/monaco-workspace.ts b/client/src/monaco-workspace.ts index 5aac8e5d6..9f6b2e7b5 100644 --- a/client/src/monaco-workspace.ts +++ b/client/src/monaco-workspace.ts @@ -68,7 +68,7 @@ export class MonacoWorkspace implements Workspace { } protected setModel(uri: string, model: monaco.editor.IModel): TextDocument { - const document = TextDocument.create(uri, model.getModeId(), model.getVersionId(), model.getValue()); + const document = TextDocument.create(uri, model.getLanguageId(), model.getVersionId(), model.getValue()); this.documents.set(uri, document); return document; } diff --git a/examples/browser/src/client.ts b/examples/browser/src/client.ts index 232462bf4..7d8c912f4 100644 --- a/examples/browser/src/client.ts +++ b/examples/browser/src/client.ts @@ -36,7 +36,7 @@ function getModel(): monaco.editor.IModel { } function createDocument(model: monaco.editor.IReadOnlyModel) { - return TextDocument.create(MODEL_URI, model.getModeId(), model.getVersionId(), model.getValue()); + return TextDocument.create(MODEL_URI, model.getLanguageId(), model.getVersionId(), model.getValue()); } function resolveSchema(url: string): Promise {