diff --git a/Cargo.lock b/Cargo.lock index 36f24a9..be07b26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -265,8 +265,6 @@ dependencies = [ [[package]] name = "deno_graph" version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73502c4d93a17f259b6edee6d5a5ba063e2fcdcdaeb6ca1c6953129cc14be6a7" dependencies = [ "anyhow", "data-url", @@ -310,8 +308,6 @@ dependencies = [ [[package]] name = "deno_npm" version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "341f2c3935bee51c15203c587213c42d120f0dc56f0aca912a4bebbf038d1030" dependencies = [ "anyhow", "async-trait", @@ -327,8 +323,6 @@ dependencies = [ [[package]] name = "deno_semver" version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96f99990457915af1f444900003ffd5a9d3ab2e5337b06d681e56ca371b3e11f" dependencies = [ "monch", "once_cell", @@ -971,9 +965,9 @@ dependencies = [ [[package]] name = "monch" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1120c1ab92ab8cdacb3b89ac9a214f512d2e78e90e3b57c00d9551ced19f646f" +checksum = "4519a88847ba2d5ead3dc53f1060ec6a571de93f325d9c5c4968147382b1cbc3" [[package]] name = "native-tls" diff --git a/Cargo.toml b/Cargo.toml index d810c70..f6c60e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } diff --git a/src/v2.rs b/src/v2.rs index 54802d0..e65ac59 100644 --- a/src/v2.rs +++ b/src/v2.rs @@ -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; @@ -990,7 +990,7 @@ async fn read_npm_section( )); } }; - 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()); } @@ -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; @@ -2022,12 +2022,12 @@ mod tests { assert_eq!(opaque_data.kind, ModuleKind::OpaqueData); } - fn root_pkgs(pkgs: &[(&str, &str)]) -> HashMap { + fn root_pkgs(pkgs: &[(&str, &str)]) -> HashMap { pkgs .iter() .map(|(key, value)| { ( - NpmPackageReq::from_str(key).unwrap(), + PackageReq::from_str(key).unwrap(), NpmPackageId::from_serialized(value).unwrap(), ) })