aboutsummaryrefslogtreecommitdiff
path: root/.yarn/sdks
diff options
context:
space:
mode:
Diffstat (limited to '.yarn/sdks')
-rw-r--r--.yarn/sdks/typescript/lib/tsserver.js22
-rw-r--r--.yarn/sdks/typescript/lib/tsserverlibrary.js22
-rw-r--r--.yarn/sdks/typescript/package.json2
3 files changed, 39 insertions, 7 deletions
diff --git a/.yarn/sdks/typescript/lib/tsserver.js b/.yarn/sdks/typescript/lib/tsserver.js
index 4d90f38..1537a48 100644
--- a/.yarn/sdks/typescript/lib/tsserver.js
+++ b/.yarn/sdks/typescript/lib/tsserver.js
@@ -91,9 +91,25 @@ const moduleWrapper = tsserver => {
}
function fromEditorPath(str) {
- return process.platform === `win32`
- ? str.replace(/^\^?zip:\//, ``)
- : str.replace(/^\^?zip:/, ``);
+ switch (hostInfo) {
+ case `coc-nvim`:
+ case `neovim`: {
+ str = str.replace(/\.zip::/, `.zip/`);
+ // The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
+ // So in order to convert it back, we use .* to match all the thing
+ // before `zipfile:`
+ return process.platform === `win32`
+ ? str.replace(/^.*zipfile:\//, ``)
+ : str.replace(/^.*zipfile:/, ``);
+ } break;
+
+ case `vscode`:
+ default: {
+ return process.platform === `win32`
+ ? str.replace(/^\^?zip:\//, ``)
+ : str.replace(/^\^?zip:/, ``);
+ } break;
+ }
}
// Force enable 'allowLocalPluginLoads'
diff --git a/.yarn/sdks/typescript/lib/tsserverlibrary.js b/.yarn/sdks/typescript/lib/tsserverlibrary.js
index c3de4ff..ad1737c 100644
--- a/.yarn/sdks/typescript/lib/tsserverlibrary.js
+++ b/.yarn/sdks/typescript/lib/tsserverlibrary.js
@@ -91,9 +91,25 @@ const moduleWrapper = tsserver => {
}
function fromEditorPath(str) {
- return process.platform === `win32`
- ? str.replace(/^\^?zip:\//, ``)
- : str.replace(/^\^?zip:/, ``);
+ switch (hostInfo) {
+ case `coc-nvim`:
+ case `neovim`: {
+ str = str.replace(/\.zip::/, `.zip/`);
+ // The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
+ // So in order to convert it back, we use .* to match all the thing
+ // before `zipfile:`
+ return process.platform === `win32`
+ ? str.replace(/^.*zipfile:\//, ``)
+ : str.replace(/^.*zipfile:/, ``);
+ } break;
+
+ case `vscode`:
+ default: {
+ return process.platform === `win32`
+ ? str.replace(/^\^?zip:\//, ``)
+ : str.replace(/^\^?zip:/, ``);
+ } break;
+ }
}
// Force enable 'allowLocalPluginLoads'
diff --git a/.yarn/sdks/typescript/package.json b/.yarn/sdks/typescript/package.json
index a5e90ed..1a10512 100644
--- a/.yarn/sdks/typescript/package.json
+++ b/.yarn/sdks/typescript/package.json
@@ -1,6 +1,6 @@
{
"name": "typescript",
- "version": "4.4.2-sdk",
+ "version": "4.4.3-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
}