Skip to content

Commit a5d515e

Browse files
committed
Merge branch 'master' into add-priority
2 parents 6d7647d + ffd47d3 commit a5d515e

File tree

3 files changed

+32
-13
lines changed

3 files changed

+32
-13
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
- add ability to deactivate Kernel completions or LSP completion through the settings ([#586], thanks @Carreau)
88
- allow to set a priority for LSP server, allowing to choose which server to use when multiple servers are installed ([#588])
99

10+
- bug fixes:
11+
- workaround url-parse issue causing problems when using JupyterLab 3.0.15 [#599]
12+
1013
[#586]: https://github.com/krassowski/jupyterlab-lsp/pull/586
1114
[#588]: https://github.com/krassowski/jupyterlab-lsp/pull/588
15+
[#599]: https://github.com/krassowski/jupyterlab-lsp/pull/599
1216

1317
### `jupyter-lsp 1.2.0` (2021-04-26)
1418

packages/jupyterlab-lsp/src/connection_manager.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,24 @@ export namespace DocumentConnectionManager {
378378
throw `No language server installed for language ${language}`;
379379
}
380380

381+
// workaround url-parse bug(s) (see https://github.com/krassowski/jupyterlab-lsp/issues/595)
382+
let documentUri = URLExt.join(baseUri, virtual_document.uri);
383+
if (
384+
!documentUri.startsWith('file:///') &&
385+
documentUri.startsWith('file://')
386+
) {
387+
documentUri = documentUri.replace('file://', 'file:///');
388+
if (
389+
documentUri.startsWith('file:///users/') &&
390+
baseUri.startsWith('file:///Users/')
391+
) {
392+
documentUri = documentUri.replace('file:///users/', 'file:///Users/');
393+
}
394+
}
395+
381396
return {
382397
base: baseUri,
383-
document: URLExt.join(baseUri, virtual_document.uri),
398+
document: documentUri,
384399
server: URLExt.join('ws://jupyter-lsp', language),
385400
socket: URLExt.join(
386401
wsBase,

yarn.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7179,9 +7179,9 @@ gud@^1.0.0:
71797179
integrity sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==
71807180

71817181
handlebars@*, handlebars@^4.0.6, handlebars@^4.7.6:
7182-
version "4.7.6"
7183-
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e"
7184-
integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==
7182+
version "4.7.7"
7183+
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1"
7184+
integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==
71857185
dependencies:
71867186
minimist "^1.2.5"
71877187
neo-async "^2.6.0"
@@ -9204,9 +9204,9 @@ lodash.uniq@^4.5.0:
92049204
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
92059205

92069206
lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.4, lodash@^4.2.1:
9207-
version "4.17.20"
9208-
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
9209-
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
9207+
version "4.17.21"
9208+
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
9209+
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
92109210

92119211
[email protected], log-symbols@^2.1.0:
92129212
version "2.2.0"
@@ -13327,9 +13327,9 @@ sshpk@^1.7.0:
1332713327
tweetnacl "~0.14.0"
1332813328

1332913329
ssri@^6.0.0, ssri@^6.0.1:
13330-
version "6.0.1"
13331-
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8"
13332-
integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==
13330+
version "6.0.2"
13331+
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5"
13332+
integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==
1333313333
dependencies:
1333413334
figgy-pudding "^3.5.1"
1333513335

@@ -14274,9 +14274,9 @@ [email protected]:
1427414274
source-map "~0.6.1"
1427514275

1427614276
uglify-js@^3.1.4:
14277-
version "3.11.5"
14278-
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.11.5.tgz#d6788bc83cf35ff18ea78a65763e480803409bc6"
14279-
integrity sha512-btvv/baMqe7HxP7zJSF7Uc16h1mSfuuSplT0/qdjxseesDU+yYzH33eHBH+eMdeRXwujXspaCTooWHQVVBh09w==
14277+
version "3.13.5"
14278+
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.5.tgz#5d71d6dbba64cf441f32929b1efce7365bb4f113"
14279+
integrity sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw==
1428014280

1428114281
1428214282
version "0.0.6"

0 commit comments

Comments
 (0)