summaryrefslogtreecommitdiff
path: root/cli/lsp/language_server.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-06-08 11:48:29 -0400
committerGitHub <noreply@github.com>2023-06-08 11:48:29 -0400
commit55f01508540e015563e5e54fd0652e81b347b9c1 (patch)
treedee62f23a86df0545801956aa4422825b940e821 /cli/lsp/language_server.rs
parent976c38104569182ba41d9351a108e673f63ffb98 (diff)
refactor(compile): store the npm snapshot in the eszip (#19343)
Diffstat (limited to 'cli/lsp/language_server.rs')
-rw-r--r--cli/lsp/language_server.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs
index 66ad043ce..ecd91f459 100644
--- a/cli/lsp/language_server.rs
+++ b/cli/lsp/language_server.rs
@@ -97,6 +97,7 @@ use crate::npm::create_npm_fs_resolver;
use crate::npm::CliNpmRegistryApi;
use crate::npm::CliNpmResolver;
use crate::npm::NpmCache;
+use crate::npm::NpmCacheDir;
use crate::npm::NpmResolution;
use crate::tools::fmt::format_file;
use crate::tools::fmt::format_parsed_source;
@@ -542,12 +543,13 @@ fn create_npm_api_and_cache(
progress_bar: &ProgressBar,
) -> (Arc<CliNpmRegistryApi>, Arc<NpmCache>) {
let npm_cache = Arc::new(NpmCache::new(
- dir.npm_folder_path(),
+ NpmCacheDir::new(dir.npm_folder_path()),
// Use an "only" cache setting in order to make the
// user do an explicit "cache" command and prevent
// the cache from being filled with lots of packages while
// the user is typing.
CacheSetting::Only,
+ Arc::new(deno_fs::RealFs),
http_client.clone(),
progress_bar.clone(),
));