diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-03-21 11:46:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-21 15:46:40 +0000 |
commit | 2fcf1f14cf29bb68995f652f93a4f6e3cb55c8d7 (patch) | |
tree | 04fb972934969cb01a52f3b9b8af0a17134ef5b6 /cli/tools/info.rs | |
parent | 0366d6833f25b786e897ce0d6393f692507f0532 (diff) |
feat: TypeScript 5.0.2 (except decorators) (#18294)
This upgrades TypeScript to 5.0.2, but does not have ES decorator
support because swc does not support that yet.
Diffstat (limited to 'cli/tools/info.rs')
-rw-r--r-- | cli/tools/info.rs | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/cli/tools/info.rs b/cli/tools/info.rs index 1cc60286d..5d4bc7bad 100644 --- a/cli/tools/info.rs +++ b/cli/tools/info.rs @@ -15,6 +15,7 @@ use deno_graph::npm::NpmPackageNvReference; use deno_graph::npm::NpmPackageReqReference; use deno_graph::Dependency; use deno_graph::Module; +use deno_graph::ModuleError; use deno_graph::ModuleGraph; use deno_graph::ModuleGraphError; use deno_graph::Resolution; @@ -477,7 +478,8 @@ impl<'a> GraphDisplayContext<'a> { Ok(()) } Err(err) => { - if let ModuleGraphError::Missing(_, _) = *err { + if let ModuleGraphError::ModuleError(ModuleError::Missing(_, _)) = *err + { writeln!( writer, "{} module could not be found", @@ -621,28 +623,29 @@ impl<'a> GraphDisplayContext<'a> { ) -> TreeNode { self.seen.insert(specifier.to_string()); match err { - ModuleGraphError::InvalidTypeAssertion { .. } => { - self.build_error_msg(specifier, "(invalid import assertion)") - } - ModuleGraphError::LoadingErr(_, _, _) => { - self.build_error_msg(specifier, "(loading error)") - } - ModuleGraphError::ParseErr(_, _) => { - self.build_error_msg(specifier, "(parsing error)") - } + ModuleGraphError::ModuleError(err) => match err { + ModuleError::InvalidTypeAssertion { .. } => { + self.build_error_msg(specifier, "(invalid import assertion)") + } + ModuleError::LoadingErr(_, _, _) => { + self.build_error_msg(specifier, "(loading error)") + } + ModuleError::ParseErr(_, _) => { + self.build_error_msg(specifier, "(parsing error)") + } + ModuleError::UnsupportedImportAssertionType { .. } => { + self.build_error_msg(specifier, "(unsupported import assertion)") + } + ModuleError::UnsupportedMediaType { .. } => { + self.build_error_msg(specifier, "(unsupported)") + } + ModuleError::Missing(_, _) | ModuleError::MissingDynamic(_, _) => { + self.build_error_msg(specifier, "(missing)") + } + }, ModuleGraphError::ResolutionError(_) => { self.build_error_msg(specifier, "(resolution error)") } - ModuleGraphError::UnsupportedImportAssertionType { .. } => { - self.build_error_msg(specifier, "(unsupported import assertion)") - } - ModuleGraphError::UnsupportedMediaType { .. } => { - self.build_error_msg(specifier, "(unsupported)") - } - ModuleGraphError::Missing(_, _) - | ModuleGraphError::MissingDynamic(_, _) => { - self.build_error_msg(specifier, "(missing)") - } } } |