summaryrefslogtreecommitdiff
path: root/cli/npm/cache.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-09-14 13:51:28 -0400
committerGitHub <noreply@github.com>2023-09-14 17:51:28 +0000
commite66d3c2c2e287879a757e12943a6d240981cb9e8 (patch)
tree827f518778324a091fa3fbbe8f533fc10b74200a /cli/npm/cache.rs
parent54890ee98b9068af41214b86fb693135f0998a0a (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/cache.rs')
-rw-r--r--cli/npm/cache.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/cli/npm/cache.rs b/cli/npm/cache.rs
index 587ce6fd0..f76bf6821 100644
--- a/cli/npm/cache.rs
+++ b/cli/npm/cache.rs
@@ -18,7 +18,6 @@ use deno_npm::NpmPackageCacheFolderId;
use deno_runtime::deno_fs;
use deno_semver::package::PackageNv;
use deno_semver::Version;
-use once_cell::sync::Lazy;
use crate::args::CacheSetting;
use crate::http_util::HttpClient;
@@ -29,17 +28,6 @@ use crate::util::progress_bar::ProgressBar;
use super::tarball::verify_and_extract_tarball;
-static SHOULD_SYNC_DOWNLOAD: Lazy<bool> =
- Lazy::new(|| std::env::var("DENO_UNSTABLE_NPM_SYNC_DOWNLOAD").is_ok());
-
-/// For some of the tests, we want downloading of packages
-/// to be deterministic so that the output is always the same
-pub fn should_sync_download() -> bool {
- // this gets called a lot when doing npm resolution and was taking
- // a significant amount of time, so cache it in a lazy
- *SHOULD_SYNC_DOWNLOAD
-}
-
const NPM_PACKAGE_SYNC_LOCK_FILENAME: &str = ".deno_sync_lock";
pub fn with_folder_sync_lock(