Skip to content

Commit

Permalink
chore: Update swc_core to v0.76.6 (vercel/turborepo#4937)
Browse files Browse the repository at this point in the history
### Description

Updates `swc_core` to `v0.76.x`, which adds support for `Explicit
Resource Management` (stage 3)

### Testing Instructions

Look at CI.

---

next.js counterpart: #49792

---

Closes WEB-1038
  • Loading branch information
kdy1 authored May 16, 2023
1 parent e0ad155 commit f1b5a2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/turbopack-ecmascript/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ async fn parse_content(
allow_super_outside_method: true,
allow_return_outside_function: true,
auto_accessors: true,
using_decl: true,
}),
EcmascriptModuleAssetType::Typescript
| EcmascriptModuleAssetType::TypescriptWithTypes => {
Expand Down
6 changes: 6 additions & 0 deletions crates/turbopack-ecmascript/src/references/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2298,6 +2298,12 @@ fn for_each_ident_in_decl(decl: &Decl, f: &mut impl FnMut(String)) {
.iter()
.for_each(|VarDeclarator { name, .. }| for_each_ident_in_pat(name, f));
}
Decl::Using(using_decl) => {
let decls = &*using_decl.decls;
decls
.iter()
.for_each(|VarDeclarator { name, .. }| for_each_ident_in_pat(name, f));
}
Decl::TsInterface(_) | Decl::TsTypeAlias(_) | Decl::TsEnum(_) | Decl::TsModule(_) => {
// ignore typescript for code generation
}
Expand Down

0 comments on commit f1b5a2a

Please sign in to comment.