diff --git a/package-lock.json b/package-lock.json index 7cbea8539d..bb12b40b43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,18 +5,18 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", "dev": true, "requires": { "@babel/highlight": "^7.0.0" } }, "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", "dev": true, "requires": { "chalk": "^2.0.0", @@ -102,13 +102,14 @@ } }, "applicationinsights": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-1.0.8.tgz", - "integrity": "sha512-KzOOGdphOS/lXWMFZe5440LUdFbrLpMvh2SaRxn7BmiI550KAoSb2gIhiq6kJZ9Ir3AxRRztjhzif+e5P5IXIg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-1.4.0.tgz", + "integrity": "sha512-TV8MYb0Kw9uE2cdu4V/UvTKdOABkX2+Fga9iDz0zqV7FLrNXfmAugWZmmdTx4JoynYkln3d5CUHY3oVSUEbfFw==", "requires": { + "cls-hooked": "^4.2.2", + "continuation-local-storage": "^3.2.1", "diagnostic-channel": "0.2.0", - "diagnostic-channel-publishers": "0.2.1", - "zone.js": "0.7.6" + "diagnostic-channel-publishers": "^0.3.2" } }, "arg": { @@ -120,7 +121,7 @@ "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "requires": { "sprintf-js": "~1.0.2" } @@ -140,11 +141,28 @@ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true }, + "async-hook-jl": { + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/async-hook-jl/-/async-hook-jl-1.7.6.tgz", + "integrity": "sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg==", + "requires": { + "stack-chain": "^1.3.7" + } + }, "async-limiter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", "integrity": "sha1-ePrtjD0HSrgfIrTphdeehzj3IPg=" }, + "async-listener": { + "version": "0.6.10", + "resolved": "https://registry.npmjs.org/async-listener/-/async-listener-0.6.10.tgz", + "integrity": "sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw==", + "requires": { + "semver": "^5.3.0", + "shimmer": "^1.1.0" + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -240,6 +258,16 @@ "wrap-ansi": "^5.1.0" } }, + "cls-hooked": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/cls-hooked/-/cls-hooked-4.2.2.tgz", + "integrity": "sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw==", + "requires": { + "async-hook-jl": "^1.7.6", + "emitter-listener": "^1.0.1", + "semver": "^5.4.1" + } + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -276,6 +304,15 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "continuation-local-storage": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz", + "integrity": "sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA==", + "requires": { + "async-listener": "^0.6.0", + "emitter-listener": "^1.1.1" + } + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -320,9 +357,9 @@ } }, "diagnostic-channel-publishers": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.2.1.tgz", - "integrity": "sha1-ji1geottef6IC1SLxYzGvrKIxPM=" + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.2.tgz", + "integrity": "sha512-2hBlg1BtBT+nd04MGGGZinDv5gOTRQOCzdgk+KRQZ20XJ/uepC0B0rwWLQtz6Tk6InXymWqsk1sMC975cPEReA==" }, "diff": { "version": "3.5.0", @@ -340,6 +377,14 @@ "safer-buffer": "^2.1.0" } }, + "emitter-listener": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz", + "integrity": "sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ==", + "requires": { + "shimmer": "^1.2.0" + } + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -368,7 +413,7 @@ "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=" + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esutils": { "version": "2.0.2", @@ -808,9 +853,10 @@ "dev": true }, "prettier": { - "version": "1.16.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.4.tgz", - "integrity": "sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==" + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz", + "integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==", + "optional": true }, "psl": { "version": "1.2.0", @@ -898,9 +944,9 @@ "dev": true }, "resolve": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz", - "integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", + "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -929,6 +975,11 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, + "shimmer": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", + "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==" + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -967,6 +1018,11 @@ "tweetnacl": "~0.14.0" } }, + "stack-chain": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/stack-chain/-/stack-chain-1.3.7.tgz", + "integrity": "sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU=" + }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -1036,15 +1092,15 @@ } }, "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", "dev": true }, "tslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.16.0.tgz", - "integrity": "sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.18.0.tgz", + "integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -1053,7 +1109,7 @@ "commander": "^2.12.1", "diff": "^3.2.0", "glob": "^7.1.1", - "js-yaml": "^3.13.0", + "js-yaml": "^3.13.1", "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "resolve": "^1.3.2", @@ -1178,11 +1234,11 @@ } }, "vscode-extension-telemetry": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.1.tgz", - "integrity": "sha512-TkKKG/B/J94DP5qf6xWB4YaqlhWDg6zbbqVx7Bz//stLQNnfE9XS1xm3f6fl24c5+bnEK0/wHgMgZYKIKxPeUA==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.2.tgz", + "integrity": "sha512-FSbaZKlIH3VKvBJsKw7v5bESWHXzltji2rtjaJeJglpQH4tfClzwHMzlMXUZGiblV++djEzb1gW8mb5E+wxFsg==", "requires": { - "applicationinsights": "1.0.8" + "applicationinsights": "1.4.0" } }, "vscode-json-languageservice": { @@ -1275,9 +1331,9 @@ "integrity": "sha512-lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A==" }, "vscode-nls": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-4.1.0.tgz", - "integrity": "sha512-zKsFWVzL1wlCezgaI3XiN42IT8DIPM1Qr+G+RBhiU3U0bJCdC8pPELakRCtuVT4wF3gBZjBrUDQ8mowL7hmgwA==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-4.1.1.tgz", + "integrity": "sha512-4R+2UoUUU/LdnMnFjePxfLqNhBS8lrAFyX7pjb2ud/lqDkrUavFUTcG7wR0HBZFakae0Q6KLBFjMS6W93F403A==" }, "vscode-test": { "version": "0.4.3", @@ -1350,52 +1406,52 @@ "integrity": "sha512-R5063FF/JSAN6qXCmylwjt9PcDH6M0ExEme/nJBzLspc6FJDmHHIqM7xh2WfEmsTJqClF79A9VkXjkAqmZw9SQ==" }, "yaml-language-server": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/yaml-language-server/-/yaml-language-server-0.4.0.tgz", - "integrity": "sha512-56lPsjm/O0a2i2Jeo6P7xLB0WswU/gVFVapt285MBi8ojs3qKb5evFpC4WzteCUnCyvwUydfmGKld3GVRQX1uA==", - "requires": { - "js-yaml": "^3.12.0", - "jsonc-parser": "^1.0.3", - "prettier": "^1.15.2", - "request-light": "^0.2.3", - "vscode-json-languageservice": "3.0.12", - "vscode-languageserver": "^4.0.0", - "vscode-languageserver-types": "^3.6.1", - "vscode-nls": "^3.2.2", - "vscode-uri": "^1.0.6", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/yaml-language-server/-/yaml-language-server-0.5.3.tgz", + "integrity": "sha512-7/hGwbZOpXUa/alkBSTZYLyVcYGtkbCeCmQS6kS54KPv1G2LKlM5yCFAtMN57lEaZpJp/0qa+EqfLZiPYsL6hw==", + "requires": { + "js-yaml": "^3.13.1", + "prettier": "^1.17.1", + "request-light": "^0.2.4", + "vscode-json-languageservice": "3.2.0", + "vscode-languageserver": "^5.2.1", + "vscode-languageserver-types": "^3.14.0", + "vscode-uri": "^2.0.2", "yaml-ast-parser-custom-tags": "0.0.43" }, "dependencies": { - "jsonc-parser": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-1.0.3.tgz", - "integrity": "sha512-hk/69oAeaIzchq/v3lS50PXuzn5O2ynldopMC+SWBql7J2WtdptfB9dy8Y7+Og5rPkTCpn83zTiO8FMcqlXJ/g==" - }, "vscode-json-languageservice": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-3.0.12.tgz", - "integrity": "sha512-XSgRVY/vsPqOa//ZwLD5DWx1wzTQGgeZfsOlVqFlLya10dpimSnd27kbuL45hzxh4B+MvmHZtZeWQKjSYnNF0A==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-3.2.0.tgz", + "integrity": "sha512-tLAv9/D01fLAvnYnZ1OLy03HSHhVFjaSkUidEjfrwytHrxVDgqXLkHAJg+F6Q3mPYfpnPQvN2jTjiJ1yInuNVg==", "requires": { - "jsonc-parser": "^2.0.0-next.1", - "vscode-languageserver-types": "^3.6.1", - "vscode-nls": "^3.2.1", - "vscode-uri": "^1.0.3" + "jsonc-parser": "^2.0.2", + "vscode-languageserver-types": "^3.13.0", + "vscode-nls": "^4.0.0", + "vscode-uri": "^1.0.6" }, "dependencies": { - "jsonc-parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.1.0.tgz", - "integrity": "sha512-n9GrT8rrr2fhvBbANa1g+xFmgGK5X91KFeDwlKQ3+SJfmH5+tKv/M/kahx/TXOMflfWHKGKqKyfHQaLKTNzJ6w==" + "vscode-uri": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.8.tgz", + "integrity": "sha512-obtSWTlbJ+a+TFRYGaUumtVwb+InIUVI0Lu0VBUAPmj2cU5JutEXg3xUE0c2J5Tcy7h2DEKVJBFi+Y9ZSFzzPQ==" } } }, "vscode-languageserver": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-4.4.2.tgz", - "integrity": "sha512-61y8Raevi9EigDgg9NelvT9cUAohiEbUl1LOwQQgOCAaNX62yKny/ddi0uC+FUTm4CzsjhBu+06R+vYgfCYReA==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-5.2.1.tgz", + "integrity": "sha512-GuayqdKZqAwwaCUjDvMTAVRPJOp/SLON3mJ07eGsx/Iq9HjRymhKWztX41rISqDKhHVVyFM+IywICyZDla6U3A==", "requires": { - "vscode-languageserver-protocol": "^3.10.3", - "vscode-uri": "^1.0.5" + "vscode-languageserver-protocol": "3.14.1", + "vscode-uri": "^1.0.6" + }, + "dependencies": { + "vscode-uri": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.8.tgz", + "integrity": "sha512-obtSWTlbJ+a+TFRYGaUumtVwb+InIUVI0Lu0VBUAPmj2cU5JutEXg3xUE0c2J5Tcy7h2DEKVJBFi+Y9ZSFzzPQ==" + } } }, "vscode-languageserver-protocol": { @@ -1407,10 +1463,10 @@ "vscode-languageserver-types": "3.14.0" } }, - "vscode-nls": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-3.2.5.tgz", - "integrity": "sha512-ITtoh3V4AkWXMmp3TB97vsMaHRgHhsSFPsUdzlueSL+dRZbSNTZeOmdQv60kjCV306ghPxhDeoNUEm3+EZMuyw==" + "vscode-uri": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-2.0.3.tgz", + "integrity": "sha512-4D3DI3F4uRy09WNtDGD93H9q034OHImxiIcSq664Hq1Y1AScehlP3qqZyTkX/RWxeu0MRMHGkrxYqm2qlDF/aw==" } } }, @@ -1447,11 +1503,6 @@ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz", "integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==", "dev": true - }, - "zone.js": { - "version": "0.7.6", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.7.6.tgz", - "integrity": "sha1-+7w50+AmHQmG8boGMG6zrrDSIAk=" } } } diff --git a/package.json b/package.json index 813a256204..9fbbc7ebb9 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "@types/ws": "6.0.1", "@types/yaml": "1.0.2", "ts-node": "8.3.0", - "tslint": "^5.16.0", + "tslint": "^5.18.0", "typescript": "^3.4.5", "typescript-json-schema": "0.39.0", "vscode": "^1.1.35" @@ -152,8 +152,8 @@ "vscode-json-languageservice": "3.3.1", "vscode-languageclient": "5.2.1", "vscode-languageserver": "5.3.0-next.8", - "yaml-language-server": "0.4.0", + "yaml-language-server": "0.5.3", "yaml": "1.5.0", - "vscode-extension-telemetry": "0.1.1" + "vscode-extension-telemetry": "0.1.2" } } diff --git a/src/server/haLanguageService.ts b/src/server/haLanguageService.ts index db3d4c40ed..7bbe73c2e3 100644 --- a/src/server/haLanguageService.ts +++ b/src/server/haLanguageService.ts @@ -1,6 +1,6 @@ import { TextDocuments, CompletionList, TextDocumentChangeEvent, DidChangeWatchedFilesParams, DidOpenTextDocumentParams, TextDocument, Position, CompletionItem, TextEdit, Definition, DefinitionLink, TextDocumentPositionParams, Location, IConnection, Diagnostic } from "vscode-languageserver"; import { completionHelper } from "./completionHelpers/utils"; -import { parse as parseYAML } from "yaml-language-server/out/server/src/languageservice/parser/yamlParser"; +import { parse as parseYAML } from "yaml-language-server/out/server/src/languageservice/parser/yamlParser04"; import { YamlLanguageServiceWrapper } from "./yamlLanguageServiceWrapper"; import { SchemaServiceForIncludes } from "./schemas/schemaService"; import { EntityIdCompletionContribution } from "./completionHelpers/entityIds"; diff --git a/src/server/yamlLanguageServiceWrapper.ts b/src/server/yamlLanguageServiceWrapper.ts index f5fc49697a..883f38efdc 100644 --- a/src/server/yamlLanguageServiceWrapper.ts +++ b/src/server/yamlLanguageServiceWrapper.ts @@ -8,7 +8,7 @@ import { YAMLFormatter } from "yaml-language-server/out/server/src/languageservi import * as path from "path"; import { EntityIdCompletionContribution } from "./completionHelpers/entityIds"; import { TextDocument, TextEdit, Diagnostic } from "vscode-languageserver-types"; -import { JSONWorkerContribution } from "vscode-json-languageservice"; +import { JSONWorkerContribution, getLanguageService } from "vscode-json-languageservice"; export class YamlLanguageServiceWrapper { @@ -20,6 +20,9 @@ export class YamlLanguageServiceWrapper { public jsonSchemaService: JSONSchemaService; constructor(completionContributions: JSONWorkerContribution[]) { + + var jsonLanguageService = getLanguageService(null); + this.jsonSchemaService = new JSONSchemaService(null, { resolveRelativePath: (relativePath: string, resource: string) => { return path.resolve(resource, relativePath); @@ -27,14 +30,14 @@ export class YamlLanguageServiceWrapper { }, null); - this.yamlValidation = new YAMLValidation(this.jsonSchemaService); + this.yamlValidation = new YAMLValidation(Promise, jsonLanguageService); this.yamlValidation.configure({ validate: true }); - this.yamlDocumentSymbols = new YAMLDocumentSymbols(); + this.yamlDocumentSymbols = new YAMLDocumentSymbols(jsonLanguageService); this.yamlCompletion = new YAMLCompletion(this.jsonSchemaService, completionContributions); // enables auto completion suggestions for tags like !include () // commeted because they end up at the top of the list which does not look nice :-) // this.yamlCompletion.configure(null, this.getValidYamlTags()); - this.yamlHover = new YAMLHover(this.jsonSchemaService); + this.yamlHover = new YAMLHover(Promise, jsonLanguageService); this.yamlFormatter = new YAMLFormatter(); }