diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-02-08 20:40:26 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-09 01:40:26 +0000 |
commit | e5e2c45998d3a655c4b2d78c0a1fcb61e09c1982 (patch) | |
tree | 4a3af21378652245bdd2e58cc615458d5c163c2c /cli/lsp/documents.rs | |
parent | b07a156b1d2548c07c7e822ab69d2ef9bfaca630 (diff) |
fix: upgrade to deno_ast 0.33 (#22341)
* Uses diagnostics from deno_ast
* Real fix for https://github.com/denoland/deno/pull/22310
* Moves `deno lint --json` code here
* Upgrades swc
Closes #22117
Closes #22109
Closes #21927
Closes #20993
Diffstat (limited to 'cli/lsp/documents.rs')
-rw-r--r-- | cli/lsp/documents.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs index c758d341b..94d0e979b 100644 --- a/cli/lsp/documents.rs +++ b/cli/lsp/documents.rs @@ -246,7 +246,7 @@ impl AssetOrDocument { pub fn maybe_parsed_source( &self, - ) -> Option<Result<deno_ast::ParsedSource, deno_ast::Diagnostic>> { + ) -> Option<Result<deno_ast::ParsedSource, deno_ast::ParseDiagnostic>> { self.document().and_then(|d| d.maybe_parsed_source()) } @@ -283,7 +283,7 @@ impl DocumentDependencies { } type ModuleResult = Result<deno_graph::JsModule, deno_graph::ModuleGraphError>; -type ParsedSourceResult = Result<ParsedSource, deno_ast::Diagnostic>; +type ParsedSourceResult = Result<ParsedSource, deno_ast::ParseDiagnostic>; #[derive(Debug)] struct DocumentInner { @@ -595,7 +595,7 @@ impl Document { pub fn maybe_parsed_source( &self, - ) -> Option<Result<deno_ast::ParsedSource, deno_ast::Diagnostic>> { + ) -> Option<Result<deno_ast::ParsedSource, deno_ast::ParseDiagnostic>> { self.0.maybe_parsed_source.clone() } @@ -1855,7 +1855,7 @@ fn parse_source( maybe_headers: Option<&HashMap<String, String>>, ) -> ParsedSourceResult { deno_ast::parse_module(deno_ast::ParseParams { - specifier: specifier.to_string(), + specifier: specifier.clone(), text_info, media_type: MediaType::from_specifier_and_headers(specifier, maybe_headers), capture_tokens: true, |