diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-10-25 18:20:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-25 18:20:07 +0200 |
commit | 9835b095e56bdfc2b195b2c4741631b78a759115 (patch) | |
tree | 1fa8ee44cdc374d48c2307c1bd35085af74ec85b /cli/npm/resolvers/local.rs | |
parent | 10c3c0ee5733cfa5cf4c2825c6a8fce9f05060aa (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.rs | 5 |
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( |