summaryrefslogtreecommitdiff
path: root/cli/npm/resolvers/mod.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-03-13 14:18:29 -0400
committerGitHub <noreply@github.com>2023-03-13 18:18:29 +0000
commit44b0d4cb11853bcdc7aa61c1412719a13d572b24 (patch)
tree074bcf6b77b4174343c4d0f3c239c53b7adf8350 /cli/npm/resolvers/mod.rs
parente8f22c076525c2fa55115349157f67085df287bf (diff)
fix(npm): show a progress bar when initializing the node_modules folder (#18136)
Creating the node_modules folder when the packages are already downloaded can take a bit of time and not knowing what is going on can be confusing. It's better to show a progress bar.
Diffstat (limited to 'cli/npm/resolvers/mod.rs')
-rw-r--r--cli/npm/resolvers/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/npm/resolvers/mod.rs b/cli/npm/resolvers/mod.rs
index 49a3c46f7..61b020885 100644
--- a/cli/npm/resolvers/mod.rs
+++ b/cli/npm/resolvers/mod.rs
@@ -27,6 +27,7 @@ use std::sync::Arc;
use crate::args::Lockfile;
use crate::util::fs::canonicalize_path_maybe_not_exists;
+use crate::util::progress_bar::ProgressBar;
use self::common::NpmPackageFsResolver;
use self::local::LocalNpmPackageResolver;
@@ -276,6 +277,7 @@ impl RequireNpmResolver for NpmPackageResolver {
pub fn create_npm_fs_resolver(
cache: NpmCache,
+ progress_bar: &ProgressBar,
registry_url: Url,
resolution: NpmResolution,
maybe_node_modules_path: Option<PathBuf>,
@@ -283,6 +285,7 @@ pub fn create_npm_fs_resolver(
match maybe_node_modules_path {
Some(node_modules_folder) => Arc::new(LocalNpmPackageResolver::new(
cache,
+ progress_bar.clone(),
registry_url,
node_modules_folder,
resolution,