diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-04-26 13:07:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-26 13:07:15 -0400 |
commit | 55a9977c6252a38fac721ad789df0c7e8acf33c9 (patch) | |
tree | b549994ba0766a1f980c0565afcf325af405902e /cli/proc_state.rs | |
parent | 5f7db93d0b883abaeae392e5bd8ea5b48e9fe4b5 (diff) |
refactor(compile): remove usage of ProcState and CliOptions (#18855)
Diffstat (limited to 'cli/proc_state.rs')
-rw-r--r-- | cli/proc_state.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/cli/proc_state.rs b/cli/proc_state.rs index b6529d3a0..950e19824 100644 --- a/cli/proc_state.rs +++ b/cli/proc_state.rs @@ -227,8 +227,8 @@ impl ProcState { let lockfile = cli_options.maybe_lock_file(); let npm_registry_url = CliNpmRegistryApi::default_url().to_owned(); - let npm_cache = Arc::new(NpmCache::from_deno_dir( - &dir, + let npm_cache = Arc::new(NpmCache::new( + dir.npm_folder_path(), cli_options.cache_setting(), http_client.clone(), progress_bar.clone(), @@ -250,7 +250,7 @@ impl ProcState { let node_fs = Arc::new(deno_node::RealFs); let npm_fs_resolver = create_npm_fs_resolver( node_fs.clone(), - npm_cache, + npm_cache.clone(), &progress_bar, npm_registry_url, npm_resolution.clone(), @@ -302,12 +302,6 @@ impl ProcState { parsed_source_cache.clone(), emit_options, )); - let npm_cache = Arc::new(NpmCache::from_deno_dir( - &dir, - cli_options.cache_setting(), - http_client.clone(), - progress_bar.clone(), - )); let file_fetcher = Arc::new(file_fetcher); let node_analysis_cache = NodeAnalysisCache::new(caches.node_analysis_db(&dir)); |