From 9b238a31d9127c42876a6d0c3c1ab495d3a06aa9 Mon Sep 17 00:00:00 2001 From: krassowski Date: Sun, 24 Oct 2021 13:46:20 +0100 Subject: [PATCH 1/5] Migrate to typescript-language-server --- atest/05_Features/Completion.robot | 2 +- atest/Keywords.robot | 2 +- docs/Language Servers.ipynb | 4 +- package.json | 2 +- .../specs/javascript_typescript_langserver.py | 2 +- .../specs/typescript_language_server.py | 39 +++ yarn.lock | 294 +++++++----------- 7 files changed, 151 insertions(+), 194 deletions(-) create mode 100644 python_packages/jupyter_lsp/jupyter_lsp/specs/typescript_language_server.py diff --git a/atest/05_Features/Completion.robot b/atest/05_Features/Completion.robot index 6bd4e8521..98f5399bc 100644 --- a/atest/05_Features/Completion.robot +++ b/atest/05_Features/Completion.robot @@ -60,7 +60,7 @@ Invalidates On Cell Change Invalidates On Focus Loss Enter Cell Editor 1 line=2 Press Keys None TAB - Click JupyterLab Menu File + Click JupyterLab Menu File # just to increase chances of catching this on CI (which is slow) Sleep 4s Completer Should Not Suggest test diff --git a/atest/Keywords.robot b/atest/Keywords.robot index 82f41a0e1..1d6d06250 100644 --- a/atest/Keywords.robot +++ b/atest/Keywords.robot @@ -324,7 +324,7 @@ Wait Until Fully Initialized Wait Until Element Contains ${STATUSBAR} Fully initialized timeout=60s Wait For Ready State - Wait For Condition return document.readyState=="complete" + Wait For Condition return document.readyState=="complete" Open Context Menu Over [Arguments] ${sel} diff --git a/docs/Language Servers.ipynb b/docs/Language Servers.ipynb index 547f401a7..398891cf3 100644 --- a/docs/Language Servers.ipynb +++ b/docs/Language Servers.ipynb @@ -250,7 +250,7 @@ " vscode-css-languageserver-bin \\\n", " dockerfile-language-server-nodejs \\\n", " vscode-html-languageserver-bin \\\n", - " javascript-typescript-langserver \\\n", + " typescript-language-server \\\n", " vscode-json-languageserver-bin \\\n", " yaml-language-server\n", "```\n", @@ -374,4 +374,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} +} \ No newline at end of file diff --git a/package.json b/package.json index c8a854b04..22cd78fe6 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "eslint-plugin-prettier": "^3.1.4", "eslint-plugin-react": "^7.21.5", "husky": "^3.0.9", - "javascript-typescript-langserver": "^2.11.3", + "typescript-language-server": "^0.6.4", "jest-github-actions-reporter": "^1.0.2", "lerna": "^3.13.2", "npm-run-all": "^4.1.5", diff --git a/python_packages/jupyter_lsp/jupyter_lsp/specs/javascript_typescript_langserver.py b/python_packages/jupyter_lsp/jupyter_lsp/specs/javascript_typescript_langserver.py index db230aebc..7647258b4 100644 --- a/python_packages/jupyter_lsp/jupyter_lsp/specs/javascript_typescript_langserver.py +++ b/python_packages/jupyter_lsp/jupyter_lsp/specs/javascript_typescript_langserver.py @@ -13,7 +13,7 @@ class JavascriptTypescriptLanguageServer(NodeModuleSpec): "javascriptreact", ] spec = dict( - display_name=key, + display_name=key + " (deprecated)", mime_types=[ "application/typescript", "text/typescript-jsx", diff --git a/python_packages/jupyter_lsp/jupyter_lsp/specs/typescript_language_server.py b/python_packages/jupyter_lsp/jupyter_lsp/specs/typescript_language_server.py new file mode 100644 index 000000000..fb3092060 --- /dev/null +++ b/python_packages/jupyter_lsp/jupyter_lsp/specs/typescript_language_server.py @@ -0,0 +1,39 @@ +from .utils import NodeModuleSpec + + +class TypescriptLanguageServer(NodeModuleSpec): + node_module = key = "typescript-language-server" + script = ["lib", "cli.js"] + args = ["--stdio"] + languages = [ + "javascript", + "jsx", + "typescript", + "typescript-jsx", + "typescriptreact", + "javascriptreact", + ] + spec = dict( + display_name=key, + mime_types=[ + "application/typescript", + "text/typescript-jsx", + "text/javascript", + "text/ecmascript", + "application/javascript", + "application/x-javascript", + "application/ecmascript", + "text/jsx", + ], + urls=dict( + home="https://github.com/typescript-language-server/{}".format(key), + issues="https://github.com/typescript-language-server/{}/issues".format( + key + ), + ), + install=dict( + npm="npm install --save-dev {}".format(key), + yarn="yarn add --dev {}".format(key), + jlpm="jlpm add --dev {}".format(key), + ), + ) diff --git a/yarn.lock b/yarn.lock index 04e1d8406..f20a6c3c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3868,11 +3868,6 @@ ajv@^8.0.1: require-from-string "^2.0.2" uri-js "^4.2.2" -ansi-color@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/ansi-color/-/ansi-color-0.2.1.tgz#3e75c037475217544ed763a8db5709fa9ae5bf9a" - integrity sha1-PnXAN0dSF1RO12Oo21cJ+prlv5o= - ansi-colors@3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" @@ -4622,16 +4617,6 @@ buffer@^5.6.0: base64-js "^1.3.1" ieee754 "^1.1.13" -bufrw@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/bufrw/-/bufrw-1.3.0.tgz#28d6cfdaf34300376836310f5c31d57eeb40c8fa" - integrity sha512-jzQnSbdJqhIltU9O5KUiTtljP9ccw2u5ix59McQy4pV2xGhVLhRZIndY8GIrgh5HjXa6+QJ9AQhOd2QWQizJFQ== - dependencies: - ansi-color "^0.2.1" - error "^7.0.0" - hexer "^1.5.0" - xtend "^4.0.0" - builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -4850,25 +4835,6 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chai-as-promised@^7.0.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" - integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA== - dependencies: - check-error "^1.0.2" - -chai@^4.0.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" - integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - pathval "^1.1.0" - type-detect "^4.0.5" - chai@^4.2.0: version "4.3.4" resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" @@ -4881,7 +4847,7 @@ chai@^4.2.0: pathval "^1.1.1" type-detect "^4.0.5" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.2.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -5241,6 +5207,11 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +command-exists@^1.2.6: + version "1.2.9" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" + integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== + command-line-usage@^6.1.0: version "6.1.1" resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.1.tgz#c908e28686108917758a49f45efb4f02f76bc03f" @@ -5256,7 +5227,7 @@ commander@2.17.x: resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== -commander@^2.20.0, commander@^2.9.0: +commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -5266,6 +5237,11 @@ commander@^6.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.0.tgz#b990bfb8ac030aedc6d11bc04d1488ffef56db75" integrity sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q== +commander@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + commander@~2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" @@ -5597,6 +5573,11 @@ crypto-browserify@^3.11.0: randombytes "^2.0.0" randomfill "^1.0.3" +crypto-random-string@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" + integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== + crypto@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/crypto/-/crypto-1.0.1.tgz#2af1b7cad8175d24c8a1b0778255794a21803037" @@ -5881,6 +5862,20 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" +del@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952" + integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ== + dependencies: + globby "^11.0.1" + graceful-fs "^4.2.4" + is-glob "^4.0.1" + is-path-cwd "^2.2.0" + is-path-inside "^3.0.2" + p-map "^4.0.0" + rimraf "^3.0.2" + slash "^3.0.0" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -6372,21 +6367,6 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -error@7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/error/-/error-7.0.2.tgz#a5f75fff4d9926126ddac0ea5dc38e689153cb02" - integrity sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI= - dependencies: - string-template "~0.2.1" - xtend "~4.0.0" - -error@^7.0.0: - version "7.2.1" - resolved "https://registry.yarnpkg.com/error/-/error-7.2.1.tgz#eab21a4689b5f684fc83da84a0e390de82d94894" - integrity sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA== - dependencies: - string-template "~0.2.1" - es-abstract@^1.17.0-next.1, es-abstract@^1.18.0-next.1, es-abstract@^1.19.0, es-abstract@^1.19.1: version "1.19.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" @@ -6927,11 +6907,6 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -6977,13 +6952,6 @@ fast-glob@^3.1.1: merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-patch@^2.0.2: - version "2.2.1" - resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-2.2.1.tgz#18150d36c9ab65c7209e7d4eb113f4f8eaabe6d9" - integrity sha512-4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -7258,6 +7226,15 @@ fs-access@^1.0.0: dependencies: null-check "^1.0.0" +fs-extra@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" + integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^7.0.0, fs-extra@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" @@ -7655,7 +7632,7 @@ globby@10.0.0: merge2 "^1.2.3" slash "^3.0.0" -globby@^11.0.3: +globby@^11.0.1, globby@^11.0.3: version "11.0.4" resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== @@ -7867,16 +7844,6 @@ he@1.2.0, he@1.2.x: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -hexer@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/hexer/-/hexer-1.5.0.tgz#b86ce808598e8a9d1892c571f3cedd86fc9f0653" - integrity sha1-uGzoCFmOip0YksVx887dhvyfBlM= - dependencies: - ansi-color "^0.2.1" - minimist "^1.1.0" - process "^0.10.0" - xtend "^4.0.0" - highlight.js@^9.13.1: version "9.18.3" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.3.tgz#a1a0a2028d5e3149e2380f8a865ee8516703d634" @@ -8566,6 +8533,16 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== +is-path-cwd@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" + integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== + +is-path-inside@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-obj@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" @@ -8801,47 +8778,6 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -iterare@^1.1.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/iterare/-/iterare-1.2.1.tgz#139c400ff7363690e33abffa33cbba8920f00042" - integrity sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q== - -jaeger-client@^3.5.3: - version "3.18.1" - resolved "https://registry.yarnpkg.com/jaeger-client/-/jaeger-client-3.18.1.tgz#a8c7a778244ba117f4fb8775eb6aa5508703564e" - integrity sha512-eZLM2U6rJvYo0XbzQYFeMYfp29gQix7SKlmDReorp9hJkUwXZtTyxW81AcKdmFCjLHO5tFysTX+394BnjEnUZg== - dependencies: - node-int64 "^0.4.0" - opentracing "^0.14.4" - thriftrw "^3.5.0" - uuid "^3.2.1" - xorshift "^0.2.0" - -javascript-typescript-langserver@^2.11.3: - version "2.11.3" - resolved "https://registry.yarnpkg.com/javascript-typescript-langserver/-/javascript-typescript-langserver-2.11.3.tgz#71bd0b08e43588f1d49a85eb774acc02a3d9a26d" - integrity sha512-j2dKPq5tgSUyM2AOXWh2O7pNWzXzKI/3W02X1OrEZnV3B9yt9IM+snuGt/mk1Nryxyy7OZnhdL0XqHe4xx7Qzw== - dependencies: - chai "^4.0.1" - chai-as-promised "^7.0.0" - chalk "^2.2.0" - commander "^2.9.0" - fast-json-patch "^2.0.2" - glob "^7.1.1" - iterare "^1.1.2" - jaeger-client "^3.5.3" - lodash "^4.17.4" - mz "^2.6.0" - object-hash "^1.1.8" - opentracing "^0.14.0" - rxjs "^5.5.0" - semaphore-async-await "^1.5.1" - string-similarity "^2.0.0" - typescript "~3.0.3" - vscode-jsonrpc "^4.0.0" - vscode-languageserver "^5.0.0" - vscode-languageserver-types "^3.0.3" - jest-changed-files@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.2.tgz#f6198479e1cc66f22f9ae1e22acaa0b429c042d0" @@ -9937,11 +9873,6 @@ lolex@^5.0.1: dependencies: "@sinonjs/commons" "^1.7.0" -long@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/long/-/long-2.4.0.tgz#9fa180bb1d9500cdc29c4156766a1995e1f4524f" - integrity sha1-n6GAux2VAM3CnEFWdmoZleH0Uk8= - long@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" @@ -10418,7 +10349,7 @@ minimist@1.2.0: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= -minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.0: +minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.0: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -10634,7 +10565,7 @@ mysql2@^2.3.0: seq-queue "^0.0.5" sqlstring "^2.3.2" -mz@^2.5.0, mz@^2.6.0, mz@^2.7.0: +mz@^2.5.0, mz@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== @@ -11049,11 +10980,6 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-hash@^1.1.8: - version "1.3.1" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.3.1.tgz#fde452098a951cb145f039bb7d455449ddc126df" - integrity sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA== - object-inspect@^1.11.0, object-inspect@^1.9.0: version "1.11.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" @@ -11194,11 +11120,6 @@ opencollective-postinstall@^2.0.2: resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== -opentracing@^0.14.0, opentracing@^0.14.4: - version "0.14.4" - resolved "https://registry.yarnpkg.com/opentracing/-/opentracing-0.14.4.tgz#a113408ea740da3a90fde5b3b0011a375c2e4268" - integrity sha512-nNnZDkUNExBwEpb7LZaeMeQgvrlO8l4bgY/LvGNZCR0xG/dGWqHqjKrAmR5GUoYo0FIz38kxasvA1aevxWs2CA== - optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" @@ -11286,6 +11207,11 @@ p-cancelable@^1.0.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== +p-debounce@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-debounce/-/p-debounce-2.1.0.tgz#e79f70c6e325cbb9bddbcbec0b81025084671ad3" + integrity sha512-M9bMt62TTnozdZhqFgs+V7XD2MnuKCaz+7fZdlu2/T7xruI3uIE5CicQ0vx1hV7HIUYF0jF+4/R1AgfOkl74Qw== + p-defer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" @@ -11658,7 +11584,7 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pathval@^1.1.0, pathval@^1.1.1: +pathval@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== @@ -12003,11 +11929,6 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/process/-/process-0.10.1.tgz#842457cc51cfed72dc775afeeafb8c6034372725" - integrity sha1-hCRXzFHP7XLcd1r+6vuMYDQ3JyU= - process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" @@ -13454,13 +13375,6 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@^5.5.0: - version "5.5.12" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.12.tgz#6fa61b8a77c3d793dbaf270bee2f43f652d741cc" - integrity sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw== - dependencies: - symbol-observable "1.0.1" - rxjs@^6.4.0, rxjs@^6.6.0: version "6.6.3" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" @@ -13575,11 +13489,6 @@ schema-utils@^3.0.0: ajv "^6.12.5" ajv-keywords "^3.5.2" -semaphore-async-await@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" - integrity sha1-hXvvXjZEYBykuVcLh+nfXKEpdPo= - semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" @@ -14217,16 +14126,6 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -string-similarity@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-similarity/-/string-similarity-2.0.0.tgz#c16d8fc7e7c8dce706742c87adc482dbdb7030bb" - integrity sha512-62FBZrVXV5cI23bQ9L49Y4d9u9yaH61JhAwLyUFUzQbHDjdihxdfCwIherg+vylR/s4ucCddK8iKSEO7kinffQ== - -string-template@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" - integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0= - string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -14460,11 +14359,6 @@ svg-url-loader@~6.0.0: file-loader "~6.0.0" loader-utils "~2.0.0" -symbol-observable@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" - integrity sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ= - symbol-tree@^3.2.2, symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" @@ -14532,6 +14426,11 @@ temp-dir@^1.0.0: resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= +temp-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" + integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== + temp-write@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.4.0.tgz#8cff630fb7e9da05f047c74ce4ce4d685457d492" @@ -14544,6 +14443,17 @@ temp-write@^3.4.0: temp-dir "^1.0.0" uuid "^3.0.1" +tempy@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tempy/-/tempy-1.0.1.tgz#30fe901fd869cfb36ee2bd999805aa72fbb035de" + integrity sha512-biM9brNqxSc04Ee71hzFbryD11nX7VPhQQY32AdDmjFvodsRFz/3ufeoTZ6uYkRFfGo188tENcASNs3vTdsM0w== + dependencies: + del "^6.0.0" + is-stream "^2.0.0" + temp-dir "^2.0.0" + type-fest "^0.16.0" + unique-string "^2.0.0" + terminal-link@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" @@ -14645,15 +14555,6 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" -thriftrw@^3.5.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/thriftrw/-/thriftrw-3.12.0.tgz#30857847755e7f036b2e0a79d11c9f55075539d9" - integrity sha512-4YZvR4DPEI41n4Opwr4jmrLGG4hndxr7387kzRFIIzxHQjarPusH4lGXrugvgb7TtPrfZVTpZCVe44/xUxowEw== - dependencies: - bufrw "^1.3.0" - error "7.0.2" - long "^2.4.0" - throat@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" @@ -14951,6 +14852,11 @@ type-fest@^0.13.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== +type-fest@^0.16.0: + version "0.16.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.16.0.tgz#3240b891a78b0deae910dbeb86553e552a148860" + integrity sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg== + type-fest@^0.20.2: version "0.20.2" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" @@ -15039,6 +14945,21 @@ typedoc@^0.14.2: typedoc-default-themes "^0.5.0" typescript "3.2.x" +typescript-language-server@^0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/typescript-language-server/-/typescript-language-server-0.6.4.tgz#0ccf1488ca5bee418e45313c941d12d72be16b3d" + integrity sha512-tcN3Kyq/tHF79rNdueFNOyY3fTFTj9t0oneoLzkAhV35QBghxwX1eDi6oOnzIglZjSbJWosdnedHHfyjqQ62ig== + dependencies: + command-exists "^1.2.6" + commander "^7.2.0" + fs-extra "^10.0.0" + p-debounce "^2.1.0" + tempy "^1.0.1" + vscode-languageserver "^7.0.0" + vscode-languageserver-protocol "^3.16.0" + vscode-languageserver-textdocument "^1.0.1" + vscode-uri "^1.0.5" + typescript@3.2.x: version "3.2.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.4.tgz#c585cb952912263d915b462726ce244ba510ef3d" @@ -15049,11 +14970,6 @@ typescript@^2.9.1: resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" integrity sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w== -typescript@~3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8" - integrity sha512-kk80vLW9iGtjMnIv11qyxLqZm20UklzuR2tL0QAnDIygIUIemcZMxlMWudl9OOt76H3ntVzcTiddQ1/pAAJMYg== - typescript@~4.1.3: version "4.1.6" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.6.tgz#1becd85d77567c3c741172339e93ce2e69932138" @@ -15216,6 +15132,13 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" +unique-string@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" + integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg== + dependencies: + crypto-random-string "^2.0.0" + unist-util-generated@^1.1.0: version "1.1.6" resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-1.1.6.tgz#5ab51f689e2992a472beb1b35f2ce7ff2f324d4b" @@ -15427,7 +15350,7 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^3.0.1, uuid@^3.2.1, uuid@^3.3.2, uuid@^3.3.3: +uuid@^3.0.1, uuid@^3.3.2, uuid@^3.3.3: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -15685,7 +15608,7 @@ vscode-languageserver-types@3.14.0: resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.14.0.tgz#d3b5952246d30e5241592b6dde8280e03942e743" integrity sha512-lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A== -vscode-languageserver-types@3.15.1, vscode-languageserver-types@^3.0.3, vscode-languageserver-types@^3.13.0, vscode-languageserver-types@^3.7.2: +vscode-languageserver-types@3.15.1, vscode-languageserver-types@^3.13.0, vscode-languageserver-types@^3.7.2: version "3.15.1" resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.15.1.tgz#17be71d78d2f6236d414f0001ce1ef4d23e6b6de" integrity sha512-+a9MPUQrNGRrGU630OGbYVQ+11iOIovjCkqxajPa9w57Sd5ruK8WQNsslzpa0x/QJqC8kRc2DUxWjIFwoNm4ZQ== @@ -15731,7 +15654,7 @@ vscode-languageserver@^4.1.3: vscode-languageserver-protocol "^3.10.3" vscode-uri "^1.0.5" -vscode-languageserver@^5.0.0, vscode-languageserver@^5.2.1: +vscode-languageserver@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-5.2.1.tgz#0d2feddd33f92aadf5da32450df498d52f6f14eb" integrity sha512-GuayqdKZqAwwaCUjDvMTAVRPJOp/SLON3mJ07eGsx/Iq9HjRymhKWztX41rISqDKhHVVyFM+IywICyZDla6U3A== @@ -16307,12 +16230,7 @@ xmlhttprequest-ssl@~1.5.4: resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= -xorshift@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/xorshift/-/xorshift-0.2.1.tgz#fcd82267e9351c13f0fb9c73307f25331d29c63a" - integrity sha1-/NgiZ+k1HBPw+5xzMH8lMx0pxjo= - -xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: +xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== From d4c066f0ca1cb73af513c80154aedb5be0f76314 Mon Sep 17 00:00:00 2001 From: krassowski Date: Sun, 24 Oct 2021 14:43:21 +0100 Subject: [PATCH 2/5] Pin autopep8 --- requirements/github-actions.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements/github-actions.yml b/requirements/github-actions.yml index b8dfd0fff..6ffa82834 100644 --- a/requirements/github-actions.yml +++ b/requirements/github-actions.yml @@ -11,6 +11,8 @@ dependencies: - nodejs {nodejs} # for python language server (and development) - flake8 >=3.5 + # temporarily pin autopep8 + - autopep8 <1.6.0 # for R language server and kernel # TODO: try r 4.0 soon - r <4 From 790a239bc25601f9320e9f1b7cee4b09f7301617 Mon Sep 17 00:00:00 2001 From: krassowski Date: Sun, 24 Oct 2021 17:29:26 +0100 Subject: [PATCH 3/5] Update Python tests for typescript-language-server --- python_packages/jupyter_lsp/jupyter_lsp/tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_packages/jupyter_lsp/jupyter_lsp/tests/conftest.py b/python_packages/jupyter_lsp/jupyter_lsp/tests/conftest.py index eeb004cd9..58197d350 100644 --- a/python_packages/jupyter_lsp/jupyter_lsp/tests/conftest.py +++ b/python_packages/jupyter_lsp/jupyter_lsp/tests/conftest.py @@ -18,7 +18,7 @@ KNOWN_SERVERS = [ "bash-language-server", "dockerfile-language-server-nodejs", - "javascript-typescript-langserver", + "typescript-language-server", "pylsp", "unified-language-server", "sql-language-server", From 3d94fde90f239d55385729c740bb264099fc491e Mon Sep 17 00:00:00 2001 From: krassowski Date: Sun, 24 Oct 2021 17:59:10 +0100 Subject: [PATCH 4/5] Actually import the spec --- docs/Extending.ipynb | 4 ++-- docs/Roadmap.ipynb | 4 ++-- python_packages/jupyter_lsp/jupyter_lsp/specs/__init__.py | 4 +++- python_packages/jupyter_lsp/setup.cfg | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/Extending.ipynb b/docs/Extending.ipynb index 449b05a23..ce6f9a826 100644 --- a/docs/Extending.ipynb +++ b/docs/Extending.ipynb @@ -238,8 +238,8 @@ " {\n", " 'all_listeners': ['some.module.some_function'],\n", " 'client_listeners': ['some.module.some_other_function'],\n", - " 'server_listeners': ['some.module.yet_another_function'],\n", - " },\n", + " 'server_listeners': ['some.module.yet_another_function']\n", + " }\n", "}\n", "```" ] diff --git a/docs/Roadmap.ipynb b/docs/Roadmap.ipynb index 87e788fc4..959f05230 100644 --- a/docs/Roadmap.ipynb +++ b/docs/Roadmap.ipynb @@ -35,8 +35,8 @@ "source": [ "### Backend\n", "\n", - "- [#49](https://github.com/jupyter-lsp/jupyterlab-lsp/issues/49) cookiecutter for\n", - " pip-installable specs\n", + "- [#49](https://github.com/jupyter-lsp/jupyterlab-lsp/issues/49) cookiecutter\n", + " for pip-installable specs\n", "- add hook system to allow serverextensions/kernels to modify, inspect and react\n", " to LSP messages" ] diff --git a/python_packages/jupyter_lsp/jupyter_lsp/specs/__init__.py b/python_packages/jupyter_lsp/jupyter_lsp/specs/__init__.py index 9081d342a..edd15f613 100644 --- a/python_packages/jupyter_lsp/jupyter_lsp/specs/__init__.py +++ b/python_packages/jupyter_lsp/jupyter_lsp/specs/__init__.py @@ -13,6 +13,7 @@ from .r_languageserver import RLanguageServer from .sql_language_server import SQLLanguageServer from .texlab import Texlab +from .typescript_language_server import TypescriptLanguageServer from .unified_language_server import UnifiedLanguageServer from .vscode_css_languageserver import VSCodeCSSLanguageServer from .vscode_html_languageserver import VSCodeHTMLLanguageServer @@ -32,6 +33,7 @@ pyright = PyrightLanguageServer() r = RLanguageServer() tex = Texlab() -ts = JavascriptTypescriptLanguageServer() +ts_old = JavascriptTypescriptLanguageServer() +ts = TypescriptLanguageServer() sql = SQLLanguageServer() yaml = YAMLLanguageServer() diff --git a/python_packages/jupyter_lsp/setup.cfg b/python_packages/jupyter_lsp/setup.cfg index be52d9962..816f53255 100644 --- a/python_packages/jupyter_lsp/setup.cfg +++ b/python_packages/jupyter_lsp/setup.cfg @@ -36,7 +36,7 @@ install_requires = jupyter_lsp_spec_v1 = bash-language-server = jupyter_lsp.specs:bash dockerfile-language-server-nodejs = jupyter_lsp.specs:dockerfile - javascript-typescript-langserver = jupyter_lsp.specs:ts + javascript-typescript-langserver = jupyter_lsp.specs:ts_old jedi-language-server = jupyter_lsp.specs:jedi julia-language-server = jupyter_lsp.specs:julia python-language-server = jupyter_lsp.specs:py_palantir @@ -44,6 +44,7 @@ jupyter_lsp_spec_v1 = pyright = jupyter_lsp.specs:pyright r-languageserver = jupyter_lsp.specs:r texlab = jupyter_lsp.specs:tex + typescript-language-server = jupyter_lsp.specs:ts sql-language-server = jupyter_lsp.specs:sql unified-language-server = jupyter_lsp.specs:md vscode-css-languageserver-bin = jupyter_lsp.specs:css From a07e008283ec9c1f2e6ce1147c552f509e9e646a Mon Sep 17 00:00:00 2001 From: krassowski Date: Sun, 24 Oct 2021 19:35:51 +0100 Subject: [PATCH 5/5] Update the tests for new typescript server --- atest/01_Editor.robot | 2 +- atest/05_Features/Hover.robot | 2 +- atest/examples/example.tsx | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/atest/01_Editor.robot b/atest/01_Editor.robot index f65d7c50f..c3cfd6590 100644 --- a/atest/01_Editor.robot +++ b/atest/01_Editor.robot @@ -61,7 +61,7 @@ SCSS TSX ${def} = Set Variable xpath:(//span[contains(@class, 'cm-tag')][contains(text(), 'HelloWorld')])[last()] - Editor Shows Features for Language TSX example.tsx Diagnostics=Cannot find module 'react' Jump to Definition=${def} Rename=${def} + Editor Shows Features for Language TSX example.tsx Diagnostics='hello' is declared but its value is never read. Jump to Definition=${def} Rename=${def} TypeScript ${def} = Set Variable xpath:(//span[contains(@class, 'cm-variable')][contains(text(), 'inc')])[last()] diff --git a/atest/05_Features/Hover.robot b/atest/05_Features/Hover.robot index 28a68da7f..e5610e6a7 100644 --- a/atest/05_Features/Hover.robot +++ b/atest/05_Features/Hover.robot @@ -42,7 +42,7 @@ Hover works in foreign code (javascript) # also for multiple cells of the same document Enter Cell Editor 3 Trigger Tooltip Math - Element Should Contain ${HOVER_BOX} const Math: Math + Element Should Contain ${HOVER_BOX} Math: Math *** Keywords *** Last Occurrence diff --git a/atest/examples/example.tsx b/atest/examples/example.tsx index a85c2fed7..a2cbb09a8 100644 --- a/atest/examples/example.tsx +++ b/atest/examples/example.tsx @@ -7,5 +7,3 @@ export class HelloWorld extends React.Component { } const hello = ; - -;hello; \ No newline at end of file