Skip to content

Commit

Permalink
fix one more
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Dec 5, 2024
1 parent 455e6b7 commit 51ab65e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,14 @@ pub async fn expand_star_exports(
}

fn emit_star_exports_issue(source_ident: Vc<AssetIdent>, message: RcStr) {
AnalyzeIssue {
code: None,
message: StyledString::Text(message).resolved_cell(),
AnalyzeIssue::new(
IssueSeverity::Warning.cell(),
source_ident,
severity: IssueSeverity::Warning.resolved_cell(),
source: None,
title: ResolvedVc::cell("unexpected export *".into()),
}
.cell()
Vc::cell("unexpected export *".into()),
StyledString::Text(message).cell(),
None,
None,
)
.emit();
}

Expand Down
18 changes: 8 additions & 10 deletions turbopack/crates/turbopack-ecmascript/src/references/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -848,16 +848,14 @@ pub(crate) async fn analyse_ecmascript_module_internal(
.resolved_cell();
analysis.set_async_module(async_module);
} else if let Some(span) = top_level_await_span {
AnalyzeIssue {
code: None,
message: StyledString::Text("top level await is only supported in ESM modules.".into())
.resolved_cell(),
source_ident: source.ident(),
severity: IssueSeverity::Error.resolved_cell(),
source: Some(issue_source(*source, span)),
title: ResolvedVc::cell("unexpected top level await".into()),
}
.cell()
AnalyzeIssue::new(
IssueSeverity::Error.cell(),
source.ident(),
Vc::cell("unexpected top level await".into()),
StyledString::Text("top level await is only supported in ESM modules.".into()).cell(),
None,
Some(issue_source(*source, span)),
)
.emit();
}

Expand Down

0 comments on commit 51ab65e

Please sign in to comment.