diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-10-17 12:27:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-17 12:27:31 -0400 |
commit | 9df8d9d83140beb24a53b0ac52b1eaf2ea34c095 (patch) | |
tree | 3d170572b4ef2a7414db57bc223ef364fc7c0b0e /cli/npm/cache.rs | |
parent | 60dd84a5a042fdb706d3160d1f4a1deeeeec9889 (diff) |
perf(npm): parallelize caching of npm specifier package infos (#16323)
Diffstat (limited to 'cli/npm/cache.rs')
-rw-r--r-- | cli/npm/cache.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/npm/cache.rs b/cli/npm/cache.rs index 6b841501a..77ecf1228 100644 --- a/cli/npm/cache.rs +++ b/cli/npm/cache.rs @@ -23,6 +23,12 @@ use super::semver::NpmVersion; use super::tarball::verify_and_extract_tarball; use super::NpmPackageId; +/// 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 { + std::env::var("DENO_UNSTABLE_NPM_SYNC_DOWNLOAD") == Ok("1".to_string()) +} + pub const NPM_PACKAGE_SYNC_LOCK_FILENAME: &str = ".deno_sync_lock"; #[derive(Clone, Debug)] |