diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-07-17 23:06:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-17 23:06:30 -0400 |
commit | ecd4f900c62d3de1f3e08c5d1f34a5e6430aa413 (patch) | |
tree | 9ca5cb90e0f935159963f7e217092f31d7c4698a /cli/tools/registry/graph.rs | |
parent | bf9c08b705725bf35b60fb8a468edbc35ba3cdde (diff) |
fix(publish): surface syntax errors when using --no-check (#24620)
Diffstat (limited to 'cli/tools/registry/graph.rs')
-rw-r--r-- | cli/tools/registry/graph.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/tools/registry/graph.rs b/cli/tools/registry/graph.rs index 73b72c1b6..bdcb27aa1 100644 --- a/cli/tools/registry/graph.rs +++ b/cli/tools/registry/graph.rs @@ -147,6 +147,13 @@ impl GraphDiagnosticsCollector { let parsed_source = self .parsed_source_cache .get_parsed_source_from_js_module(module)?; + + // surface syntax errors + for diagnostic in parsed_source.diagnostics() { + diagnostics_collector + .push(PublishDiagnostic::SyntaxError(diagnostic.clone())); + } + check_for_banned_triple_slash_directives( &parsed_source, diagnostics_collector, |