From 7ed90a20d04982ae15a52ae2378cbffd4b6839df Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 5 Jun 2024 11:04:16 -0400 Subject: fix: better handling of npm resolution occurring on workers (#24094) Closes https://github.com/denoland/deno/issues/24063 --- cli/lsp/testing/collectors.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/lsp/testing') diff --git a/cli/lsp/testing/collectors.rs b/cli/lsp/testing/collectors.rs index 508e50f9b..7b00228df 100644 --- a/cli/lsp/testing/collectors.rs +++ b/cli/lsp/testing/collectors.rs @@ -641,14 +641,14 @@ pub mod tests { let parsed_module = deno_ast::parse_module(deno_ast::ParseParams { specifier: specifier.clone(), - text_info: deno_ast::SourceTextInfo::new(source.into()), + text: source.into(), media_type: deno_ast::MediaType::TypeScript, capture_tokens: true, scope_analysis: true, maybe_syntax: None, }) .unwrap(); - let text_info = parsed_module.text_info().clone(); + let text_info = parsed_module.text_info_lazy().clone(); let mut collector = TestCollector::new(specifier, text_info); parsed_module.module().visit_with(&mut collector); collector.take() -- cgit v1.2.3