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/graph_util.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/graph_util.rs')
-rw-r--r-- | cli/graph_util.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cli/graph_util.rs b/cli/graph_util.rs index d98d3cfd0..6136c5691 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -22,6 +22,7 @@ use deno_core::ModuleSpecifier; use deno_core::TaskQueue; use deno_core::TaskQueuePermit; use deno_graph::Module; +use deno_graph::ModuleError; use deno_graph::ModuleGraph; use deno_graph::ModuleGraphError; use deno_graph::ResolutionError; @@ -83,7 +84,9 @@ pub fn graph_valid( .flat_map(|error| { let is_root = match &error { ModuleGraphError::ResolutionError(_) => false, - _ => roots.contains(error.specifier()), + ModuleGraphError::ModuleError(error) => { + roots.contains(error.specifier()) + } }; let mut message = if let ModuleGraphError::ResolutionError(err) = &error { enhanced_resolution_error_message(err) @@ -99,7 +102,10 @@ pub fn graph_valid( if options.is_vendoring { // warn about failing dynamic imports when vendoring, but don't fail completely - if matches!(error, ModuleGraphError::MissingDynamic(_, _)) { + if matches!( + error, + ModuleGraphError::ModuleError(ModuleError::MissingDynamic(_, _)) + ) { log::warn!("Ignoring: {:#}", message); return None; } @@ -436,7 +442,6 @@ mod test { specifier: input.to_string(), range: Range { specifier, - text: "".to_string(), start: Position::zeroed(), end: Position::zeroed(), }, @@ -453,7 +458,6 @@ mod test { let err = ResolutionError::InvalidSpecifier { range: Range { specifier, - text: "".to_string(), start: Position::zeroed(), end: Position::zeroed(), }, |