From 448fe67b7a2142f62332b651f9d215534dceb1f5 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 28 May 2024 14:58:43 -0400 Subject: feat(vendor): support modifying remote files in vendor folder without checksum errors (#23979) Includes: * https://github.com/denoland/deno_graph/pull/486 * https://github.com/denoland/deno_graph/pull/488 * https://github.com/denoland/deno_lockfile/pull/25 * https://github.com/denoland/deno_lockfile/pull/22 * https://github.com/denoland/deno_graph/pull/483 * https://github.com/denoland/deno_graph/pull/470 --- cli/npm/managed/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cli/npm/managed/mod.rs') diff --git a/cli/npm/managed/mod.rs b/cli/npm/managed/mod.rs index 3a2657cfb..938c16d9a 100644 --- a/cli/npm/managed/mod.rs +++ b/cli/npm/managed/mod.rs @@ -370,9 +370,8 @@ impl ManagedCliNpmResolver { self.fs_resolver.cache_packages().await?; // If there's a lock file, update it with all discovered npm packages - if let Some(lockfile_mutex) = &self.maybe_lockfile { - let mut lockfile = lockfile_mutex.lock(); - self.lock(&mut lockfile)?; + if let Some(lockfile) = &self.maybe_lockfile { + self.lock(&mut lockfile.lock()); } Ok(()) @@ -401,7 +400,7 @@ impl ManagedCliNpmResolver { .serialized_valid_snapshot_for_system(system_info) } - pub fn lock(&self, lockfile: &mut Lockfile) -> Result<(), AnyError> { + pub fn lock(&self, lockfile: &mut Lockfile) { self.resolution.lock(lockfile) } -- cgit v1.2.3