mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
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
This commit is contained in:
parent
cd8f5f53f7
commit
448fe67b7a
141 changed files with 1163 additions and 493 deletions
|
@ -292,7 +292,7 @@ impl NpmResolution {
|
|||
.as_valid_serialized_for_system(system_info)
|
||||
}
|
||||
|
||||
pub fn lock(&self, lockfile: &mut Lockfile) -> Result<(), AnyError> {
|
||||
pub fn lock(&self, lockfile: &mut Lockfile) {
|
||||
let snapshot = self.snapshot.read();
|
||||
populate_lockfile_from_snapshot(lockfile, &snapshot)
|
||||
}
|
||||
|
@ -345,7 +345,7 @@ async fn add_package_reqs_to_snapshot(
|
|||
|
||||
if let Some(lockfile_mutex) = maybe_lockfile {
|
||||
let mut lockfile = lockfile_mutex.lock();
|
||||
populate_lockfile_from_snapshot(&mut lockfile, &snapshot)?;
|
||||
populate_lockfile_from_snapshot(&mut lockfile, &snapshot);
|
||||
}
|
||||
|
||||
Ok(snapshot)
|
||||
|
@ -369,7 +369,7 @@ fn get_npm_pending_resolver(
|
|||
fn populate_lockfile_from_snapshot(
|
||||
lockfile: &mut Lockfile,
|
||||
snapshot: &NpmResolutionSnapshot,
|
||||
) -> Result<(), AnyError> {
|
||||
) {
|
||||
for (package_req, nv) in snapshot.package_reqs() {
|
||||
lockfile.insert_package_specifier(
|
||||
format!("npm:{}", package_req),
|
||||
|
@ -384,10 +384,8 @@ fn populate_lockfile_from_snapshot(
|
|||
);
|
||||
}
|
||||
for package in snapshot.all_packages_for_every_system() {
|
||||
lockfile
|
||||
.check_or_insert_npm_package(npm_package_to_lockfile_info(package))?;
|
||||
lockfile.insert_npm_package(npm_package_to_lockfile_info(package));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn npm_package_to_lockfile_info(
|
||||
|
@ -403,7 +401,6 @@ fn npm_package_to_lockfile_info(
|
|||
.collect();
|
||||
|
||||
NpmPackageLockfileInfo {
|
||||
display_id: pkg.id.nv.to_string(),
|
||||
serialized_id: pkg.id.as_serialized(),
|
||||
integrity: pkg.dist.integrity().for_lockfile(),
|
||||
dependencies,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue