summaryrefslogtreecommitdiff
path: root/cli/lsp/cache.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-08-20 11:31:33 -0400
committerGitHub <noreply@github.com>2022-08-20 11:31:33 -0400
commit87f80ff6be5e2a132b583a9c380fff5db3cb2b07 (patch)
treeb2c43c9004b9ada204f3b5db7c221fa6322f026a /cli/lsp/cache.rs
parent1ffbd561642d05a05e18ada764d50581dea779ef (diff)
feat(unstable): initial support for npm specifiers (#15484)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/lsp/cache.rs')
-rw-r--r--cli/lsp/cache.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/lsp/cache.rs b/cli/lsp/cache.rs
index 77f356486..c4512a803 100644
--- a/cli/lsp/cache.rs
+++ b/cli/lsp/cache.rs
@@ -67,7 +67,7 @@ impl CacheMetadata {
&self,
specifier: &ModuleSpecifier,
) -> Option<Arc<HashMap<MetadataKey, String>>> {
- if specifier.scheme() == "file" {
+ if specifier.scheme() == "file" || specifier.scheme() == "npm" {
return None;
}
let version = self
@@ -83,7 +83,7 @@ impl CacheMetadata {
}
fn refresh(&self, specifier: &ModuleSpecifier) -> Option<Metadata> {
- if specifier.scheme() == "file" {
+ if specifier.scheme() == "file" || specifier.scheme() == "npm" {
return None;
}
let cache_filename = self.cache.get_cache_filename(specifier)?;