summaryrefslogtreecommitdiff
path: root/cli/lsp/diagnostics.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/lsp/diagnostics.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/lsp/diagnostics.rs')
-rw-r--r--cli/lsp/diagnostics.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs
index a5e9d7bf8..6af6c92b3 100644
--- a/cli/lsp/diagnostics.rs
+++ b/cli/lsp/diagnostics.rs
@@ -1023,7 +1023,7 @@ fn diagnose_resolution(
}
} else if let Some(module_name) = specifier.as_str().strip_prefix("node:")
{
- if deno_node::resolve_builtin_node_module(module_name).is_err() {
+ if !deno_node::is_builtin_node_module(module_name) {
diagnostics
.push(DenoDiagnostic::InvalidNodeSpecifier(specifier.clone()));
} else if let Some(npm_resolver) = &snapshot.maybe_npm_resolver {