feat(lockfile): track JSR and npm dependencies in config file (#22004)

See overview in https://github.com/denoland/deno_lockfile/pull/13
This commit is contained in:
David Sherret 2024-01-22 16:31:12 -05:00 committed by GitHub
parent d20c9e75d1
commit 69d5f136ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 409 additions and 123 deletions

View file

@ -225,13 +225,21 @@ async fn snapshot_from_lockfile(
lockfile: Arc<Mutex<Lockfile>>,
api: &dyn NpmRegistryApi,
) -> Result<ValidSerializedNpmResolutionSnapshot, AnyError> {
let incomplete_snapshot = {
let (incomplete_snapshot, skip_integrity_check) = {
let lock = lockfile.lock();
deno_npm::resolution::incomplete_snapshot_from_lockfile(&lock)?
(
deno_npm::resolution::incomplete_snapshot_from_lockfile(&lock)?,
lock.overwrite,
)
};
let snapshot =
deno_npm::resolution::snapshot_from_lockfile(incomplete_snapshot, api)
.await?;
let snapshot = deno_npm::resolution::snapshot_from_lockfile(
deno_npm::resolution::SnapshotFromLockfileParams {
incomplete_snapshot,
api,
skip_integrity_check,
},
)
.await?;
Ok(snapshot)
}