From 18f998fbee51f5dc2f31f6172bcdc7390bf795fa Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 16 Mar 2022 21:37:02 -0400 Subject: [PATCH] chore: fix build (#13997) --- Cargo.lock | 11 +++++++++-- cli/Cargo.toml | 2 +- cli/compat/mod.rs | 2 +- cli/tools/lint.rs | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 27a59c7e86..44f3a502af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2518,11 +2518,12 @@ dependencies = [ [[package]] name = "node_resolver" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35ed1604f6f4e33b51926d6be3bc09423f35eec776165c460c313dc2970ea5a" +checksum = "f1012fcb4f5cc14c272731f4baf6ba8a2d40c650908f4d2531f7ed17f214e5ae" dependencies = [ "anyhow", + "path-clean", "serde", "serde_json", ] @@ -2760,6 +2761,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "path-clean" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecba01bf2678719532c5e3059e0b5f0811273d94b397088b82e3bd0a78c78fdd" + [[package]] name = "pem-rfc7468" version = "0.2.4" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 5920ffacb2..cea7f44e85 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -75,7 +75,7 @@ jsonc-parser = { version = "=0.19.0", features = ["serde"] } libc = "=0.2.106" log = { version = "=0.4.14", features = ["serde"] } lspower = "=1.4.0" -node_resolver = "0.1.0" +node_resolver = "=0.1.1" notify = "=5.0.0-pre.12" num-format = "=0.4.0" once_cell = "=1.9.0" diff --git a/cli/compat/mod.rs b/cli/compat/mod.rs index 80838e2296..e133368d21 100644 --- a/cli/compat/mod.rs +++ b/cli/compat/mod.rs @@ -190,7 +190,7 @@ pub async fn translate_cjs_to_esm( // if there are reexports, handle them first for (idx, reexport) in analysis.reexports.iter().enumerate() { // Firstly, resolve relate reexport specifier - let resolved_reexport = node_resolver::node_resolve( + let resolved_reexport = node_resolver::resolve( reexport, &specifier.to_file_path().unwrap(), // FIXME(bartlomieju): check if these conditions are okay, probably diff --git a/cli/tools/lint.rs b/cli/tools/lint.rs index 1dfda8adc3..160ff88ff7 100644 --- a/cli/tools/lint.rs +++ b/cli/tools/lint.rs @@ -550,7 +550,7 @@ pub(crate) fn get_configured_rules( ); if configured_rules.is_empty() { - anyhow!("No rules have been configured"); + return Err(anyhow!("No rules have been configured")); } Ok(configured_rules)