summaryrefslogtreecommitdiff
path: root/cli/resolver.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/resolver.rs')
-rw-r--r--cli/resolver.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/cli/resolver.rs b/cli/resolver.rs
index 2c04823a7..5bb9e66d0 100644
--- a/cli/resolver.rs
+++ b/cli/resolver.rs
@@ -40,7 +40,7 @@ use std::sync::Arc;
use crate::args::package_json::PackageJsonDeps;
use crate::args::JsxImportSourceConfig;
use crate::args::PackageJsonDepsProvider;
-use crate::graph_util::format_range_with_colors;
+use crate::colors;
use crate::node::CliNodeCodeTranslator;
use crate::npm::ByonmCliNpmResolver;
use crate::npm::CliNpmResolver;
@@ -48,6 +48,15 @@ use crate::npm::InnerCliNpmResolverRef;
use crate::util::path::specifier_to_file_path;
use crate::util::sync::AtomicFlag;
+pub fn format_range_with_colors(range: &deno_graph::Range) -> String {
+ format!(
+ "{}:{}:{}",
+ colors::cyan(range.specifier.as_str()),
+ colors::yellow(&(range.start.line + 1).to_string()),
+ colors::yellow(&(range.start.character + 1).to_string())
+ )
+}
+
pub struct ModuleCodeStringSource {
pub code: ModuleCodeString,
pub found_url: ModuleSpecifier,