Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Aug 15, 2023
1 parent 9dc2064 commit 972cd9a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
10 changes: 2 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ tokio = { version = "1", features = ["macros", "rt"] }
reqwest = { version = "0.11", features = ["rustls-tls"] }
jsonc-parser = { version = "0.21.1", features = ["serde"] }
insta = "1.31.0"

[patch.crates-io]
deno_semver = { path = "../deno_semver" }
deno_graph = { path = "../deno_graph" }
deno_npm = { path = "../deno_npm" }
10 changes: 5 additions & 5 deletions src/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use deno_npm::resolution::SerializedNpmResolutionSnapshot;
use deno_npm::resolution::SerializedNpmResolutionSnapshotPackage;
use deno_npm::resolution::ValidSerializedNpmResolutionSnapshot;
use deno_npm::NpmPackageId;
use deno_semver::npm::NpmPackageReq;
use deno_semver::package::PackageReq;
use futures::future::poll_fn;
use futures::io::AsyncReadExt;
use hashlink::linked_hash_map::LinkedHashMap;
Expand Down Expand Up @@ -990,7 +990,7 @@ async fn read_npm_section<R: futures::io::AsyncRead + Unpin>(
));
}
};
let req = NpmPackageReq::from_str(&req)
let req = PackageReq::from_str(&req)
.map_err(|err| ParseError::InvalidV2NpmPackageReq(req, err.into()))?;
root_packages.insert(req, id.clone());
}
Expand Down Expand Up @@ -1153,7 +1153,7 @@ mod tests {
use deno_npm::resolution::SerializedNpmResolutionSnapshot;
use deno_npm::resolution::SerializedNpmResolutionSnapshotPackage;
use deno_npm::NpmPackageId;
use deno_semver::npm::NpmPackageReq;
use deno_semver::package::PackageReq;
use futures::io::AllowStdIo;
use futures::io::BufReader;
use import_map::ImportMap;
Expand Down Expand Up @@ -2022,12 +2022,12 @@ mod tests {
assert_eq!(opaque_data.kind, ModuleKind::OpaqueData);
}

fn root_pkgs(pkgs: &[(&str, &str)]) -> HashMap<NpmPackageReq, NpmPackageId> {
fn root_pkgs(pkgs: &[(&str, &str)]) -> HashMap<PackageReq, NpmPackageId> {
pkgs
.iter()
.map(|(key, value)| {
(
NpmPackageReq::from_str(key).unwrap(),
PackageReq::from_str(key).unwrap(),
NpmPackageId::from_serialized(value).unwrap(),
)
})
Expand Down

0 comments on commit 972cd9a

Please sign in to comment.