From 25752446d6166ff5733909160bae62cdd121339c Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sat, 9 Oct 2021 21:02:18 -0400 Subject: a whole lot of nothing --- .yarn/sdks/typescript/lib/tsserver.js | 22 +++++++++++++++++++--- .yarn/sdks/typescript/lib/tsserverlibrary.js | 22 +++++++++++++++++++--- .yarn/sdks/typescript/package.json | 2 +- 3 files changed, 39 insertions(+), 7 deletions(-) (limited to '.yarn/sdks') 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 //zipfile://.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 //zipfile://.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" } -- cgit