diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-12-13 13:53:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-13 13:53:32 +0100 |
commit | 435948e47057a5d8f2ffffebf74b9f84e31770f8 (patch) | |
tree | 2b31cfb0b63b2436bf2d10e5ce867b7ae61a75d9 /cli/lsp/documents.rs | |
parent | 5d9bb8b4b042f4d4fbbe61b31a50a26db7f1ae63 (diff) |
feat(repl): support npm packages (#16770)
Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to 'cli/lsp/documents.rs')
-rw-r--r-- | cli/lsp/documents.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs index 18464b178..82e2618b3 100644 --- a/cli/lsp/documents.rs +++ b/cli/lsp/documents.rs @@ -699,10 +699,10 @@ fn get_document_path( cache: &HttpCache, specifier: &ModuleSpecifier, ) -> Option<PathBuf> { - if specifier.scheme() == "file" { - specifier_to_file_path(specifier).ok() - } else { - cache.get_cache_filename(specifier) + match specifier.scheme() { + "npm" | "node" => None, + "file" => specifier_to_file_path(specifier).ok(), + _ => cache.get_cache_filename(specifier), } } |