summaryrefslogtreecommitdiff
path: root/cli/graph_util.rs
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2023-05-28 19:44:41 +0100
committerGitHub <noreply@github.com>2023-05-28 12:44:41 -0600
commitb6a3f8f722db89bc136e91da598f581c5838d38e (patch)
tree668542949383621fab493343cc2ddf8a4928c649 /cli/graph_util.rs
parentbb0676d3e23dfd7fe27f9932b955694d51438486 (diff)
refactor(core): remove ext: modules from the module map (#19040)
Rather than disallowing `ext:` resolution, clear the module map after initializing extensions so extension modules are anonymized. This operation is explicitly called in `deno_runtime`. Re-inject `node:` specifiers into the module map after doing this. Fixes #17717.
Diffstat (limited to 'cli/graph_util.rs')
-rw-r--r--cli/graph_util.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/graph_util.rs b/cli/graph_util.rs
index 90c4f8b38..976c2aeca 100644
--- a/cli/graph_util.rs
+++ b/cli/graph_util.rs
@@ -378,9 +378,8 @@ pub fn enhanced_resolution_error_message(error: &ResolutionError) -> String {
pub fn get_resolution_error_bare_node_specifier(
error: &ResolutionError,
) -> Option<&str> {
- get_resolution_error_bare_specifier(error).filter(|specifier| {
- deno_node::resolve_builtin_node_module(specifier).is_ok()
- })
+ get_resolution_error_bare_specifier(error)
+ .filter(|specifier| deno_node::is_builtin_node_module(specifier))
}
fn get_resolution_error_bare_specifier(