mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
refactor(compile): store the npm snapshot in the eszip (#19343)
This commit is contained in:
parent
976c381045
commit
55f0150854
13 changed files with 104 additions and 67 deletions
|
@ -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(),
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue