summaryrefslogtreecommitdiff
path: root/cli/npm/resolvers/local.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/local.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/local.rs')
-rw-r--r--cli/npm/resolvers/local.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/npm/resolvers/local.rs b/cli/npm/resolvers/local.rs
index b51593d4c..6c4c4ef6c 100644
--- a/cli/npm/resolvers/local.rs
+++ b/cli/npm/resolvers/local.rs
@@ -22,6 +22,7 @@ use deno_runtime::deno_node::TYPES_CONDITIONS;
use tokio::task::JoinHandle;
use crate::fs_util;
+use crate::lockfile::Lockfile;
use crate::npm::cache::should_sync_download;
use crate::npm::resolution::NpmResolution;
use crate::npm::resolution::NpmResolutionSnapshot;
@@ -213,6 +214,10 @@ impl InnerNpmPackageResolver for LocalNpmPackageResolver {
fn snapshot(&self) -> NpmResolutionSnapshot {
self.resolution.snapshot()
}
+
+ fn lock(&self, lockfile: &mut Lockfile) -> Result<(), AnyError> {
+ self.resolution.lock(lockfile, &self.snapshot())
+ }
}
async fn sync_resolver_with_fs(