From b6a3f8f722db89bc136e91da598f581c5838d38e Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Sun, 28 May 2023 19:44:41 +0100 Subject: 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. --- cli/graph_util.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cli/graph_util.rs') 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( -- cgit v1.2.3