Skip to content

Commit

Permalink
Merge 7acbcdc into 5b7c53f
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn authored Feb 3, 2023
2 parents 5b7c53f + 7acbcdc commit da6bfbb
Show file tree
Hide file tree
Showing 13 changed files with 3,269 additions and 3 deletions.
2 changes: 2 additions & 0 deletions crates/turbopack-ecmascript/src/analyzer/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ impl EvalContext {
SyntaxContext::empty(),
)),

Expr::Await(AwaitExpr { arg, .. }) => self.eval(arg),

Expr::New(..) => JsValue::Unknown(None, "unknown new expression"),

Expr::Seq(e) => {
Expand Down
6 changes: 3 additions & 3 deletions crates/turbopack-ecmascript/src/analyzer/well_known.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ pub async fn well_known_object_member(
WellKnownObjectKind::PathModule | WellKnownObjectKind::PathModuleDefault => {
path_module_member(kind, prop)
}
WellKnownObjectKind::FsModule | WellKnownObjectKind::FsModuleDefault => {
fs_module_member(kind, prop)
}
WellKnownObjectKind::FsModule
| WellKnownObjectKind::FsModuleDefault
| WellKnownObjectKind::FsModulePromises => fs_module_member(kind, prop),
WellKnownObjectKind::UrlModule | WellKnownObjectKind::UrlModuleDefault => {
url_module_member(kind, prop)
}
Expand Down
3 changes: 3 additions & 0 deletions crates/turbopack-ecmascript/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ pub fn unparen(expr: &Expr) -> &Expr {
if let Some(expr) = expr.as_paren() {
return unparen(&expr.expr);
}
if let Expr::Seq(seq) = expr {
return unparen(&seq.exprs.last().unwrap());
}
expr
}

Expand Down
Loading

0 comments on commit da6bfbb

Please sign in to comment.