🆙 `monaco-editor-core`

pull/2748/head
Alex Dima 2021-11-04 23:42:53 +01:00
parent 1196e89298
commit bb72646030
No known key found for this signature in database
GPG Key ID: 39563C1504FDD0C9
3 changed files with 11 additions and 11 deletions

12
package-lock.json generated
View File

@ -225,15 +225,15 @@
}
},
"monaco-editor-core": {
"version": "0.28.1",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.28.1.tgz",
"integrity": "sha512-ikNy6KXmgKhV66W7xLkdECJLAAzDycUe6rhXbdmUaa6L23X70Y0jOaCj/W9gqAo4wUT3MpRmeKEgujNKKH9p8A==",
"version": "0.30.0",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.30.0.tgz",
"integrity": "sha512-vFJ7BEOCqLv4xWgFW+UheI/PtccHHNht29lNmo79Re1kNhWCBLLb2nThjRMLPO1rd41vX9hhd9C07/iKOk9/jQ==",
"dev": true
},
"monaco-languages": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.4.0.tgz",
"integrity": "sha512-63ZMAPgqBylS0kyC22QSKJWJmCRcwM7dWql1xtt9R7mCfzszfIIViSTiJ5vDSnzj0lH0aZh8OJggh/uZY6Vgnw==",
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.11.0.tgz",
"integrity": "sha512-fpeP8XUPejcdoUEMZ5bo4MW8VzEadhrsuyDtT48p2a2PSRT/CXptQm4eGnIfgxf5R95jrCZ0456c5dSEPBuktA==",
"dev": true
},
"monaco-plugin-helpers": {

View File

@ -24,8 +24,8 @@
"devDependencies": {
"husky": "^5.1.3",
"jsonc-parser": "^3.0.0",
"monaco-editor-core": "0.28.1",
"monaco-languages": "2.4.0",
"monaco-editor-core": "0.30.0",
"monaco-languages": "2.11.0",
"monaco-plugin-helpers": "^1.0.3",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",

View File

@ -35,7 +35,7 @@ export class DiagnosticsAdapter {
defaults: LanguageServiceDefaults
) {
const onModelAdd = (model: editor.IModel): void => {
let modeId = model.getModeId();
let modeId = model.getLanguageId();
if (modeId !== this._languageId) {
return;
}
@ -77,7 +77,7 @@ export class DiagnosticsAdapter {
this._disposables.push(
defaults.onDidChange((_) => {
editor.getModels().forEach((model) => {
if (model.getModeId() === this._languageId) {
if (model.getLanguageId() === this._languageId) {
onModelRemoved(model);
onModelAdd(model);
}
@ -114,7 +114,7 @@ export class DiagnosticsAdapter {
return worker.doValidation(resource.toString()).then((diagnostics) => {
const markers = diagnostics.map((d) => toDiagnostics(resource, d));
let model = editor.getModel(resource);
if (model && model.getModeId() === languageId) {
if (model && model.getLanguageId() === languageId) {
editor.setModelMarkers(model, languageId, markers);
}
});