summaryrefslogtreecommitdiff
path: root/cli/npm/resolvers/common.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-10-25 18:20:07 +0200
committerGitHub <noreply@github.com>2022-10-25 18:20:07 +0200
commit9835b095e56bdfc2b195b2c4741631b78a759115 (patch)
tree1fa8ee44cdc374d48c2307c1bd35085af74ec85b /cli/npm/resolvers/common.rs
parent10c3c0ee5733cfa5cf4c2825c6a8fce9f05060aa (diff)
fix(npm): add support for npm packages in lock files (#15938)
This commit adds support for npm packages in the lock file.
Diffstat (limited to 'cli/npm/resolvers/common.rs')
-rw-r--r--cli/npm/resolvers/common.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/npm/resolvers/common.rs b/cli/npm/resolvers/common.rs
index 4981d5613..e114f3f8a 100644
--- a/cli/npm/resolvers/common.rs
+++ b/cli/npm/resolvers/common.rs
@@ -11,6 +11,7 @@ use deno_core::futures;
use deno_core::futures::future::BoxFuture;
use deno_core::url::Url;
+use crate::lockfile::Lockfile;
use crate::npm::cache::should_sync_download;
use crate::npm::resolution::NpmResolutionSnapshot;
use crate::npm::NpmCache;
@@ -50,6 +51,8 @@ pub trait InnerNpmPackageResolver: Send + Sync {
fn ensure_read_permission(&self, path: &Path) -> Result<(), AnyError>;
fn snapshot(&self) -> NpmResolutionSnapshot;
+
+ fn lock(&self, lockfile: &mut Lockfile) -> Result<(), AnyError>;
}
/// Caches all the packages in parallel.