summaryrefslogtreecommitdiff
path: root/cli/tools/vendor/specifiers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/vendor/specifiers.rs')
-rw-r--r--cli/tools/vendor/specifiers.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/cli/tools/vendor/specifiers.rs b/cli/tools/vendor/specifiers.rs
index 5d4f98278..9d513cc92 100644
--- a/cli/tools/vendor/specifiers.rs
+++ b/cli/tools/vendor/specifiers.rs
@@ -8,8 +8,9 @@ use deno_ast::ModuleSpecifier;
use deno_core::anyhow::anyhow;
use deno_core::error::AnyError;
-use crate::fs_util;
-use crate::fs_util::path_with_stem_suffix;
+use crate::util::path::is_banned_path_char;
+use crate::util::path::path_with_stem_suffix;
+use crate::util::path::root_url_to_safe_local_dirname;
/// Partitions the provided specifiers by the non-path and non-query parts of a specifier.
pub fn partition_by_root_specifiers<'a>(
@@ -30,7 +31,7 @@ pub fn partition_by_root_specifiers<'a>(
/// Gets the directory name to use for the provided root.
pub fn dir_name_for_root(root: &ModuleSpecifier) -> PathBuf {
- fs_util::root_url_to_safe_local_dirname(root)
+ root_url_to_safe_local_dirname(root)
}
/// Gets a unique file path given the provided file path
@@ -74,13 +75,7 @@ pub fn is_remote_specifier_text(text: &str) -> bool {
pub fn sanitize_filepath(text: &str) -> String {
text
.chars()
- .map(|c| {
- if fs_util::is_banned_path_char(c) {
- '_'
- } else {
- c
- }
- })
+ .map(|c| if is_banned_path_char(c) { '_' } else { c })
.collect()
}