diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-09-14 13:51:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 17:51:28 +0000 |
commit | e66d3c2c2e287879a757e12943a6d240981cb9e8 (patch) | |
tree | 827f518778324a091fa3fbbe8f533fc10b74200a /cli/npm/resolvers/local.rs | |
parent | 54890ee98b9068af41214b86fb693135f0998a0a (diff) |
refactor: remove `DENO_UNSTABLE_NPM_SYNC_DOWNLOAD` and custom sync functionality (#20504)
https://github.com/denoland/deno/pull/20488 enables us to remove this
functionality. This is better because our test suite is now not testing
a separate code path.
Diffstat (limited to 'cli/npm/resolvers/local.rs')
-rw-r--r-- | cli/npm/resolvers/local.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/cli/npm/resolvers/local.rs b/cli/npm/resolvers/local.rs index f8d7c2848..afa95e756 100644 --- a/cli/npm/resolvers/local.rs +++ b/cli/npm/resolvers/local.rs @@ -42,7 +42,6 @@ use serde::Deserialize; use serde::Serialize; use crate::npm::cache::mixed_case_package_name_encode; -use crate::npm::cache::should_sync_download; use crate::npm::resolution::NpmResolution; use crate::npm::NpmCache; use crate::util::fs::copy_dir_recursive; @@ -300,14 +299,8 @@ async fn sync_resolution_with_fs( // // Copy (hardlink in future) <global_registry_cache>/<package_id>/ to // node_modules/.deno/<package_folder_id_folder_name>/node_modules/<package_name> - let sync_download = should_sync_download(); - let mut package_partitions = + let package_partitions = snapshot.all_system_packages_partitioned(system_info); - if sync_download { - // we're running the tests not with --quiet - // and we want the output to be deterministic - package_partitions.packages.sort_by(|a, b| a.id.cmp(&b.id)); - } let mut handles: Vec<JoinHandle<Result<(), AnyError>>> = Vec::with_capacity(package_partitions.packages.len()); let mut newest_packages_by_name: HashMap<&String, &NpmResolutionPackage> = @@ -363,11 +356,7 @@ async fn sync_resolution_with_fs( drop(pb_guard); // explicit for clarity Ok(()) }); - if sync_download { - handle.await??; - } else { - handles.push(handle); - } + handles.push(handle); } } |