From 602e0e5aa14ecb3a7bc20bfe77aac2badaa54bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Fri, 12 Jul 2024 12:55:05 +0900 Subject: [PATCH] fix(ci): Fix CI of `peff (#9216) --- crates/swc_ecma_transforms_typescript/src/transform.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/swc_ecma_transforms_typescript/src/transform.rs b/crates/swc_ecma_transforms_typescript/src/transform.rs index 8734dd5d00da..5a67f30a24cc 100644 --- a/crates/swc_ecma_transforms_typescript/src/transform.rs +++ b/crates/swc_ecma_transforms_typescript/src/transform.rs @@ -1003,9 +1003,9 @@ impl Transform { // NOTE: This is not correct! // However, all unresolved_span are used in TsImportExportAssignConfig::Classic // which is deprecated and not used in real world. - let top_level_ctxt = self.top_level_ctxt; - let cjs_require = quote_ident!(top_level_ctxt, "require"); - let cjs_exports = quote_ident!(top_level_ctxt, "exports"); + let unresolved_ctxt = self.unresolved_ctxt; + let cjs_require = quote_ident!(unresolved_ctxt, "require"); + let cjs_exports = quote_ident!(unresolved_ctxt, "exports"); let mut cjs_export_assign = None; @@ -1162,7 +1162,7 @@ impl Transform { expr.make_assign_to( op!("="), member_expr!( - top_level_ctxt, + unresolved_ctxt, Default::default(), module.exports )